Skip to content

Commit f69bbc8

Browse files
brendanbabbclaude
andcommitted
Docs: document stdio_bridge.py for Claude Desktop / Claude Code
Adds Method 4 to docs/TESTING.md covering how to wire the local HTTP server to Claude Desktop (claude_desktop_config.json) and Claude Code (.mcp.json) via stdio_bridge.py. The bridge was previously only mentioned in CLAUDE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 4070264 commit f69bbc8

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

docs/TESTING.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,50 @@ MCP Inspector is a web-based tool for testing MCP servers.
7474

7575
---
7676

77+
## Method 4: Claude Desktop / Claude Code via `stdio_bridge.py`
78+
79+
Claude Desktop and Claude Code speak MCP over stdio, not HTTP. `stdio_bridge.py` is a small Python adapter that reads JSON-RPC from stdin, forwards it to the local HTTP server, and writes responses back to stdout — a dependency-free replacement for the Go client in `client/` for cases where you just want a local stdio connection.
80+
81+
Start the local server first (`python local_server.py` from the repo root — this entry point accepts both `/` and `/mcp`), then register the bridge as an MCP server.
82+
83+
**Claude Desktop** — edit `claude_desktop_config.json`:
84+
85+
```json
86+
{
87+
"mcpServers": {
88+
"boston-opendata": {
89+
"command": "python",
90+
"args": [
91+
"C:/projects/boston/OpenContext/stdio_bridge.py",
92+
"http://localhost:8000/mcp"
93+
]
94+
}
95+
}
96+
}
97+
```
98+
99+
**Claude Code** — add an `.mcp.json` at the project root (or under `.claude/`):
100+
101+
```json
102+
{
103+
"mcpServers": {
104+
"boston-opendata": {
105+
"command": "python",
106+
"args": [
107+
"C:/projects/boston/OpenContext/stdio_bridge.py",
108+
"http://localhost:8000/mcp"
109+
]
110+
}
111+
}
112+
}
113+
```
114+
115+
The URL argument is optional — it defaults to `http://localhost:8000/mcp`. Pass a different URL to point at a deployed endpoint instead of the local server.
116+
117+
Adjust the interpreter path (e.g. `C:/projects/boston/OpenContext/venv/Scripts/python.exe`) if you want to pin to a specific virtualenv. `stdio_bridge.py` uses only Python stdlib, so no extra installs are required.
118+
119+
---
120+
77121
## Quick Checks
78122

79123
Optional checks before starting the server.

0 commit comments

Comments
 (0)