Skip to content

Commit 9aed95a

Browse files
feat: add auth-test-server for OAuth conformance testing (#1384)
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
1 parent a7c7896 commit 9aed95a

File tree

2 files changed

+437
-4
lines changed

2 files changed

+437
-4
lines changed

test/conformance/README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,24 @@ npx @modelcontextprotocol/conformance server \
6060

6161
## Files
6262

63-
- `everything-client.ts` - Client that handles all client conformance scenarios
64-
- `everything-server.ts` - Server that implements all server conformance features
65-
- `helpers/` - Shared utilities for conformance tests
63+
- `src/everythingClient.ts` - Client that handles all client conformance scenarios
64+
- `src/everythingServer.ts` - Server that implements all server conformance features
65+
- `src/authTestServer.ts` - Server with OAuth authentication for auth conformance tests
66+
- `src/helpers/` - Shared utilities for conformance tests
67+
- `scripts/` - Conformance test runner scripts
6668

67-
Scripts are in `scripts/` at the repo root.
69+
## Auth Test Server
70+
71+
The `authTestServer.ts` is designed for testing server-side OAuth implementation. It requires an authorization server URL and validates tokens via introspection.
72+
73+
```bash
74+
# Start with a fake auth server
75+
MCP_CONFORMANCE_AUTH_SERVER_URL=http://localhost:3000 \
76+
npx tsx src/authTestServer.ts
77+
```
78+
79+
The server:
80+
81+
- Requires Bearer token authentication on all MCP endpoints
82+
- Validates tokens via the AS's introspection endpoint (RFC 7662)
83+
- Serves Protected Resource Metadata at `/.well-known/oauth-protected-resource`

0 commit comments

Comments
 (0)