Skip to content

Commit 166f52c

Browse files
committed
Merge branch 'aaronpk/ext-auth' of https://github.com/modelcontextprotocol/modelcontextprotocol into aaronpk/ext-auth
2 parents 4e3e8d1 + a6f24f1 commit 166f52c

File tree

22 files changed

+4611
-499
lines changed

22 files changed

+4611
-499
lines changed

MAINTAINERS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ This document lists current maintainers in the Model Context Protocol project.
9595
- [Adam Jones](https://github.com/domdomegg)
9696
- [Radoslav (Rado) Dimitrov](https://github.com/rdimitrov)
9797

98+
### MCPB (Model Context Protocol Bundle)
99+
100+
- [Alexander Sklar](https://github.com/asklar)
101+
- [Adam Jones](https://github.com/domdomegg)
102+
- [Joan Xie](https://github.com/joan-anthropic)
103+
98104
### Reference Servers
99105

100106
- [Ola Hungerford](https://github.com/olaservo)

docs/docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@
231231
"pages": [
232232
"specification/draft/basic/utilities/cancellation",
233233
"specification/draft/basic/utilities/ping",
234-
"specification/draft/basic/utilities/progress"
234+
"specification/draft/basic/utilities/progress",
235+
"specification/draft/basic/utilities/tasks"
235236
]
236237
}
237238
]

docs/docs/learn/architecture.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ MCP also defines primitives that _clients_ can expose. These primitives allow MC
132132

133133
For more details about client primitives see [client concepts](./client-concepts).
134134

135+
Besides server and client primitives, the protocol offers cross-cutting utility primitives that augment how requests are executed:
136+
137+
- **Tasks (Experimental)**: Durable execution wrappers that enable deferred result retrieval and status tracking for MCP requests (e.g., expensive computations, workflow automation, batch processing, multi-step operations)
138+
135139
#### Notifications
136140

137141
The protocol supports real-time notifications to enable dynamic updates between servers and clients. For example, when a server's available tools change—such as when new functionality becomes available or existing tools are modified—the server can send tool update notifications to inform connected clients about these changes. Notifications are sent as JSON-RPC 2.0 notification messages (without expecting a response) and enable MCP servers to provide real-time updates to connected clients.

docs/legacy/concepts/architecture.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ enum ErrorCode {
201201
MethodNotFound = -32601,
202202
InvalidParams = -32602,
203203
InternalError = -32603,
204+
205+
// MCP-specific error codes in the range [-32000, -32099]
206+
UrlElicitationRequired = -32042,
204207
}
205208
```
206209

docs/specification/draft/basic/authorization.mdx

Lines changed: 210 additions & 37 deletions
Large diffs are not rendered by default.

docs/specification/draft/basic/index.mdx

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ and instead retrieve credentials from the environment.
104104
Additionally, clients and servers **MAY** negotiate their own custom authentication and
105105
authorization strategies.
106106

107-
For further discussions and contributions to the evolution of MCPs auth mechanisms, join
107+
For further discussions and contributions to the evolution of MCP's auth mechanisms, join
108108
us in
109109
[GitHub Discussions](https://github.com/modelcontextprotocol/specification/discussions)
110110
to help shape the future of the protocol!
@@ -120,9 +120,61 @@ There is also a
120120
which is automatically generated from the TypeScript source of truth, for use with
121121
various automated tooling.
122122

123-
### General fields
123+
## JSON Schema Usage
124124

125-
#### `_meta`
125+
The Model Context Protocol uses JSON Schema for validation throughout the protocol. This section clarifies how JSON Schema should be used within MCP messages.
126+
127+
### Schema Dialect
128+
129+
MCP supports JSON Schema with the following rules:
130+
131+
1. **Default dialect**: When a schema does not include a `$schema` field, it defaults to JSON Schema 2020-12 (`https://json-schema.org/draft/2020-12/schema`)
132+
1. **Explicit dialect**: Schemas MAY include a `$schema` field to specify a different dialect
133+
1. **Supported dialects**: Implementations MUST support at least 2020-12 and SHOULD document which additional dialects they support
134+
1. **Recommendation**: Implementors are RECOMMENDED to use JSON Schema 2020-12.
135+
136+
### Example Usage
137+
138+
#### Default dialect (2020-12):
139+
140+
```json
141+
{
142+
"type": "object",
143+
"properties": {
144+
"name": { "type": "string" },
145+
"age": { "type": "integer", "minimum": 0 }
146+
},
147+
"required": ["name"]
148+
}
149+
```
150+
151+
#### Explicit dialect (draft-07):
152+
153+
```json
154+
{
155+
"$schema": "http://json-schema.org/draft-07/schema#",
156+
"type": "object",
157+
"properties": {
158+
"name": { "type": "string" },
159+
"age": { "type": "integer", "minimum": 0 }
160+
},
161+
"required": ["name"]
162+
}
163+
```
164+
165+
### Implementation Requirements
166+
167+
- Clients and servers **MUST** support JSON Schema 2020-12 for schemas without an explicit `$schema` field
168+
- Clients and servers **MUST** validate schemas according to their declared or default dialect. They **MUST** handle unsupported dialects gracefully by returning an appropriate error indicating the dialect is not supported.
169+
- Clients and servers **SHOULD** document which schema dialects they support
170+
171+
### Schema Validation
172+
173+
- Schemas **MUST** be valid according to their declared or default dialect
174+
175+
## General fields
176+
177+
### `_meta`
126178

127179
The `_meta` property/parameter is reserved by MCP to allow clients and servers
128180
to attach additional metadata to their interactions.

docs/specification/draft/basic/lifecycle.mdx

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,26 @@ The client **MUST** initiate this phase by sending an `initialize` request conta
6464
"listChanged": true
6565
},
6666
"sampling": {},
67-
"elicitation": {}
67+
"elicitation": {
68+
"form": {},
69+
"url": {}
70+
},
71+
"tasks": {
72+
"requests": {
73+
"elicitation": {
74+
"create": {}
75+
},
76+
"sampling": {
77+
"createMessage": {}
78+
}
79+
}
80+
}
6881
},
6982
"clientInfo": {
7083
"name": "ExampleClient",
7184
"title": "Example Client Display Name",
7285
"version": "1.0.0",
86+
"description": "An example MCP client application",
7387
"icons": [
7488
{
7589
"src": "https://example.com/icon.png",
@@ -102,12 +116,22 @@ The server **MUST** respond with its own capabilities and information:
102116
},
103117
"tools": {
104118
"listChanged": true
119+
},
120+
"tasks": {
121+
"list": {},
122+
"cancel": {},
123+
"requests": {
124+
"tools": {
125+
"call": {}
126+
}
127+
}
105128
}
106129
},
107130
"serverInfo": {
108131
"name": "ExampleServer",
109132
"title": "Example Server Display Name",
110133
"version": "1.0.0",
134+
"description": "An example MCP server providing tools and resources",
111135
"icons": [
112136
{
113137
"src": "https://example.com/server-icon.svg",
@@ -166,18 +190,20 @@ available during the session.
166190

167191
Key capabilities include:
168192

169-
| Category | Capability | Description |
170-
| -------- | -------------- | ------------------------------------------------------------------------------------ |
171-
| Client | `roots` | Ability to provide filesystem [roots](/specification/draft/client/roots) |
172-
| Client | `sampling` | Support for LLM [sampling](/specification/draft/client/sampling) requests |
173-
| Client | `elicitation` | Support for server [elicitation](/specification/draft/client/elicitation) requests |
174-
| Client | `experimental` | Describes support for non-standard experimental features |
175-
| Server | `prompts` | Offers [prompt templates](/specification/draft/server/prompts) |
176-
| Server | `resources` | Provides readable [resources](/specification/draft/server/resources) |
177-
| Server | `tools` | Exposes callable [tools](/specification/draft/server/tools) |
178-
| Server | `logging` | Emits structured [log messages](/specification/draft/server/utilities/logging) |
179-
| Server | `completions` | Supports argument [autocompletion](/specification/draft/server/utilities/completion) |
180-
| Server | `experimental` | Describes support for non-standard experimental features |
193+
| Category | Capability | Description |
194+
| -------- | -------------- | ---------------------------------------------------------------------------------------- |
195+
| Client | `roots` | Ability to provide filesystem [roots](/specification/draft/client/roots) |
196+
| Client | `sampling` | Support for LLM [sampling](/specification/draft/client/sampling) requests |
197+
| Client | `elicitation` | Support for server [elicitation](/specification/draft/client/elicitation) requests |
198+
| Client | `tasks` | Support for [task-augmented](/specification/draft/basic/utilities/tasks) client requests |
199+
| Client | `experimental` | Describes support for non-standard experimental features |
200+
| Server | `prompts` | Offers [prompt templates](/specification/draft/server/prompts) |
201+
| Server | `resources` | Provides readable [resources](/specification/draft/server/resources) |
202+
| Server | `tools` | Exposes callable [tools](/specification/draft/server/tools) |
203+
| Server | `logging` | Emits structured [log messages](/specification/draft/server/utilities/logging) |
204+
| Server | `completions` | Supports argument [autocompletion](/specification/draft/server/utilities/completion) |
205+
| Server | `tasks` | Support for [task-augmented](/specification/draft/basic/utilities/tasks) server requests |
206+
| Server | `experimental` | Describes support for non-standard experimental features |
181207

182208
Capability objects can describe sub-capabilities like:
183209

docs/specification/draft/basic/utilities/cancellation.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ notification containing:
3434
1. Cancellation notifications **MUST** only reference requests that:
3535
- Were previously issued in the same direction
3636
- Are believed to still be in-progress
37-
2. The `initialize` request **MUST NOT** be cancelled by clients
38-
3. Receivers of cancellation notifications **SHOULD**:
37+
1. The `initialize` request **MUST NOT** be cancelled by clients
38+
1. For [task-augmented requests](./tasks), the `tasks/cancel` request **MUST** be used instead of the `notifications/cancelled` notification. Tasks have their own dedicated cancellation mechanism that returns the final task state.
39+
1. Receivers of cancellation notifications **SHOULD**:
3940
- Stop processing the cancelled request
4041
- Free associated resources
4142
- Not send a response for the cancelled request
42-
4. Receivers **MAY** ignore cancellation notifications if:
43+
1. Receivers **MAY** ignore cancellation notifications if:
4344
- The referenced request is unknown
4445
- Processing has already completed
4546
- The request cannot be cancelled
46-
5. The sender of the cancellation notification **SHOULD** ignore any response to the
47+
1. The sender of the cancellation notification **SHOULD** ignore any response to the
4748
request that arrives afterward
4849

4950
## Timing Considerations

docs/specification/draft/basic/utilities/progress.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ The receiver **MAY** then send progress notifications containing:
6868
- Send notifications at whatever frequency they deem appropriate
6969
- Omit the total value if unknown
7070

71+
3. For [task-augmented requests](./tasks), the `progressToken` provided in the original request **MUST** continue to be used for progress notifications throughout the task's lifetime, even after the `CreateTaskResult` has been returned. The progress token remains valid and associated with the task until the task reaches a terminal status.
72+
- Progress notifications for tasks **MUST** use the same `progressToken` that was provided in the initial task-augmented request
73+
- Progress notifications for tasks **MUST** stop after the task reaches a terminal status (`completed`, `failed`, or `cancelled`)
74+
7175
```mermaid
7276
sequenceDiagram
7377
participant Sender

0 commit comments

Comments
 (0)