|
| 1 | +# Debug from another machine |
| 2 | + |
| 3 | +`mcp-windbg` needs Windows and `cdb.exe`, but you do not have to work on that machine. Run the |
| 4 | +server on the Windows host that holds the dumps, symbols, and debugger, and connect to it over |
| 5 | +HTTP from your own laptop, or let a few people share one debugging host. |
| 6 | + |
| 7 | +## Start the server on the Windows host |
| 8 | + |
| 9 | +```powershell |
| 10 | +mcp-windbg --transport streamable-http --host 127.0.0.1 --port 8000 |
| 11 | +``` |
| 12 | + |
| 13 | +It serves MCP at `http://127.0.0.1:8000/mcp`. Pass the same server options as usual, for example |
| 14 | +`--symbols-path` or `--filter-script`, see [Command-line options](../reference/cli.md). |
| 15 | + |
| 16 | +## Point your client at it |
| 17 | + |
| 18 | +Use an HTTP MCP server entry instead of a launched command: |
| 19 | + |
| 20 | +```json |
| 21 | +{ |
| 22 | + "servers": { |
| 23 | + "mcp_windbg_http": { |
| 24 | + "type": "http", |
| 25 | + "url": "http://localhost:8000/mcp" |
| 26 | + } |
| 27 | + } |
| 28 | +} |
| 29 | +``` |
| 30 | + |
| 31 | +Replace `localhost` with the host's name or IP when the client is on a different machine. From |
| 32 | +there you debug exactly as over stdio, the [crash dump](crash-dump.md) and |
| 33 | +[remote target](remote-debugging.md) workflows are identical. |
| 34 | + |
| 35 | +## Paths are on the server |
| 36 | + |
| 37 | +The server opens dumps from its own filesystem, so the paths you mention are the host's paths, |
| 38 | +not your laptop's: |
| 39 | + |
| 40 | +```text |
| 41 | +Analyze the crash dump at C:\dumps\app.dmp |
| 42 | +``` |
| 43 | + |
| 44 | +That `C:\dumps\app.dmp` is read on the Windows host. |
| 45 | + |
| 46 | +## Expose it beyond localhost |
| 47 | + |
| 48 | +`--host 127.0.0.1` keeps the server local. To accept connections from other machines, bind a |
| 49 | +reachable address and open the port: |
| 50 | + |
| 51 | +```powershell |
| 52 | +mcp-windbg --transport streamable-http --host 0.0.0.0 --port 8000 |
| 53 | +``` |
| 54 | + |
| 55 | +!!! warning "The HTTP transport has no authentication" |
| 56 | + Anyone who can reach the port can drive `cdb.exe` on the host. Keep the server on `127.0.0.1` |
| 57 | + or a trusted network. To reach it remotely, prefer an SSH tunnel or an authenticating reverse |
| 58 | + proxy rather than binding `0.0.0.0` on an untrusted network. Also allow the port through the |
| 59 | + host firewall. |
| 60 | + |
| 61 | +## Related |
| 62 | + |
| 63 | +- [Command-line options](../reference/cli.md#transports) - the transport, host, and port flags. |
| 64 | +- [Client configuration](../reference/clients.md#http-transport) - the HTTP client snippet. |
0 commit comments