@@ -135,43 +135,27 @@ remain unchanged.
135
135
136
136
### 2.3 Dynamic Client Registration
137
137
138
- MCP authorization makes use of the
138
+ MCP clients and servers ** SHOULD ** support the
139
139
[ OAuth 2.0 Dynamic Client Registration Protocol] ( https://datatracker.ietf.org/doc/html/rfc7591 )
140
- to allow MCP clients to obtain OAuth client IDs without user interaction.
141
-
142
- - MCP clients ** SHOULD** support
143
- [ OAuth 2.0 Dynamic Client Registration Protocol] ( https://datatracker.ietf.org/doc/html/rfc7591 )
144
- - MCP servers with non-localhost redirect URIs ** SHOULD** support Dynamic Client
145
- Registration.
146
- - MCP servers with localhost redirect URIs ** MAY** support Dynamic Client Registration.
147
-
148
- Note that it is not required to support Dynamic Client Registration. MCP clients that do
149
- not support Dynamic Client Registration need to provide alternative ways to obtain a
150
- client id (and if applicable client secret).
151
-
152
- #### 2.3.1 Localhost Redirect URIs
153
-
154
- When using localhost redirect URIs (http://localhost:{port} or http://127.0.0.1:{port} ),
155
- clients:
156
-
157
- - Dynamic registration is ** OPTIONAL** (a client ID is not required).
158
- - ** MAY** proceed directly to authorization.
159
- - ** SHOULD** be considered public clients and not store any clients secrets.
160
-
161
- This exception for localhost is explicitly supported by OAuth 2.1 for public clients and
162
- provides a secure flow through the combination of PKCE and localhost-only redirects.
163
-
164
- #### 2.3.2 Non-Localhost Redirect URIs
165
-
166
- For all other redirect URIs, MCP clients and servers ** SHOULD** support dynamic client
167
- registration. This provides a standardized way for clients to automatically register with
168
- new servers, which is crucial for MCP because:
140
+ to allow MCP clients to obtain OAuth client IDs without user interaction. This provides a
141
+ standardized way for clients to automatically register with new servers, which is crucial
142
+ for MCP because:
169
143
170
144
- Clients cannot know all possible servers in advance
171
145
- Manual registration would create friction for users
172
146
- It enables seamless connection to new servers
173
147
- Servers can implement their own registration policies
174
148
149
+ Any MCP servers that _ do not_ support Dynamic Client Registration need to provide
150
+ alternative ways to obtain a client ID (and, if applicable, client secret). For one of
151
+ these servers, MCP clients will have to either:
152
+
153
+ 1 . Hardcode a client ID (and, if applicable, client secret) specifically for that MCP
154
+ server, or
155
+ 2 . Present a UI to users that allows them to enter these details, after registering an
156
+ OAuth client themselves (e.g., through a configuration interface hosted by the
157
+ server).
158
+
175
159
### 2.4 Authorization Flow Steps
176
160
177
161
The complete Authorization flow proceeds as follows:
@@ -189,7 +173,7 @@ sequenceDiagram
189
173
M->>C: 404 (Use default endpoints)
190
174
end
191
175
192
- alt Non-Localhost Redirect URI
176
+ alt Dynamic Client Registration
193
177
C->>M: POST /register
194
178
M->>C: Client Credentials
195
179
end
@@ -213,17 +197,13 @@ flowchart TD
213
197
B -->|Available| C[Use Metadata Endpoints]
214
198
B -->|Not Available| D[Use Default Endpoints]
215
199
216
- C --> E{Check Redirect URI}
217
- D --> E
218
-
219
- E -->|Localhost| F[Skip Registration]
220
- E -->|Non-localhost| G{Check Registration Endpoint}
200
+ C --> G{Check Registration Endpoint}
201
+ D --> G
221
202
222
203
G -->|Available| H[Perform Dynamic Registration]
223
204
G -->|Not Available| I[Alternative Registration Required]
224
205
225
- F --> J[Start OAuth Flow]
226
- H --> J
206
+ H --> J[Start OAuth Flow]
227
207
I --> J
228
208
229
209
J --> K[Generate PKCE Parameters]
0 commit comments