@@ -50,25 +50,32 @@ while maintaining simplicity:
50
50
Server Metadata ([ RFC8414] ( https://datatracker.ietf.org/doc/html/rfc8414 ) ). Servers
51
51
that do not support Authorization Server Metadata ** MUST** follow the default URI
52
52
schema.
53
-
54
- OAuth specifies different flows or grant types, which in essence, are different ways of obtaining an access token.
55
- Each of these targets different use cases and scenarios.
56
53
57
- MCP servers ** SHOULD ** support the OAuth grant types that better align with the intended audience. For instance:
54
+ ### 2.1.1 OAuth Grant Types
58
55
59
- 1 . Authorization Code: Useful when the client is acting on behalf of a (human) end user.
60
- * For instance, an agent calls an MCP tool implemented by a SaaS system.
61
- 2 . System to system: The client is another application (not a human)
62
- * For instance, an agent calls a secure MCP tool to check inventory at a specific store. No need to impersonate the end user.
56
+ OAuth specifies different flows or grant types, which are different ways of obtaining an
57
+ access token. Each of these targets different use cases and scenarios.
63
58
59
+ MCP servers ** SHOULD** support the OAuth grant types that best align with the intended
60
+ audience. For instance:
64
61
65
- ### 2.2 Example: OAuth 2.1 flow for the Authorization Code Grant Type (User to system)
62
+ 1 . Authorization Code: useful when the client is acting on behalf of a (human) end user.
63
+ - For instance, an agent calls an MCP tool implemented by a SaaS system.
64
+ 2 . Client Credentials: the client is another application (not a human)
65
+ - For instance, an agent calls a secure MCP tool to check inventory at a specific
66
+ store. No need to impersonate the end user.
66
67
67
- ** NOTE** : For simplicity’s sake, the following examples will assume the MCP server to also function as the authorization server. However,
68
- in real implementations the authorization server may be deployed as its own distinct service.
68
+ ### 2.2 Example: authorization code grant
69
69
70
- A human user completes the OAuth flow through a web browser, obtaining an access token that identifies them personally and allows the
71
- client to act on their behalf.
70
+ This demonstrates the OAuth 2.1 flow for the authorization code grant type, used for user
71
+ auth.
72
+
73
+ ** NOTE** : The following example assumes the MCP server is also functioning as the
74
+ authorization server. However, the authorization server may be deployed as its own
75
+ distinct service.
76
+
77
+ A human user completes the OAuth flow through a web browser, obtaining an access token
78
+ that identifies them personally and allows the client to act on their behalf.
72
79
73
80
When authorization is required and not yet proven by the client, servers ** MUST** respond
74
81
with _ HTTP 401 Unauthorized_ .
@@ -99,7 +106,7 @@ sequenceDiagram
99
106
Note over C,M: Begin standard MCP message exchange
100
107
```
101
108
102
- ### 2.2 Server Metadata Discovery
109
+ ### 2.3 Server Metadata Discovery
103
110
104
111
For server capability discovery:
105
112
0 commit comments