Skip to content

Commit 2577216

Browse files
committed
Merge branch 'main' into pr/221
2 parents 803c3ce + 96ac657 commit 2577216

File tree

8 files changed

+43
-19
lines changed

8 files changed

+43
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
This repo contains the specification and protocol schema for the Model Context Protocol.
44

5-
The schema is [defined in TypeScript](schema/2024-11-05/schema.ts) first, but
6-
[made available as JSON Schema](schema/2024-11-05/schema.json) as well, for wider
5+
The schema is [defined in TypeScript](schema/2025-03-26/schema.ts) first, but
6+
[made available as JSON Schema](schema/2025-03-26/schema.json) as well, for wider
77
compatibility.
88

99
## Contributing

docs/specification/2024-11-05/server/utilities/pagination.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ data sets.
1717
Pagination in MCP uses an opaque cursor-based approach, instead of numbered pages.
1818

1919
- The **cursor** is an opaque string token, representing a position in the result set
20-
- **Page size** is determined by the server, and **MAY NOT** be fixed
20+
- **Page size** is determined by the server, and clients **MUST NOT** assume a fixed page
21+
size
2122

2223
## Response Format
2324

docs/specification/2025-03-26/basic/authorization.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Clients **MUST** first attempt to discover endpoints via the metadata document b
172172
falling back to default paths. When using default paths, all other protocol requirements
173173
remain unchanged.
174174

175-
### 2.3 Dynamic Client Registration
175+
### 2.4 Dynamic Client Registration
176176

