modelcontextprotocol / modelcontextprotocol/inspector
Evaluate SDK middleware for protocol/tracing
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 1.5k
- Avg merge
- 6h 17m
- Merged PRs (30d)
- 151
Description
Context
TypeScript SDK PR #1406 adds message middleware support:
https://github.com/modelcontextprotocol/typescript-sdk/pull/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 |
|---|---|
| Protocol capture | receiveMiddleware could capture all messages for Protocol 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
- Monitor PR #1406 for merge
- When merged, evaluate integration into
McpContext.tsx - Consider for request trace model (linking tool calls to sampling requests)
- Evaluate for plugin hooks in client features PR
Related
- #1022 (Mantine UI) - current McpContext uses direct SDK connection
- #1011 (client features UX spec) - request trace model spec
- #983 (data spec) - history/logging architecture
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review TypeScript SDK PR #1406 for the sendMiddleware and receiveMiddleware APIs, then inspect the current connection handling in McpContext.tsx. Compare the middleware options with the request trace model in #1011 and the history/logging architecture in #983. Done means documenting whether Inspector V2 should integrate middleware for capture, tracing, protocol extensions, or plugin hooks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100