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
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -275,22 +275,22 @@ Configure DebugMCP behavior in VSCode settings:
275
275
{
276
276
"debugmcp.serverPort": 3001,
277
277
"debugmcp.timeoutInSeconds": 180,
278
-
"debugmcp.bindHost": "127.0.0.1"
278
+
"debugmcp.bindHost": ["127.0.0.1", "::1"]
279
279
}
280
280
```
281
281
282
282
| Setting | Default | Description |
283
283
|---------|---------|-------------|
284
284
|`debugmcp.serverPort`|`3001`| Port number for the MCP server |
285
285
|`debugmcp.timeoutInSeconds`|`180`| Timeout for debugging operations |
286
-
|`debugmcp.bindHost`|`127.0.0.1`| Network interface the HTTP server binds to. See [Security model](#security-model) before changing. |
286
+
|`debugmcp.bindHost`|`["127.0.0.1", "::1"]`| Network interface(s) the HTTP server binds to. Accepts a string or array of strings. See [Security model](#security-model) before changing. |
287
287
288
288
### Security model
289
289
290
290
DebugMCP exposes powerful debugger primitives (`evaluate_expression`, `start_debugging`, …) over an unauthenticated local HTTP endpoint. To keep that surface safe, the server enforces two controls:
291
291
292
-
1.**Loopback-only bind.** The HTTP server binds to `127.0.0.1` by default, so other hosts on your network cannot reach `http://<your-ip>:3001/mcp`. The `debugmcp.bindHost` setting lets you opt into a different interface (for example, when forwarding the port into a remote container), but doing so exposes the unauthenticated debugger to anything that can route to that address — do not point it at `0.0.0.0` or a LAN address on an untrusted network.
293
-
2.**Host / Origin header validation.** Every request must carry a `Host` header naming a loopback address (`localhost`, `127.0.0.1`, or `[::1]`); requests with any other `Host` — including those that arrive via DNS rebinding from a malicious webpage — are rejected with HTTP 403. The same check is applied to the `Origin` header when present.
292
+
1.**Loopback-only bind.** The HTTP server binds to the IPv4 and IPv6 loopback addresses (`127.0.0.1`and `::1`) by default, so other hosts on your network cannot reach `http://<your-ip>:3001/mcp`. Binding both families ensures clients that resolve `localhost` to either family connect successfully. The `debugmcp.bindHost` setting (string or array of strings) lets you opt into a different interface (for example, when forwarding the port into a remote container), but doing so exposes the unauthenticated debugger to anything that can route to that address — do not point it at `0.0.0.0` or a LAN address on an untrusted network.
293
+
2.**Host / Origin header validation.** Every request must carry a `Host` header naming a loopback address (`localhost`, `127.0.0.1`, or `[::1]`); any port suffix in the `Host` must also match the server's listening port. Requests with any other `Host` — including those that arrive via DNS rebinding from a malicious webpage — are rejected with HTTP 403. The same loopback check is applied to the `Origin` header when present.
Copy file name to clipboardExpand all lines: package.json
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -79,9 +79,10 @@
79
79
"description": "Port number for the DebugMCP server"
80
80
},
81
81
"debugmcp.bindHost": {
82
-
"type": "string",
83
-
"default": "127.0.0.1",
84
-
"markdownDescription": "Network interface the DebugMCP HTTP server binds to. **Defaults to `127.0.0.1` (loopback only).** ⚠️ **Security warning:** changing this to `0.0.0.0` or a LAN address exposes the unauthenticated MCP debugger — including arbitrary code execution via `evaluate_expression` and `start_debugging` — to every host on the network. Only change this if you fully understand the risk."
82
+
"type": ["string", "array"],
83
+
"items": { "type": "string" },
84
+
"default": ["127.0.0.1", "::1"],
85
+
"markdownDescription": "Network interface(s) the DebugMCP HTTP server binds to. **Defaults to `[\"127.0.0.1\", \"::1\"]` (IPv4 + IPv6 loopback only).** Accepts a single string or an array of strings. ⚠️ **Security warning:** changing this to `0.0.0.0` or a LAN address exposes the unauthenticated MCP debugger — including arbitrary code execution via `evaluate_expression` and `start_debugging` — to every host on the network. Only change this if you fully understand the risk."
0 commit comments