Skip to content

Commit 28444b4

Browse files
svnschaclaude
andauthored
docs: user-focused guide overhaul (HTTP, redaction, WER, expectations) (#58)
## Summary A user-focused pass over the MkDocs guide: close the operational gaps and tighten every page so each capability is discoverable as a goal the reader recognizes, and the limits are stated. (Supersedes #57, which GitHub auto-closed when its base branch `test/e2e-framework` was deleted on the merge of #56. This branch is rebased onto `main` and contains only the docs changes.) ## New use-case pages - **Debug from another machine** (`scenarios/http-service.md`) - run the server over the streamable-http transport on a Windows host and drive it from your laptop or a shared debugging host. Server-side paths, binding/firewall, and a clear **no-authentication** warning. - **Redact sensitive data** (`scenarios/redaction.md`) - scrub secrets/PII from tool output with a `--filter-script` before it reaches a cloud model. Real script, client wiring, hook contract. ## Reworked pages - **Triage** - "Capture crashes automatically" with WER `LocalDumps` (the registry path behind the no-directory `list_windbg_dumps` fallback). - **Crash dump** - use the `dump-triage` prompt for a structured report. - **Remote target** - attach-by-PID is unsupported (connect to a `-server`). - **Tools** - sessions are concurrent. **cli/clients** HTTP no-auth note. **Index** scope note, **getting-started** pointers, new **troubleshooting** entries for HTTP and filter scripts, and cross-links throughout. ## Verification - `python -m mkdocs build --strict` - clean; all new links and anchors resolve. - `pwsh scripts/Format-Docs.ps1 -Check` - no em/en dashes, no emoji. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 642422c commit 28444b4

14 files changed

Lines changed: 205 additions & 16 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- **Documentation site**: New MkDocs (Material) user guide under `docs/`, deployed to GitHub Pages via `pages.yml`. Covers getting started, the use cases, and a reference for the command-line options, tools, and client configuration. Content migrated and trimmed from the project wiki.
1313
- **Prompts reference**: Documented the built-in `dump-triage` MCP prompt and its `dump_path` argument (`docs/reference/prompts.md`).
14+
- **Usage guide coverage**: New use-case pages for running the server over HTTP (`Debug from another machine`) and scrubbing tool output (`Redact sensitive data`), plus WER auto-capture setup in the triage guide and the `dump-triage` prompt in the crash-dump guide. Documented the HTTP transport's lack of authentication, that attach-by-PID is unsupported, and that sessions are concurrent.
1415

1516
### Changed
1617

docs/getting-started.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Close the crash dump session for C:\dumps\app.dmp
108108
- **[Analyze a crash dump](scenarios/crash-dump.md)** - the dump workflow in depth.
109109
- **[Debug a remote target](scenarios/remote-debugging.md)** - connect to a live session and break in.
110110
- **[Triage multiple dumps](scenarios/triage.md)** - scan a folder and compare.
111+
- **[Debug from another machine](scenarios/http-service.md)** - run the server over HTTP and connect remotely.
112+
- **[Redact sensitive data](scenarios/redaction.md)** - filter secrets out of tool output.
111113
- **[Command-line options](reference/cli.md)** - every CLI flag and transport.
112114
- **[Tools](reference/tools.md)** - the MCP tools and their parameters.
113115
- **[Client configuration](reference/clients.md)** - Claude Desktop, Copilot CLI, pip, and source installs.

docs/index.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ back. You get the knowledge of an LLM applied to the real, battle-tested Windows
1919
session, break in, and inspect threads, memory, and state.
2020
- **[Triage multiple dumps](scenarios/triage.md)** - scan a folder of dumps and compare
2121
them to spot a common pattern.
22+
- **[Debug from another machine](scenarios/http-service.md)** - run the server over HTTP on a
23+
Windows host and connect from your own laptop.
24+
- **[Redact sensitive data](scenarios/redaction.md)** - scrub secrets or PII out of tool output
25+
before it reaches a cloud model.
2226

2327
---
2428

@@ -57,7 +61,9 @@ chatting. The rest of this guide is about that setup and the things you can ask
5761
| **Symbols for your target** | So the debugger can map addresses back to functions and source. A symbol server works out of the box. |
5862

5963
!!! note "What this is, and is not"
60-
This is a **usage** guide for analyzing dumps and debugging with an MCP client. It is
61-
not a magic auto-fix: the server is a wrapper around `cdb.exe` that lets an LLM run real
62-
debugger commands. For building the server from source, see the project
63-
[`README.md`](https://github.com/svnscha/mcp-windbg).
64+
This is a **usage** guide for analyzing dumps and debugging with an MCP client. The server
65+
is a wrapper around `cdb.exe` that lets an LLM run real debugger commands; it is not a magic
66+
auto-fix. It works on **dump files** and on **connecting to a debugging server**
67+
(`cdb`/WinDbg started with `-server`). Kernel-mode (`-k`) debugging and attaching to a
68+
running process by PID are not supported. For building the server from source, see the
69+
project [`README.md`](https://github.com/svnscha/mcp-windbg).

docs/reference/cli.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ mcp-windbg --transport streamable-http --host 127.0.0.1 --port 8000
5151
```
5252

5353
The endpoint is then `http://127.0.0.1:8000/mcp`. See
54-
[Client configuration](clients.md#http-transport) for the matching client snippet.
54+
[Client configuration](clients.md#http-transport) for the matching client snippet and
55+
[Debug from another machine](../scenarios/http-service.md) for the full workflow.
56+
57+
!!! warning "The HTTP transport has no authentication"
58+
Anyone who can reach the port can drive `cdb.exe` on the host. Keep `--host 127.0.0.1`, or
59+
expose it only on a trusted network or behind an SSH tunnel or authenticating proxy.
5560

5661
## Symbols and CDB
5762

@@ -71,8 +76,9 @@ Per-call symbol paths are also available on some tools, see
7176
## Filter script hooks
7277

7378
Use `--filter-script` to load a small Python helper that rewrites **tool text only**, for
74-
example to redact PII before it leaves the machine. The script never sees the full MCP
75-
JSON-RPC envelope, which keeps the hook surface small and avoids protocol interference. It
79+
example to [redact PII](../scenarios/redaction.md) before it leaves the machine. The script
80+
never sees the full MCP JSON-RPC envelope, which keeps the hook surface small and avoids
81+
protocol interference. It
7682
runs in-process with the server, so treat it as trusted code.
7783

7884
The script may define either or both of these functions:

docs/reference/clients.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Create `.vscode/mcp.json` in your workspace, or use **MCP: Open User Configurati
3535
Then enable MCP: settings (++ctrl+comma++) -> search **MCP** -> enable **Model Context
3636
Protocol** in Copilot Chat, and restart VS Code.
3737

38-
To pass server options such as a [filter script](cli.md#filter-script-hooks) or a custom CDB
38+
To pass server options such as a [filter script](../scenarios/redaction.md) or a custom CDB
3939
path, add them to `args`:
4040

4141
```json
@@ -119,6 +119,9 @@ Then point the client at the endpoint:
119119
}
120120
```
121121

122+
This transport has no authentication, so keep it on localhost or a trusted network. See
123+
[Debug from another machine](../scenarios/http-service.md) for the full workflow.
124+
122125
## Other install methods
123126

124127
`uvx` is recommended, but you can also install the package directly.

docs/reference/tools.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ one from your request, but this is the precise contract for each.
1414
| [`send_ctrl_break`](#send_ctrl_break) | Break into a running target. |
1515

1616
Sessions are persistent: opening a dump or remote target keeps a `cdb.exe` process alive so
17-
follow-up commands reuse it. Close sessions when you finish to free resources.
17+
follow-up commands reuse it. Several can be open at once, each addressed by its dump path or
18+
connection string, so you can compare dumps side by side. Close sessions when you finish to free
19+
resources.
1820

1921
---
2022

docs/scenarios/crash-dump.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ That maps to the per-call `symbols_path` parameter, which only applies when the
4747
first created. See [`open_windbg_dump`](../reference/tools.md#open_windbg_dump) and
4848
[`--symbols-path`](../reference/cli.md#symbols-and-cdb) for the details.
4949

50+
## Get a structured report with the dump-triage prompt
51+
52+
For a thorough, consistent write-up, use the built-in `dump-triage` prompt instead of asking
53+
free-form. Most clients surface it as a slash command or a prompt picker; in VS Code it appears
54+
as `/mcp.mcp-windbg.dump-triage`. It walks the model through opening the dump, extracting
55+
metadata, and producing a structured crash report. See [Prompts](../reference/prompts.md).
56+
5057
## Close the session when done
5158

5259
Each open dump holds a `cdb.exe` process. Free it when you finish:

docs/scenarios/http-service.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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.

docs/scenarios/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Use cases
22

3-
There are three things people do with `mcp-windbg`. They share the same setup, you just ask
4-
for different work. Pick the one that matches what you have:
3+
People use `mcp-windbg` for a handful of jobs. They share the same setup, you just ask for
4+
different work. Pick the one that matches what you have:
55

66
| Use case | You have | Key tools |
77
| --- | --- | --- |
88
| **[Analyze a crash dump](crash-dump.md)** | A `.dmp` file from a crash. | `open_windbg_dump`, `run_windbg_cmd`, `close_windbg_dump` |
99
| **[Debug a remote target](remote-debugging.md)** | A live debugging session to connect to. | `open_windbg_remote`, `send_ctrl_break`, `run_windbg_cmd` |
1010
| **[Triage multiple dumps](triage.md)** | A folder full of dumps. | `list_windbg_dumps`, then the crash-dump flow per file |
11+
| **[Debug from another machine](http-service.md)** | A Windows debugging host, but you work elsewhere. | Any tool, over the HTTP transport |
12+
| **[Redact sensitive data](redaction.md)** | Dumps with secrets or PII. | A `--filter-script` over any tool |
1113

1214
!!! tip "Dumps vs live targets"
1315
A **dump** is a frozen snapshot, you read it. A **remote target** is a running session,

docs/scenarios/redaction.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Redact sensitive data
2+
3+
Crash dumps can contain secrets, tokens, or personal data. When your MCP client sends tool output
4+
to a cloud model, you may need to scrub that text first. A filter script does this in the server,
5+
before anything leaves the machine.
6+
7+
## Write a filter script
8+
9+
A filter is a small Python file with a `process_input` and/or `process_output` function. Each
10+
receives the text and a context, and returns the replacement text (or `None` to leave it
11+
unchanged):
12+
13+
```python title="redact.py"
14+
import re
15+
16+
EMAIL = re.compile(r"[\w.+-]+@[\w-]+\.[\w.-]+")
17+
18+
19+
def process_output(text, context):
20+
return EMAIL.sub("[redacted-email]", text)
21+
```
22+
23+
- `process_output` rewrites the text returned by tools (the part the model sees).
24+
- `process_input` rewrites string-valued tool arguments before the tool runs.
25+
26+
## Wire it into your client
27+
28+
Add `--filter-script` to the server arguments, pointing at your script:
29+
30+
```json
31+
"args": ["--from", "git+https://github.com/svnscha/mcp-windbg", "mcp-windbg",
32+
"--filter-script", "C:\\filters\\redact.py"]
33+
```
34+
35+
Now every tool result is run through `process_output` before it reaches the client.
36+
37+
## What the filter can and cannot see
38+
39+
- It sees **tool text only**: string arguments (`process_input`) and `TextContent` output
40+
(`process_output`). It never sees the raw MCP protocol envelope, which keeps the surface small.
41+
- The `context` gives `hook`, `tool_name`, `transport`, and `call_id`; `process_input` also gets
42+
`argument_path` (such as `$.command`) and `process_output` gets `content_index`. Use `call_id`
43+
to correlate a call's input and output.
44+
- It runs in-process with the server, so treat it as **trusted code**. A hook that raises is
45+
reported as a tool error rather than crashing the server.
46+
47+
## Related
48+
49+
- [Filter script hooks](../reference/cli.md#filter-script-hooks) - the full hook contract and a
50+
worked input + output example.

0 commit comments

Comments
 (0)