Skip to content

Evaluate SDK middleware for history/tracing #22

Description

@olaservo

Context

TypeScript SDK PR modelcontextprotocol#1406 adds message middleware support:
modelcontextprotocol/typescript-sdk#1406

This adds sendMiddleware and receiveMiddleware options to Protocol, allowing transformation of JSON-RPC messages before sending and after receiving.

Potential Uses in Inspector V2

Use Case How Middleware Helps
History capture receiveMiddleware could capture all messages for History page without modifying client logic
Request tracing sendMiddleware could inject trace IDs for parent-child correlation
Protocol extensions Add custom capabilities to initialize (e.g., inspector metadata)
Plugin architecture Plugins could register middleware to intercept/modify messages
Debugging Inject timestamps, add debugging headers

Action Items

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2V2 refactor work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions