Skip to content

Commit d65f737

Browse files
Merge branch 'main' into feature/ts-sdk-hooks
2 parents dacfd0a + 677511b commit d65f737

7 files changed

Lines changed: 510 additions & 15 deletions

File tree

packages/core/src/types/spec.types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ export interface ClientCapabilities {
586586
* @example Extensions — UI extension with MIME type support
587587
* {@includeCode ./examples/ClientCapabilities/extensions-ui-mime-types.json}
588588
*/
589-
extensions?: { [key: string]: object };
589+
extensions?: { [key: string]: JSONObject };
590590
}
591591

592592
/**
@@ -703,7 +703,7 @@ export interface ServerCapabilities {
703703
* @example Extensions — UI extension support
704704
* {@includeCode ./examples/ServerCapabilities/extensions-ui.json}
705705
*/
706-
extensions?: { [key: string]: object };
706+
extensions?: { [key: string]: JSONObject };
707707
}
708708

709709
/**

packages/core/src/types/types.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,11 @@ export const ClientCapabilitiesSchema = z.object({
557557
/**
558558
* Present if the client supports task creation.
559559
*/
560-
tasks: ClientTasksCapabilitySchema.optional()
560+
tasks: ClientTasksCapabilitySchema.optional(),
561+
/**
562+
* Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
563+
*/
564+
extensions: z.record(z.string(), JSONObjectSchema).optional()
561565
});
562566

563567
export const InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
@@ -635,7 +639,11 @@ export const ServerCapabilitiesSchema = z.object({
635639
/**
636640
* Present if the server supports task creation.
637641
*/
638-
tasks: ServerTasksCapabilitySchema.optional()
642+
tasks: ServerTasksCapabilitySchema.optional(),
643+
/**
644+
* Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
645+
*/
646+
extensions: z.record(z.string(), JSONObjectSchema).optional()
639647
});
640648

641649
/**
@@ -2340,7 +2348,7 @@ export class ProtocolError extends Error {
23402348
message: string,
23412349
public readonly data?: unknown
23422350
) {
2343-
super(`MCP error ${code}: ${message}`);
2351+
super(message);
23442352
this.name = 'ProtocolError';
23452353
}
23462354

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)