VSCode Internal CommandSAFE
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
🚀 一个基于 FastMCP 框架的 VSCode 扩展,将 VSCode 转换为 MCP (Model Context Protocol) 服务器,支持外部客户端通过 HTTP Streaming 和 Server-Sent Events (SSE) 执行 VSCode 内部命令。
English Documentation
✨ 功能特性
- 🌐 HTTP Streaming 支持: 使用
text/event-stream协议,支持实时通信 - 🔧 VSCode 命令执行: 远程执行任意 VSCode 内部命令
- 📊 工作区信息查询: 获取当前工作区状态和文件信息
- ⚡ 异步后台执行: 支持异步命令执行,不阻塞用户界面
- ⏰ 可配置延时: 支持设置命令执行延时
- 🛡️ 安全控制: 可配置的命令白名单机制
- 📡 实时状态监控: 状态栏显示服务器运行状态
- 🔗 标准 MCP 协议: 完全兼容 Model Context Protocol 规范
- ⚡ 高性能: 基于 FastMCP 框架,支持并发请求和会话管理
- 🩺 健康检查: 内置健康检查端点
📦 安装
1. 克隆项目
git clone https://github.com/bestk/vscode-internal-command-mcp-server cd vscode-internal-command-mcp-server
2. 安装依赖
npm install
3. 编译项目
npm run compile
4. 在 VSCode 中安装
- 按
F5启动扩展开发主机 - 或者打包为
.vsix文件进行安装
⚙️ 配置
在 VSCode 设置中配置服务器参数:
{
"vscode-internal-command-mcp-server.port": 8080,
"vscode-internal-command-mcp-server.host": "localhost",
"vscode-internal-command-mcp-server.autoStart": true,
"vscode-internal-command-mcp-server.asyncExecution": true,
"vscode-internal-command-mcp-server.executionDelay": 1000,
"vscode-internal-command-mcp-server.showAsyncNotifications": false,
"vscode-internal-command-mcp-server.allowedCommands": [
"editor.action.formatDocument",
"workbench.action.files.save",
"editor.action.clipboardCopyAction"
]
}配置说明
4c7f823a2c02OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add vscode-internal-command-mcp-server -- npx -y [email protected]
{
"mcpServers": {
"vscode-internal-command-mcp-server": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (3)
2 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
execute_vscode_command | write | 执行VSCode命令 |
get_workspace_info | read | 获取工作区信息 |
list_vscode_commands | read | 列出可用的VSCode命令 |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
streamable-http
fastmcp, zod, @types/vscode, typescript
icon.png
Gates applied: no_behavioural_pass.
4c7f823a2c02full audit observations/trust-audit/mcp-server/bestk__vscode-internal-command.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 4c7f823a2c02 | SAFE | B | 89 | first audit |
Questions
What tools does VSCode Internal Command expose?
3 in total: 2 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is VSCode Internal Command safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does VSCode Internal Command need?
No credential environment variables were found in its source, so it appears to need none.
How does VSCode Internal Command run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as vscode-internal-command-mcp-server at 0.0.2.
How current is this page?
The grade is for one exact copy of the source (4c7f823a2c02), read on 2026-10-07. The repository is watched and re-audited when it changes.