You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Host MCP server in-process with auto-config and release workflow
- Embed MCP server directly in the extension using Streamable HTTP transport
at /mcp, eliminating the need for a separate stdio proxy process
- Auto-update ~/.claude.json on activation for zero-config Claude Code setup
- Add sidebar panel showing server status, port, and Claude config state
- Add IDebugClient interface so tools work with both in-process and stdio paths
- Add GitHub Actions workflow to build .vsix and create releases on tag push
- Bump version to 0.2.0
Copy file name to clipboardExpand all lines: README.md
+37-42Lines changed: 37 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,41 +6,38 @@ A VS Code extension that exposes an MCP (Model Context Protocol) server, allowin
6
6
7
7
-**22 MCP tools** for full debugger control
8
8
-**Works with any debugger** that implements the Debug Adapter Protocol
9
+
-**Zero-config for Claude Code** — auto-updates `~/.claude.json` on activation
9
10
-**Execution commands block until the debugger stops** and return the stop location + local variables in a single response
10
11
-**Captures program output** (stdout/stderr) for inspection
11
-
-**Multi-window support** — each VS Code window runs its own bridge
12
12
13
13
## Architecture
14
14
15
15
```
16
-
Claude Code CLI / Desktop
17
-
| (stdio: JSON-RPC)
16
+
Claude Code / Desktop / any MCP client
17
+
| (HTTP: Streamable HTTP transport)
18
18
v
19
-
MCP Server Process (dist/mcp-server.js)
20
-
| (HTTP to localhost:<port>)
21
-
v
22
-
VS Code Extension (dist/extension.js)
19
+
VS Code Extension (MCP server on localhost:<port>/mcp)
23
20
| (vscode.debug.* API)
24
21
v
25
22
Debug Adapter Protocol → Any Debugger
26
23
```
27
24
28
-
The extension starts a localhost HTTP server on a random port with a random auth token, and writes both to a temporary port file. The MCP server (spawned by the AI client via stdio) reads this file to communicate with the extension.
25
+
The extension hosts the MCP server directly inside the VS Code process — no separate server or sidecar needed. On activation it starts a localhost HTTP server (default port `45557`) and automatically writes the connection URL to `~/.claude.json`.
29
26
30
27
## Installation
31
28
32
29
This extension is not yet published to the VS Code Marketplace. Install it manually from the `.vsix` file.
33
30
34
31
### 1. Download the `.vsix`
35
32
36
-
Download `vscode-debugger-mcp-0.1.0.vsix` from this repository (it's in the repo root).
33
+
Download `vscode-debugger-mcp-0.2.0.vsix` from this repository (it's in the repo root).
After installation, reload the window (`Ctrl+Shift+P` / `Cmd+Shift+P` → **Developer: Reload Window**). The extension activates automatically on startup.
53
+
After installation, reload the window (`Ctrl+Shift+P` / `Cmd+Shift+P` → **Developer: Reload Window**). The extension activates automatically on startup and the MCP server begins listening.
57
54
58
55
### From source (development)
59
56
@@ -68,30 +65,22 @@ Then press `F5` in VS Code to launch the Extension Development Host.
68
65
69
66
## MCP Client Configuration
70
67
71
-
After installing the `.vsix`, the MCP server script is located inside the installed extension directory. The path depends on your setup:
68
+
### Claude Code (zero-config)
72
69
73
-
| Setup | Extensions path |
74
-
|-------|----------------|
75
-
| VS Code (local) |`~/.vscode/extensions/`|
76
-
| VS Code Remote / WSL |`~/.vscode-server/extensions/`|
77
-
| Windows (local) |`%USERPROFILE%\.vscode\extensions\`|
70
+
The extension automatically registers itself in `~/.claude.json` on activation. **No manual setup needed** — just install the extension, reload VS Code, and start using Claude Code.
A standalone MCP server process is also available for clients that only support stdio transport. See the extension's `dist/mcp-server.js` — it discovers the running extension via a port file and proxies MCP requests over HTTP.
119
+
120
+
## Settings
121
+
122
+
| Setting | Default | Description |
123
+
|---------|---------|-------------|
124
+
|`debuggerMcp.port`|`45557`| Preferred port for the MCP server. Falls back to a random port if taken. |
125
+
|`debuggerMcp.autoConfigureClaude`|`true`| Automatically update `~/.claude.json` with the MCP server URL on activation. |
126
+
131
127
## Tools
132
128
133
129
### Session Management
@@ -189,19 +185,18 @@ Add to `.vscode/mcp.json` in your workspace:
189
185
190
186
## How It Works
191
187
192
-
1.**Extension activates** on VS Code startup and starts a localhost HTTP server on a random port
193
-
2.**Port file**is written to the OS temp directory containing `{ port, authToken, pid, workspaceFolder, timestamp }`
194
-
3.**MCP server**(spawned by the AI client) reads the port file, validates it (PID check, timestamp freshness), and sends authenticated HTTP requests
195
-
4.**Debug commands** are forwarded to the VS Code debug API
188
+
1.**Extension activates** on VS Code startup and starts an HTTP server on `localhost:45557`
189
+
2.**MCP endpoint**at `/mcp` uses the Streamable HTTP transport protocol — each client gets its own session
190
+
3.**Auto-config**writes the server URL to `~/.claude.json` so Claude Code discovers it automatically
191
+
4.**Debug commands** are forwarded to the VS Code debug API via an in-process `DirectClient`
196
192
5.**DAP message interception** captures stopped events, program output, and exit codes in real-time
197
193
6.**Execution commands** (continue, step) block until the debugger pauses, then automatically gather the stop location and local variables
198
194
199
195
## Security
200
196
201
197
- HTTP server binds to `127.0.0.1` only (no network exposure)
202
-
- Random UUID auth token required on every request
203
-
- Token is shared only through a local temp file
204
-
- Port file includes PID for stale-file detection
198
+
- MCP endpoint uses the standard Streamable HTTP transport protocol
199
+
- Port file (for legacy stdio transport) includes random auth token and PID for stale-file detection
0 commit comments