VS Code MCP Bridge
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
VS Code MCP Bridge
Turns a running VS Code instance into a local Model Context Protocol (MCP) server, so any external AI agent — CLI coders, orchestrators, your own tooling — can use the IDE's real refactoring intelligence instead of regex surgery on files.
Why: shell-driven mass refactors (moving 90 files / ~500 import sites with sed/grep) fail in cascading, hard-to-reverse ways. VS Code's language providers do this correctly and atomically. This extension exposes exactly that ability over MCP: file moves that update imports, LSP symbol rename, organize-imports, diagnostics, and workspace search — in one server, on one loopback port.
Inspired by and crediting juehang/vscode-mcp-server (WorkspaceEdit file ops, tool categories) and CodingWithCalvin/VSC-MCPServer (LSP tools, Origin/DNS-rebinding protection). This extension combines both feature sets with a hardened request pipeline, a stateless transport, and no express dependency.
Tools
Category (default) | Tools |
|
|
|
|
|
|
|
|
|
|
The typical agent workflow for a big move/rename:
find_references/call_hierarchy/search_symbols— scope the blast radius.move_fileper path (IDE rewrites imports), orrename_symbolper identifier;get_code_actions+apply_code_actionfor quickfixes and structural refactors.get_diagnosticsafter every step — red flags surface inside VS Code, not in CI.git_diffto review exactly what changed; a bad step reverts withundo_last_bridge_edit.organize_imports+format_documentas the finishing pass.
Every mutating tool snapshots affected files before the change (audit trail: edit_journal + journal.jsonl in extension storage).
Related MCP server: vscode-mcp-api
Security model
The server binds to 127.0.0.1 only and applies three independent checks to every request:
Host validation —
Hostmust be127.0.0.1:<port>/localhost:<port>/[::1]:<port>; blocks DNS rebinding.Origin validation — browser-originated requests must present a loopback
Origin(http://localhost:*,http://127.0.0.1:*,http://[::1]:*); non-browser clients (MCP clients,curl) send noOriginand are allowed;Origin: nulland anything off-loopback are rejected with403. CORS preflight is never answered, so browser pages cannot read responses either.Optional bearer token — set
vscode-mcp-bridge.tokenand clients must sendAuthorization: Bearer <token>.
Remaining honest caveats: there is no per-tool allowlist beyond categories, and any local process that spoofs loopback headers can call the API (true of every localhost MCP bridge without auth — use the token when that matters). One VS Code window owns the port; a second window will report EADDRINUSE and show an error state.
Configuration
// VS Code settings.json
"vscode-mcp-bridge.port": 3101,
"vscode-mcp-bridge.autoStart": true,
"vscode-mcp-bridge.token": "",
"vscode-mcp-bridge.enabledTools": { "file": true, "edit": true, "analysis": true, "refactor": true, "command": false }Recommended companion setting so file moves update imports without prompting:
"typescript.updateImportsOnFileMove.enabled": "always"(Path may differ for Vue/Volar projects: volar.updateImportsOnFileMove.enabled.)
Status bar item MCP:<port> shows the server state; click toggles it. Changing any vscode-mcp-bridge.* setting restarts the server.
Client setup
Point any MCP client at the streamable HTTP endpoint:
{
"mcp": {
"servers": {
"vscode-bridge": { "type": "http", "url": "http://127.0.0.1:3101/mcp", "timeoutMs": 60000 }
}
}
}For clients that only speak stdio: npx mcp-remote http://127.0.0.1:3101/mcp.
The server is live only while VS Code is open with your project; start the agent session after opening VS Code.
Planning docs (English mirror)
Architecture overview, ADRs and the roadmap live in docs/mirror/ — an English translation of the project's planning documentation (the canonical planning domain, in Russian, with the task registry, is kept private). Start at docs/mirror/README.md.
Agent skill
skill/SKILL.md teaches coding agents when and how to use the bridge (the refactor loop, tool inventory, gotchas). Install it into your harness's skill directory:
cp skill/SKILL.md ~/.agents/skills/vscode-mcp-bridge/SKILL.md # zcode / Claude-style harnessesThe canonical copy lives in this repository — re-copy after upgrades.
Requirements
VS Code ≥ 1.99
Node.js 22+ to build/package
Development
pnpm install
pnpm typecheck # tsc --noEmit, strict
pnpm test # vitest (pure logic: security validators, text matching)
pnpm build # esbuild bundle -> dist/extension.js
pnpm run package # vsce package -> vscode-mcp-bridge-<ver>.vsixPackage manager is pinned via the packageManager field (pnpm ≥ 10; Corepack picks it up automatically). Install the produced .vsix via code --install-extension <file>.vsix. CI (.github/workflows/build.yml) runs typecheck → tests → build → package on every push and attaches the .vsix as an artifact.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with VS Code's language server protocol features (definitions, references, diagnostics) and debugger (breakpoints, stepping, variable inspection) via an MCP server.7 npm1MIT
- AlicenseNot gradedqualityBmaintenanceExposes a running VS Code instance to AI agents via MCP, enabling file operations, LSP diagnostics, terminal commands, Git workflows, and refactoring.23MIT
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients and AI coding agents to pull real-time editor intelligence from a running VSCode instance, including LSP diagnostics and hover/definition/signature info, symbol references with usage context, workspace-wide renames, and file opening across open workspaces. This replaces slow tsc/eslint/build round-trips with instant language-server results over a per-workspace socket.-
- FlicenseNot gradedqualityAmaintenanceEnables MCP clients and AI coding agents to query a running VSCode instance for real-time LSP diagnostics, symbol information, references, and workspace-aware code navigation. It also supports workspace-wide symbol renaming, opening files, and executing VSCode commands through a bridge extension.-