modelcontextprotocol / modelcontextprotocol/conformance
Wire-schema validation does not see raw-HTTP / inline-mock scenario traffic
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 127
- Forks
- 101
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 7
Description
#399 validates every JSON-RPC message that flows through the shared choke points (the SDK transport hooks and the version-aware mock server). Traffic that bypasses those choke points is never schema-checked, and the bypass surface is wider than the note in the PR body (which only mentions the client-auth express mock).
Known uninstrumented paths:
Client scenarios with hand-rolled inline HTTP mocks (requests from the client under test are not validated):
src/scenarios/client/initialize.ts— the client'sinitializerequest is never schema-checkedsrc/scenarios/client/sse-retry.tssrc/scenarios/client/elicitation-defaults.tssrc/scenarios/client/http-base.tsand its subclasses (request-metadata.ts,mrtr-client.ts,json-schema-ref-deref.ts)- the client-auth scenarios' express mock (already disclosed in #399)
Server scenarios using raw fetch or their own SDK Client (messages to/from the server under test are not validated):
src/scenarios/server/sse-polling.tsandsse-multiple-streams.ts— both build their own uninstrumentedClientsrc/scenarios/server/http-standard-headers.ts,lifecycle.ts,stateless.ts— rawfetchcalls
Observable at the CLI: running the core client suite against the typescript-sdk everything-client, only tools_call reports a wire-schema-valid check; initialize, sse-retry, and every auth scenario record no wire traffic at all.
Related cleanup while touching these files: four client-scenario inline mocks still emit the pre-#3002 top-level serverInfo on draft server/discover responses instead of _meta['io.modelcontextprotocol/serverInfo'] (request-metadata.ts, mrtr-client.ts, json-schema-ref-deref.ts, http-base.ts — src/mock-server/stateless.ts was already fixed in #403).
Suggested direction: route inline client-scenario mocks through the shared version-aware mock server where feasible, and add a small validated-fetch helper for the raw-HTTP server scenarios so intentional protocol violations can opt out explicitly.
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
Start with the listed client scenarios in src/scenarios/client/ and server scenarios in src/scenarios/server/, then run the core client suite against the TypeScript SDK everything-client to reproduce the missing wire-schema checks. Trace the shared version-aware mock server and the raw fetch or Client paths, including the inline mocks in request-metadata.ts, mrtr-client.ts, json-schema-ref-deref.ts, and http-base.ts. Done means bypass traffic is validated, intentional violations can opt out, and the draft server/discover mocks use the current _meta serverInfo shape.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100