Skip to content

fix(mcp): handle ping requests - #237

Merged
aptend merged 3 commits into
matrixorigin:mainfrom
loveRhythm1990:lr90/fix-mcp-ping-method
Aug 26, 2026
Merged

fix(mcp): handle ping requests#237
aptend merged 3 commits into
matrixorigin:mainfrom
loveRhythm1990:lr90/fix-mcp-ping-method

Conversation

@loveRhythm1990

Copy link
Copy Markdown
Collaborator

Summary

  • implement the MCP ping method for stdio and Streamable HTTP transports
  • return an empty result for ping requests and HTTP 204 for notifications
  • keep authentication and rate limiting while excluding ping heartbeats from API call logs and usage statistics
  • centralize RPC method parsing so supported methods are consistent across transports

Validation

  • cargo test -p memoria-mcp --lib
  • cargo test -p memoria-api --lib
  • cargo test -p memoria-api --test api_e2e test_mcp_ping --no-run
  • cargo clippy -p memoria-mcp --lib -- -D warnings
  • cargo clippy -p memoria-api --lib -- -D warnings

Closes #235

@aptend aptend left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the ping handling across stdio and Streamable HTTP. The request/notification responses follow JSON-RPC semantics, while authentication and rate limiting remain outside the short-circuit. Ping bypasses tool usage and API-call accounting as intended. No blocking issues; all checks are green.

@aptend
aptend merged commit 6279342 into matrixorigin:main Aug 26, 2026
5 checks passed
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.

[Bug]: MCP ping returns Method not found for protocol 2024-11-05

2 participants