You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/specification/draft/basic/authorization.mdx
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,19 +178,36 @@ sequenceDiagram
178
178
A->>C: Client Credentials
179
179
end
180
180
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
184
184
Note over A: User authorizes
185
185
A->>B: Redirect to callback with authorization code
186
186
B->>C: Authorization code callback
187
-
C->>A: Token request + code_verifier
187
+
C->>A: Token request + code_verifier + resource
188
188
A->>C: Access token (+ refresh token)
189
189
C->>M: MCP request with access token
190
190
M-->>C: MCP response
191
191
Note over C,M: MCP communication continues with valid token
192
192
```
193
193
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
+
194
211
### Access Token Usage
195
212
196
213
#### Token Requirements
@@ -317,4 +334,5 @@ MCP servers **MUST** only accept tokens specifically intended for themselves.
317
334
318
335
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.
319
336
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