- All responses now always return JSON-RPC 2.0 format, regardless of request format
- Removed conditional logic that could return non-JSON-RPC format
- Changed from
id: id || nulltoid: id ?? 0 - Ensures
idis always present (defaults to0if not provided)
- Removed
experimental: {}from capabilities - Now matches standard MCP spec exactly:
{ "tools": {}, "prompts": {} }
All responses now follow this exact format:
{
"jsonrpc": "2.0",
"result": { ... },
"id": <number>
}{
"jsonrpc": "2.0",
"result": {
"protocolVersion": "2024-11-05",
"capabilities": {
"tools": {},
"prompts": {}
},
"serverInfo": {
"name": "translation-helps-mcp",
"version": "7.3.0"
}
},
"id": 1
}✅ All Node.js tests pass ✅ CORS headers are correct ✅ JSON-RPC 2.0 format is consistent ✅ Response structure matches MCP spec exactly
The MCP Inspector has two connection modes:
-
Direct HTTP Connection (what we're using)
- URL:
http://localhost:8177/api/mcp - No proxy required
- Direct JSON-RPC 2.0 communication
- URL:
-
Via Proxy (alternative)
- Inspector runs proxy on port 6277
- Requires session token authentication
- The 401 error on
/configsuggests Inspector might be trying proxy mode
-
Restart the dev server to ensure changes are loaded:
cd ui && npm run dev
-
Try connecting the Inspector again to
http://localhost:8177/api/mcp -
If still getting ZodError, the Inspector might be:
- Using a different validation schema
- Expecting additional fields
- Having issues with the proxy connection
-
Alternative: Test with direct HTTP client (our test scripts work perfectly)
Run the test script to verify everything works:
node test-mcp-endpoint.jsAll tests should pass ✅