Repository navigation
Description
Summary
uteke-mcp v0.6.6 emits JSON-RPC responses that violate the JSON-RPC 2.0 and MCP specifications. Strict clients reject the connection as a result — notably Claude Code reports ✗ Failed to connect for the stdio MCP server, and the same likely affects other spec-strict clients (Claude Desktop, some Cursor setups).
Environment
- uteke:
0.6.6(release tagv0.6.6) - Platform: macOS aarch64 (
uteke-aarch64-apple-darwin-v0.6.6.tar.gz) - Binary:
uteke-mcp(stdio server) - Client where it fails: Claude Code 2.1.104
The two violations
1. Success responses include "error": null
Per JSON-RPC 2.0, result and error are mutually exclusive: a success response must contain result and omit error entirely. uteke-mcp instead returns both, with error set to null, on every response.
2. Notifications receive an acknowledgement response
Per JSON-RPC 2.0 §4.1: "Notifications are not confirmable by definition, since they do not have a Response object associated with them." After the client sends notifications/initialized (a notification, no id), uteke-mcp replies with {"id": null, "result": null, "error": null}. This illicit response is not allowed.
Reproduction
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"repro","version":"1"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
| uteke-mcpActual output
{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"tools":{}},"protocolVersion":"2025-06-18","serverInfo":{"name":"uteke","version":"0.6.6"}},"error":null}
{"jsonrpc":"2.0","id":null,"result":null,"error":null}
- Line 1 — success response carries a bogus
"error": null. - Line 2 — a response (with
id: null) to a notification that must not receive any response.
Expected output (spec-compliant)
{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"tools":{}},"protocolVersion":"2025-06-18","serverInfo":{"name":"uteke","version":"0.6.6"}}}
(The second line should not exist at all.)
Impact
Strict clients refuse the handshake:
$ claude mcp list
uteke: /path/to/uteke-mcp - ✗ Failed to connect
Lenient clients (pi's mcp-adapter, manual JSON-RPC consumers) connect fine, which is why the issue can go unnoticed during development.
Suggested fix
In the JSON-RPC/MCP response serialization layer:
- When building a success response, omit the
errorfield instead of serializing it asnull(or simply never set it on the success variant of the response enum). - For requests whose
idisnull/absent (i.e. notifications), do not emit any response — return early after handling, with no write to stdout.
These are small changes in the serialization path and would make uteke-mcp compatible with all MCP clients out of the box.
Workaround (for affected users, in case it helps others)
A small proxy wrapper that strips "error": null and drops notification acks restores compatibility:
# Spawn real uteke-mcp, forward stdin/stderr verbatim, and on stdout:
# - drop any response with id is None and empty result (notification ack)
# - remove "error": null from success responsesThanks for the project — the local-first memory approach is great. Happy to test a fix if needed.
Activity
fix(mcp): JSON-RPC 2.0 spec compliance — omit error field & skip noti…
fix(mcp): JSON-RPC 2.0 spec compliance — omit error field & skip noti…