Expand description
MCP message taxonomy (spec v2025-11-25).
See PIPELINE.md §Types. Method identity
is a cheap enum — one string match per message. Grouping by feature
area (Tools, Resources, …) matches the spec table and lets
middlewares pattern-match at the granularity they need.
Every method enum has an Unknown(String) tail variant so non-spec
methods forward unchanged instead of failing classification.
Structs§
- McpMessage
- Shallow envelope paired with its classification. Used inside
McpRequest(client direction) andResponse::McpBuffered(server direction).
Enums§
- Client
Kind - Kind of message the client is sending. Computed at intake from
method+id+result/errorpresence. - Client
Method - Client
Notif Method - Completion
Method - Lifecycle
Method - Logging
Method - Message
Kind - Direction discriminator for an
McpMessage. - Prompts
Method - Resources
Method - Server
Kind - Kind of message the server is sending. Appears in response bodies (streamable-HTTP chunks or legacy SSE frames).
- Server
Method - Server
Notif Method - Tasks
Method - Task lifecycle methods. Used by both directions (client asks the server about tasks; server can also request task state from the client).
- Tools
Method
Functions§
- classify_
client - Classify a client→server envelope. Assumes the envelope came from
JsonRpcEnvelope::parse, which already rejected malformed shapes. - classify_
server - Classify a server→client envelope.