You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP initialize response uses snake_case (protocol_version/server_info) instead of camelCase — rejected by strict clients #52
The Memayu MCP server (memayu mcp, v0.1.0-rc2) returns the MCP initialize result using snake_case field names (protocol_version, server_info) instead of the camelCase names required by the MCP specification (protocolVersion, serverInfo).
This causes strict MCP clients (e.g. Hermes Agent's native MCP client, which validates the response with pydantic v2) to reject the handshake:
2 validation errors for InitializeResult
protocolVersion
Field required [type=missing, ...]
serverInfo
Field required [type=missing, ...]
The connection itself succeeds and tools/list works correctly — only the initialize result shape is wrong, so the client aborts before discovering tools.
Root cause
In the MCP SDK (and the spec), InitializeResult is defined with camelCase JSON keys. Memayu's MCP handler serializes the response with Rust serde default field names (snake_case) without #[serde(rename_all = "camelCase")] on the result struct. The same issue likely affects other result structs that cross the MCP boundary (tool results are fine because they're wrapped in content arrays, but the capability/handshake structs need the rename).
Fix
Ensure all MCP-protocol-facing structs (especially InitializeResult and any struct that carries protocol_version/server_info/capabilities) serialize with camelCase. In Rust + the rmcp/mcp SDK, this is typically:
Add #[serde(rename_all = "camelCase")] to the result struct(s), OR
Use the SDK's provided response types (which already apply the correct rename) instead of a hand-rolled struct.
Verify against the MCP 2024-11-05 spec field names:
A strict MCP client (Hermes Agent native MCP, pydantic validation) successfully completes the handshake and discovers the 5 tools (add_memory, search_memory, list_memories, delete_memory, update_memory).
tools/list, tools/call continue to work (regression check).
Add a test that parses the initialize result against an MCP-spec-compliant schema (camelCase) so this doesn't regress.
Priority note
This blocks integrating Memayu as an MCP server into strict clients (Hermes Agent in particular). It is NOT a blocker for the direct HTTP API (which works fine) — only for MCP-based tool integration.
Implemented by PR #59 — serializes MCP InitializeResult (+ ServerInfo/ServerCapabilities/nested types) with camelCase keys per the MCP 2024-11-05 spec, so strict clients (Claude Code etc.) accept the initialize response. Includes a ser/serde + camelCase correctness test. CI green. Reviewed by g3333kbot: APPROVED.
Activity
savioruz commentedon Aug 16, 2026
Implemented by PR #59 — serializes MCP
InitializeResult(+ServerInfo/ServerCapabilities/nested types) withcamelCasekeys per the MCP 2024-11-05 spec, so strict clients (Claude Code etc.) accept theinitializeresponse. Includes a ser/serde + camelCase correctness test. CI green. Reviewed by g3333kbot: APPROVED.Add batch memory support and serialize MCP InitializeResult (#59)