vscode-debug-mcp
Allows driving the VS Code debugger via HTTP requests, enabling breakpoints, launch/attach, stepping, variable inspection, and expression evaluation without MCP client.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vscode-debug-mcpSet a breakpoint at src/app.ts:25 and start debugging"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vscode-debug-mcp
Let AI agents drive the VS Code debugger.
A two-part toolkit that gives coding agents (Claude Code, Cursor, Codex, or plain curl) full control of VS Code's debugging engine: set breakpoints, launch/attach sessions, step through code, inspect call stacks and variables, and evaluate expressions in the paused frame — all inside the editor the human is already looking at.
AI Agent ──(stdio MCP)──> MCP Server ──(HTTP 127.0.0.1:7779)──> VS Code Extension ──> vscode.debug API
└──────────────(or plain curl, no MCP config needed)──────────────┘Package | Where | What |
VS Code Marketplace / Open VSX | Extension exposing | |
npm | Stdio MCP server translating MCP tool calls to bridge HTTP calls |
Why an editor bridge instead of a standalone DAP client? The debug session lives in the user's VS Code window: breakpoints are visible, the paused file opens at the exact line, and the human can take over the Run and Debug UI at any moment. Agent and human share one debugging surface. This powers live "feature tour" walkthroughs where an agent narrates newly written code while stepping through it in a real app.
Setup
1. Install the VS Code extension
From the Marketplace / Open VSX (search "Debug MCP Bridge"), or from a local build:
code --install-extension vscode-debug-mcp-bridge-0.1.0.vsix # cursor --install-extension works tooThe bridge auto-starts when a window opens and binds 127.0.0.1:7779 (change via the debugMcpBridge.port setting). Command Palette: Debug MCP Bridge: Start Server / Stop Server.
Verify:
curl http://127.0.0.1:7779/health
# → {"status":"ok","version":"0.1.0"}2. Configure the MCP server (optional)
Skip this if you prefer driving the bridge with plain HTTP — see Zero-config HTTP mode.
Claude Code (~/.claude.json or project .mcp.json):
{
"mcpServers": {
"vscode-debugger": {
"command": "npx",
"args": ["-y", "vscode-debug-mcp"]
}
}
}Cursor (~/.cursor/mcp.json or project .cursor/mcp.json) uses the same shape. Codex (~/.codex/config.toml):
[mcp_servers.vscode-debugger]
command = "npx"
args = ["-y", "vscode-debug-mcp"]Optional: set a custom bridge port with the VSCODE_DEBUG_PORT env var (default 7779).
Related MCP server: MCP JS Debugger
MCP tools
Tool | Description |
| Set a breakpoint (optional condition / hit count / logpoint) |
| Remove breakpoints at a file:line |
| List all breakpoints |
| Start a debug session (inline config or launch.json name) |
| Stop the active debug session |
| Continue execution |
| Step over next statement |
| Step into function call |
| Step out of current function |
| Pause execution |
| Get current state (inactive/running/stopped) |
| Get call stack frames |
| Get variables in scope |
| Evaluate an expression in the paused frame |
| Expand object/array children by variablesReference |
| List active threads |
Zero-config HTTP mode
Everything the MCP server does is also reachable directly — useful for agents that can run shell commands but have no MCP configuration:
Purpose | HTTP |
Health check |
|
Set breakpoint |
|
Remove breakpoint |
|
List breakpoints |
|
Launch/attach |
|
Poll state |
|
Call stack |
|
Variables |
|
Evaluate |
|
Expand variable |
|
Continue / step |
|
Threads |
|
Detach |
|
Example — attach to a running Chrome and break on a click handler:
curl -s -X POST http://127.0.0.1:7779/debug/launch -H "Content-Type: application/json" -d '{
"config": {
"type": "chrome", "request": "attach", "name": "agent attach",
"port": 9222, "webRoot": "/abs/path/to/project",
"urlFilter": "http://localhost:3000/*"
}
}'
curl -s -X POST http://127.0.0.1:7779/breakpoint -d '{"file":"/abs/path/src/App.tsx","line":42}'
curl -s http://127.0.0.1:7779/state # poll until "stopped"Operational notes
One window owns the port. The bridge binds
7779per VS Code window; with multiple windows open, the first to activate wins. Paused files open in the owning window. Find the owner withps -p $(lsof -t -iTCP:7779 -sTCP:LISTEN) -o command=(the workspace name appears in the process title), then stop/start the bridge via the Command Palette in the window you want.Start the bridge before launching debug sessions. The DAP tracker only observes sessions created after the bridge is running. If state looks stale after IDE-driven steps, call
GET /stateto re-sync.Single session (current limitation). Only the active debug session is tracked. Multi-session setups (e.g. Next.js server + client) follow the focused session — see TODO.md.
The bridge listens on
127.0.0.1only and is never exposed externally.
Development
pnpm install # workspace root
pnpm typecheck # both packages
pnpm build # both packages
pnpm package # build the .vsix (vscode-extension/)
# E2E (requires a VS Code window with this repo open and the bridge running)
cd e2e && node e2e-test.mjsReleasing
# VS Code Marketplace + Open VSX (PATs injected via 1Password)
pnpm publish:stores:dry-run
pnpm publish:stores
# npm (mcp-server)
pnpm publish:npm.env.1password maps VSCE_PAT / OVSX_PAT to 1Password items (op run injects them at publish time). The npm publish uses your logged-in npm account (npm login first).
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/laststance/vscode-debug-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server