Skip to content

fix: resolve Windows stdio JSON parsing errors and add Claude configuration docs#292

Open
Thamindu-Dev wants to merge 1 commit intotirth8205:mainfrom
Thamindu-Dev:fix/windows-fastmcp-stdio
Open

fix: resolve Windows stdio JSON parsing errors and add Claude configuration docs#292
Thamindu-Dev wants to merge 1 commit intotirth8205:mainfrom
Thamindu-Dev:fix/windows-fastmcp-stdio

Conversation

@Thamindu-Dev
Copy link
Copy Markdown

Describe the pull request

This PR addresses a critical blocker for Windows users where the MCP server fails to connect to Claude Code, throwing Invalid JSON: EOF while parsing a value and Connection closed errors during the stdio stream initialization.

Root Causes & Fixes:

  1. FastMCP Stdio Bug: Older versions of fastmcp (locked at <3) fail to properly handle newline characters (\n) in Windows stdio streams. Bumped the fastmcp constraint to >=3.2.4 and regenerated the uv.lock file to pull the upstream fix.
  2. Configuration Docs: Added a dedicated section in the README.md for Windows users. Using the typical cmd /c wrapper in Claude's configuration injects unwanted terminal echoes into the stream, crashing the parser. Documented the direct .exe execution approach using "env": {"PYTHONUTF8": "1"} to ensure stable communication.

Testing:
Tested locally on Windows 11 with Claude Code CLI. The server now successfully connects and maintains the stream without parsing crashes.

…and add Windows setup guide for Claude Code MCP integration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant