Skip to content

Conversation

@ghostnetworkai
Copy link

Problem\nINFO/DEBUG log messages were written to stdout via "console.log()", which violates MCP's requirement that stdout contain only JSON-RPC messages. This caused JSON parse errors in Claude Desktop.\n\n## Solution\nRoute the default logger output to stderr instead of stdout by using "console.error()" in the logger's default case.\n\n## Testing\n- Verified stdout contains only JSON-RPC: \n "echo '{"jsonrpc":"2.0",...}' | node dist/mcp/index.js 2>/dev/null"\n- Verified log output appears on stderr: \n "echo '{"jsonrpc":"2.0",...}' | node dist/mcp/index.js 2>&1 1>/dev/null"

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