Skip to content

Conversation

@evalstate
Copy link
Owner

No description provided.

Implements support for Client ID Metadata Documents (CIMD) as defined in
the MCP 2025-11-25 specification. CIMD allows clients to use an HTTPS URL
as their OAuth client_id, enabling decentralized client registration.

Changes:
- Add client_metadata_url field to MCPServerAuthSettings with validation
- Pass client_metadata_url to OAuthClientProvider for CIMD-aware OAuth
- Add comprehensive tests for CIMD configuration and integration

Configuration example:
  mcp:
    servers:
      my-server:
        url: https://example.com/mcp
        auth:
          client_metadata_url: https://myapp.com/oauth/client.json
Implement dynamic port binding for OAuth callback server to handle port
conflicts gracefully. Per RFC 8252 Section 7.3, authorization servers
MUST allow any port for loopback IP (127.0.0.1) redirect URIs.

Changes:
- Use 127.0.0.1 instead of localhost for RFC 8252 compliance
- Try preferred port first, then fallback ports (3031, 3032, 8080),
  then ephemeral port (0) if all are busy
- Register multiple redirect_uris with fallback ports for servers
  that don't fully implement RFC 8252's dynamic port matching
- Add get_redirect_uri() method to get actual bound port
- Add comprehensive tests for port fallback behavior
@evalstate evalstate merged commit a05f812 into main Dec 28, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants