| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
Conformance Tests / client-conformance (push) Has been cancelled
Conformance Tests / server-conformance (push) Has been cancelled
Deploy Docs / deploy-docs (push) Has been cancelled
Examples / examples (build + e2e) (push) Has been cancelled
/ build (push) Has been cancelled
/ test (20) (push) Has been cancelled
/ test (22) (push) Has been cancelled
/ test (24) (push) Has been cancelled
/ test-e2e (20) (push) Has been cancelled
/ test-e2e (22) (push) Has been cancelled
/ test-e2e (24) (push) Has been cancelled
/ test-runtimes (bun, 1.x) (push) Has been cancelled
/ test-runtimes (deno, v2.x) (push) Has been cancelled
Publish Any Commit / pkg-publish (push) Has been cancelled
Release / Version (push) Has been cancelled
Release / Publish (push) Has been cancelled
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> |
||
| .. | ||
| scripts | ||
| src | ||
| CHANGELOG.md | ||
| eslint.config.mjs | ||
| expected-failures.2026-07-28.yaml | ||
| expected-failures.yaml | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vitest.config.js | ||
Conformance Tests
This directory contains conformance test implementations for the TypeScript MCP SDK.
@modelcontextprotocol/conformanceis pinned to an exact version (no^range) inpackage.json. New conformance releases are adopted by deliberately bumping the pin and updatingexpected-failures.yamlfor any new scenarios/checks in the same change.
Client Conformance Tests
Tests the SDK's client implementation against a conformance test server.
# Run all client tests
pnpm run test:conformance:client:all
# Run specific suite
pnpm run test:conformance:client -- --suite auth
# Run single scenario
pnpm run test:conformance:client -- --scenario auth/basic-cimd
Server Conformance Tests
Tests the SDK's server implementation by running a conformance server.
# Run all active server tests
pnpm run test:conformance:server
# Run all server tests (including pending)
pnpm run test:conformance:server:all
Local Development
Running Tests Against Local Conformance Repo
Link the local conformance package:
cd ~/code/mcp/typescript-sdk
pnpm link ~/code/mcp/conformance
Then run tests as above.
Debugging Server Tests
Start the server manually:
pnpm run test:conformance:server:run
In another terminal, run specific tests:
npx @modelcontextprotocol/conformance server \
--url http://localhost:3000/mcp \
--scenario server-initialize
Note: pnpm run test:conformance:server always starts (and tests) its own server, and refuses to run while anything is still listening on its port. Stop the manually started server first, or keep using the direct --url invocation above against it.
Files
src/everythingClient.ts- Client that handles all client conformance scenariossrc/everythingServer.ts- Server that implements all server conformance featuressrc/authTestServer.ts- Server with OAuth authentication for auth conformance testssrc/helpers/- Shared utilities for conformance testsscripts/- Conformance test runner scripts
Auth Test Server
The authTestServer.ts is designed for testing server-side OAuth implementation. It requires an authorization server URL and validates tokens via introspection.
# Start with a fake auth server
MCP_CONFORMANCE_AUTH_SERVER_URL=http://localhost:3000 \
npx tsx src/authTestServer.ts
The server:
- Requires Bearer token authentication on all MCP endpoints
- Validates tokens via the AS's introspection endpoint (RFC 7662)
- Serves Protected Resource Metadata at
/.well-known/oauth-protected-resource