Skip to content

Commit 6f4714c

Browse files
committed
Update authorization.mdx
1 parent e4d43cb commit 6f4714c

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

docs/specification/draft/basic/authorization.mdx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,19 +178,36 @@ sequenceDiagram
178178
A->>C: Client Credentials
179179
end
180180
181-
Note over C: Generate PKCE parameters
182-
C->>B: Open browser with authorization URL + code_challenge
183-
B->>A: Authorization request
181+
Note over C: Generate PKCE parameters<br/>Include resource parameter
182+
C->>B: Open browser with authorization URL + code_challenge + resource
183+
B->>A: Authorization request with resource parameter
184184
Note over A: User authorizes
185185
A->>B: Redirect to callback with authorization code
186186
B->>C: Authorization code callback
187-
C->>A: Token request + code_verifier
187+
C->>A: Token request + code_verifier + resource
188188
A->>C: Access token (+ refresh token)
189189
C->>M: MCP request with access token
190190
M-->>C: MCP response
191191
Note over C,M: MCP communication continues with valid token
192192
```
193193

194+
#### Resource Parameter Implementation
195+
196+
MCP clients **MUST** implement Resource Indicators for OAuth 2.0 as defined in [RFC 8707](https://www.rfc-editor.org/rfc/rfc8707.html)
197+
to explicitly specify the target resource for which the token is being requested. The `resource` parameter:
198+
199+
1. **MUST** be included in both authorization requests and token requests.
200+
2. **MUST** identify the MCP server that the client intends to use the token with.
201+
3. **MUST** use the canonical URI of the MCP server as defined in [RFC 8707 Section 2](https://www.rfc-editor.org/rfc/rfc8707.html#name-access-token-request).
202+
203+
For example, if accessing an MCP server at `https://mcp.example.com`, the authorization request would include:
204+
205+
```
206+
&resource=https%3A%2F%2Fmcp.example.com
207+
```
208+
209+
MCP clients **MUST** send this parameter regardless of whether authorization servers support it.
210+
194211
### Access Token Usage
195212

196213
#### Token Requirements
@@ -317,4 +334,5 @@ MCP servers **MUST** only accept tokens specifically intended for themselves.
317334

318335
If the MCP server makes requests to upstream APIs, it may act as an OAuth client to them. The access token used at the upstream API is a seperate token, issued by the upstream authorization server. The MCP server **MUST NOT** pass through the token it received from the MCP client.
319336

320-
If the authorization server supports the `resource` parameter, it is recommended that implementers follow [RFC 8707](https://www.rfc-editor.org/rfc/rfc8707.html) to prevent token misuse.
337+
MCP clients **MUST** implement and use the `resource` parameter as defined in [RFC 8707 - Resource Indicators for OAuth 2.0](https://www.rfc-editor.org/rfc/rfc8707.html) to explicitly specify the target resource for which the token is being requested.
338+
This ensures that access tokens are bound to their intended resources and cannot be misused across different services.

0 commit comments

Comments
 (0)