177177
MCP clients and servers **SHOULD** support the
178178
[OAuth 2.0 Dynamic Client Registration Protocol](https://datatracker.ietf.org/doc/html/rfc7591)
@@ -195,7 +195,7 @@ these servers, MCP clients will have to either:
195195
OAuth client themselves (e.g., through a configuration interface hosted by the
196196
server).
197197

198-
### 2.4 Authorization Flow Steps
198+
### 2.5 Authorization Flow Steps
199199

200200
The complete Authorization flow proceeds as follows:
201201

@@ -228,7 +228,7 @@ sequenceDiagram
228228
C->>M: API Requests with Access Token
229229
```
230230

231-
#### 2.4.1 Decision Flow Overview
231+
#### 2.5.1 Decision Flow Overview
232232

233233
```mermaid
234234
flowchart TD
@@ -252,9 +252,9 @@ flowchart TD
252252
N --> O[Use Access Token]
253253
```
254254

255-
### 2.5 Access Token Usage
255+
### 2.6 Access Token Usage
256256

257-
#### 2.5.1 Token Requirements
257+
#### 2.6.1 Token Requirements
258258

259259
Access token handling **MUST** conform to
260260
[OAuth 2.1 Section 5](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-12#section-5)
@@ -280,7 +280,7 @@ Host: mcp.example.com
280280
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
281281
```
282282

283-
#### 2.5.2 Token Handling
283+
#### 2.6.2 Token Handling
284284

285285
Resource servers **MUST** validate access tokens as described in
286286
[Section 5.2](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-12#section-5.2).
@@ -289,7 +289,7 @@ If validation fails, servers **MUST** respond according to
289289
error handling requirements. Invalid or expired tokens **MUST** receive a HTTP 401
290290
response.
291291

292-
### 2.6 Security Considerations
292+
### 2.7 Security Considerations
293293

294294
The following security requirements **MUST** be implemented:
295295

@@ -299,7 +299,7 @@ The following security requirements **MUST** be implemented:
299299
4. Servers **MUST** validate redirect URIs to prevent open redirect vulnerabilities
300300
5. Redirect URIs **MUST** be either localhost URLs or HTTPS URLs
301301

302-
### 2.7 Error Handling
302+
### 2.8 Error Handling
303303

304304
Servers **MUST** return appropriate HTTP status codes for authorization errors:
305305

@@ -309,22 +309,22 @@ Servers **MUST** return appropriate HTTP status codes for authorization errors:
309309
| 403 | Forbidden | Invalid scopes or insufficient permissions |
310310
| 400 | Bad Request | Malformed authorization request |
311311

312-
### 2.8 Implementation Requirements
312+
### 2.9 Implementation Requirements
313313

314314
1. Implementations **MUST** follow OAuth 2.1 security best practices
315315
2. PKCE is **REQUIRED** for all clients
316316
3. Token rotation **SHOULD** be implemented for enhanced security
317317
4. Token lifetimes **SHOULD** be limited based on security requirements
318318

319-
### 2.9 Third-Party Authorization Flow
319+
### 2.10 Third-Party Authorization Flow
320320

321-
#### 2.9.1 Overview
321+
#### 2.10.1 Overview
322322

323323
MCP servers **MAY** support delegated authorization through third-party authorization
324324
servers. In this flow, the MCP server acts as both an OAuth client (to the third-party
325325
auth server) and an OAuth authorization server (to the MCP client).
326326

327-
#### 2.9.2 Flow Description
327+
#### 2.10.2 Flow Description
328328

329329
The third-party authorization flow comprises these steps:
330330

@@ -358,7 +358,7 @@ sequenceDiagram
358358
M->>C: MCP access token
359359
```
360360

361-
#### 2.9.3 Session Binding Requirements
361+
#### 2.10.3 Session Binding Requirements
362362

363363
MCP servers implementing third-party authorization **MUST**:
364364

@@ -367,7 +367,7 @@ MCP servers implementing third-party authorization **MUST**:
367367
3. Implement appropriate token lifecycle management
368368
4. Handle third-party token expiration and renewal
369369

370-
#### 2.9.4 Security Considerations
370+
#### 2.10.4 Security Considerations
371371

372372
When implementing third-party authorization, servers **MUST**:
373373

docs/specification/2025-03-26/server/prompts.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ model.
3131
Servers that support prompts **MUST** declare the `prompts` capability during
3232
[initialization]({{< ref "../basic/lifecycle#initialization" >}}):
3333

34-
3534
```json
3635
{
3736
"capabilities": {

docs/specification/2025-03-26/server/utilities/pagination.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ data sets.
1717
Pagination in MCP uses an opaque cursor-based approach, instead of numbered pages.
1818

1919
- The **cursor** is an opaque string token, representing a position in the result set
20-
- **Page size** is determined by the server, and **MAY NOT** be fixed
20+
- **Page size** is determined by the server, and clients **MUST NOT** assume a fixed page
21+
size
2122

2223
## Response Format
2324

schema/2025-03-26/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,6 +1553,10 @@
15531553
"description": "A human-readable name for this resource.\n\nThis can be used by clients to populate UI elements.",
15541554
"type": "string"
15551555
},
1556+
"size": {
1557+
"description": "The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.\n\nThis can be used by Hosts to display file sizes and estimate context window usage.",
1558+
"type": "integer"
1559+
},
15561560
"uri": {
15571561
"description": "The URI of this resource.",
15581562
"format": "uri",

schema/2025-03-26/schema.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,13 @@ export interface Resource {
473473
* Optional annotations for the client.
474474
*/
475475
annotations?: Annotations;
476+
477+
/**
478+
* The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
479+
*
480+
* This can be used by Hosts to display file sizes and estimate context window usage.
481+
*/
482+
size?: number;
476483
}
477484

478485
/**

site/hugo.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,15 @@ menu:
9595
name: "TypeScript SDK ↗"
9696
url: "https://github.com/modelcontextprotocol/typescript-sdk"
9797
weight: 5
98+
- identifier: javaSdk
99+
name: "Java SDK ↗"
100+
url: "https://github.com/modelcontextprotocol/java-sdk"
101+
weight: 6
102+
- identifier: kotlinSdk
103+
name: "Kotlin SDK ↗"
104+
url: "https://github.com/modelcontextprotocol/kotlin-sdk"
105+
weight: 7
106+
- identifier: csharpSdk
107+
name: "C# SDK ↗"
108+
url: "https://github.com/modelcontextprotocol/csharp-sdk"
109+
weight: 8

0 commit comments

Comments
 (0)