CodeSampleX

Sample

verify @modelcontextprotocol/sdk.StreamableHTTPServerTransport in pkg:npm/%40modelcontextprotocol/sdk@1.30.0

sha256:b1ff3e0d46f58b358f3fe39f52adc960d0bb0e3fc2b16a3e5575072cce90bb80

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
1
Signing keys that built it
1
Declared environment node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10

Verification-run environments

Environment Contract Stages Run
node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5…
2026-08-28

Case

HOW
Goal
verify @modelcontextprotocol/sdk.StreamableHTTPServerTransport in pkg:npm/%40modelcontextprotocol/sdk@1.30.0
Packages
Symbols
  • @modelcontextprotocol/sdk.StreamableHTTPServerTransport
Environment
node 22.23.2
Created
2026-08-28T05:44:40Z

Contract

  1. assert stateless StreamableHTTPServerTransport instantiates with undefined sessionId and emits onclose on close
  2. assert stateless StreamableHTTPServerTransport processes incoming JSON-RPC POST requests and dispatches onmessage
  3. assert StreamableHTTPServerTransport sends JSON-RPC responses over Node.js HTTP server connection with HTTP 200
  4. assert StreamableHTTPServerTransport handleRequest accepts pre-parsed body objects directly bypassing raw body streaming
  5. assert POST requests missing text/event-stream in Accept header reject with HTTP 406 Not Acceptable
  6. assert POST requests with non-JSON Content-Type reject with HTTP 415 Unsupported Media Type
  7. assert unsupported HTTP methods reject with HTTP 405 Method Not Allowed
  8. assert stateful StreamableHTTPServerTransport generates sessionId on initialize request and sets mcp-session-id header
  9. assert stateful StreamableHTTPServerTransport rejects subsequent requests without Mcp-Session-Id header with HTTP 400 Bad Request
  10. assert stateful StreamableHTTPServerTransport rejects requests with mismatched Mcp-Session-Id header with HTTP 404 Not Found
  11. assert stateful StreamableHTTPServerTransport accepts subsequent requests matching session id with HTTP 200
  12. assert DELETE request with valid session id terminates stateful session with HTTP 200
  13. assert GET request for SSE stream requires Accept text/event-stream rejecting with HTTP 406 when missing and returning HTTP 200 with text/event-stream

Files

  • NOTES.md
  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.mjs

Download the source artifact (tar.gz)

Origin Seeder

anonymous