Skip to content

bug(mcp): JSON-RPC 2.0 / MCP compliance gaps #336

Closed

Description

@ajianaz

crates/trapfall-mcp/src/lib.rs:15-39

  • Notifications (no id, e.g. notifications/initialized) get a response with id: null; must get none.
  • Wrong codes: unknown method -32603 (should be -32601), bad params -32603 (-32602), invalid request -32600.
  • Batch arrays unsupported; jsonrpc != "2.0" not validated; initialize ignores client protocolVersion.
  • tools/call failures should be isError: true content, not protocol errors.
  • Blocking std stdin in async code; unwrap() at line 24; key slicing &new_key[..8] (lines ~402, 418-422) can panic on short/multibyte keys.

Strict MCP clients may break. Related: #215.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:mediumP2 - Fix in next batch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions