github doobidoo/mcp-memory-service v8.28.1
v8.28.1 - HTTP MCP Transport JSON-RPC 2.0 Compliance Fix

latest releases: v10.40.2, v10.40.1, v10.40.0...
5 months ago

Critical Bug Fix: HTTP MCP Transport JSON-RPC 2.0 Compliance

This patch release fixes a critical bug that made the HTTP MCP transport completely unusable with Claude Code and other strict JSON-RPC 2.0 clients.

What's Fixed

HTTP Transport JSON-RPC 2.0 Compliance (#236)

  • Fixed protocol violation where the server included "error": null in successful responses
  • JSON-RPC 2.0 spec requires successful responses to omit the error field entirely (not include it as null)
  • This was causing Claude Code to reject all HTTP MCP responses with "Unrecognized key(s) in object: 'error'" errors

Technical Changes

  • Added ConfigDict(exclude_none=True) to MCPResponse Pydantic model to exclude null fields from serialization
  • Replaced deprecated .dict() with .model_dump() for Pydantic V2 compatibility
  • Moved json import to top of file per PEP 8 style guidelines
  • Enhanced documentation with JSON-RPC 2.0 spec compliance notes

Impact

Before: HTTP MCP transport was completely unusable - all responses rejected by Claude Code
After: HTTP MCP transport now works correctly with Claude Code and other strict JSON-RPC 2.0 clients

Files Modified

  • src/mcp_memory_service/web/api/mcp.py - Fixed response serialization and updated to Pydantic V2

Credits

Special thanks to @timkjr for identifying this critical issue and providing the fix!

Installation

pip install --upgrade mcp-memory-service

Or with uv:

uv pip install --upgrade mcp-memory-service

Full Changelog

See CHANGELOG.md for detailed information.


What's Changed

  • fix(mcp): comply with JSON-RPC 2.0 spec by excluding null fields (#236) by @timkjr

Full Changelog: v8.28.0...v8.28.1

Don't miss a new mcp-memory-service release

NewReleases is sending notifications on new releases.