Three Silent Failures Building a Local MCP Server for Claude Code on Windows
duct_tape_and_agents · reddit · 2026-09-27
The author built a small local MCP server for Claude Code on Windows and hit three failures that produced zero errors, sharing them to save others an evening.
1. One backslash in .mcp.json makes the whole file ignored
Claude Code generated "C:\My Projects\MyApp\dist\cli.js"; \M is an invalid JSON escape, so the file fails to parse and Claude Code silently skips it — no approval prompt, no error, only a red "1" next to the filename in VS Code. Fix: use forward slashes, which Node handles fine on Windows.
2. stdout belongs to the protocol
With a stdio MCP server, stdout carries protocol messages; one stray console.log breaks the client. All logging must go to stderr.
3. The client only reads config at session start
After fixing the file and reloading, still nothing: Claude Code picks up servers when a chat starts and only reads .mcp.json from the folder VS Code has open, not the parent. Open the project root, start a fresh chat, then test.
What helped: the fastest test isn't /mcp but asking Claude to call one of your tools directly; the author had Claude Code record each lesson in CLAUDE.md ("MCP paths always use forward slashes", "never write to stdout in the MCP process") so it stops reintroducing the same bugs.
More from coding & agent
- Grok Build v1.0.41 ships subagent config inheritance and long-reasoning fixes — mark_k · 2026-09-27
- Harrison Chase on building frontier harnesses: context layers, evals, online learning — VeryWellVersed · 2026-09-27
- Dev shares public Grok Bot 'chief of staff' template running a background specialist agent swarm — RachelVT42 · 2026-09-27
- Meta pitches hand-first dev workflow: one Unity codebase across Quest and VR glasses — Scobleizer · 2026-09-27
- Antigravity 2.0 ships /plan mode as dev mocks it as behind Anthropic's curve — brandon_galang · 2026-09-27
- Codex power users say Astra burns $200 limits in days while Anthropic's cap is hard to hit — brandon_galang · 2026-09-27