Skip to content

Commit a2630ac

Browse files
committed
Remove SEP-991 references from comments
Remove temporary SEP number references from code comments since these are difficult to maintain and can become outdated. The CIMD (Client ID Metadata Document) terminology is kept as it's a meaningful acronym.
1 parent c1e0181 commit a2630ac

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

examples/clients/simple-auth-client/mcp_simple_auth_client/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ async def _default_redirect_handler(authorization_url: str) -> None:
191191
webbrowser.open(authorization_url)
192192

193193
# Create OAuth authentication handler using the new interface
194-
# Use client_metadata_url to enable CIMD (SEP-991) when the server supports it
194+
# Use client_metadata_url to enable CIMD when the server supports it
195195
oauth_auth = OAuthClientProvider(
196196
server_url=self.server_url,
197197
client_metadata=OAuthClientMetadata.model_validate(client_metadata_dict),

src/mcp/client/auth/oauth2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class OAuthContext:
9999
redirect_handler: Callable[[str], Awaitable[None]] | None
100100
callback_handler: Callable[[], Awaitable[tuple[str, str | None]]] | None
101101
timeout: float = 300.0
102-
client_metadata_url: str | None = None # SEP-991: URL-based client ID
102+
client_metadata_url: str | None = None
103103

104104
# Discovered metadata
105105
protected_resource_metadata: ProtectedResourceMetadata | None = None
@@ -241,7 +241,7 @@ def __init__(
241241
redirect_handler: Handler for authorization redirects.
242242
callback_handler: Handler for authorization callbacks.
243243
timeout: Timeout for the OAuth flow.
244-
client_metadata_url: SEP-991 URL-based client ID. When provided and the server
244+
client_metadata_url: URL-based client ID. When provided and the server
245245
advertises client_id_metadata_document_supported=true, this URL will be
246246
used as the client_id instead of performing dynamic client registration.
247247
Must be a valid HTTPS URL with a non-root pathname.
@@ -595,12 +595,12 @@ async def async_auth_flow(self, request: httpx.Request) -> AsyncGenerator[httpx.
595595
self.context.oauth_metadata,
596596
)
597597

598-
# Step 4: Register client or use URL-based client ID (SEP-991)
598+
# Step 4: Register client or use URL-based client ID (CIMD)
599599
if not self.context.client_info:
600600
if should_use_client_metadata_url(
601601
self.context.oauth_metadata, self.context.client_metadata_url
602602
):
603-
# SEP-991: Use URL-based client ID
603+
# Use URL-based client ID (CIMD)
604604
logger.debug(f"Using URL-based client ID (CIMD): {self.context.client_metadata_url}")
605605
client_information = create_client_info_from_metadata_url(
606606
self.context.client_metadata_url, # type: ignore[arg-type]

src/mcp/client/auth/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ async def handle_registration_response(response: Response) -> OAuthClientInforma
246246
def is_valid_client_metadata_url(url: str | None) -> bool:
247247
"""Validate that a URL is suitable for use as a client_id (CIMD).
248248
249-
Per SEP-991, the URL must be HTTPS with a non-root pathname.
249+
The URL must be HTTPS with a non-root pathname.
250250
251251
Args:
252252
url: The URL to validate
@@ -269,7 +269,7 @@ def should_use_client_metadata_url(
269269
) -> bool:
270270
"""Determine if URL-based client ID (CIMD) should be used instead of DCR.
271271
272-
Per SEP-991, URL-based client IDs should be used when:
272+
URL-based client IDs should be used when:
273273
1. The server advertises client_id_metadata_document_supported=true
274274
2. The client has a valid client_metadata_url configured
275275
@@ -294,7 +294,7 @@ def create_client_info_from_metadata_url(
294294
) -> OAuthClientInformationFull:
295295
"""Create client information using a URL-based client ID (CIMD).
296296
297-
Per SEP-991, when using URL-based client IDs, the URL itself becomes the client_id
297+
When using URL-based client IDs, the URL itself becomes the client_id
298298
and no client_secret is used (token_endpoint_auth_method="none").
299299
300300
Args:

tests/client/test_auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1833,7 +1833,7 @@ def test_extract_field_from_www_auth_invalid_cases(
18331833

18341834

18351835
class TestCIMD:
1836-
"""Test SEP-991 Client ID Metadata Document (CIMD) support."""
1836+
"""Test Client ID Metadata Document (CIMD) support."""
18371837

18381838
@pytest.mark.parametrize(
18391839
"url,expected",

0 commit comments

Comments
 (0)