Skip to content

[Client] Implement Dynamic Client Registration (RFC 7591) + pre-registered client support #320

Open

Description

@soyuka

Context

When no client credentials are pre-configured and AS metadata advertises registration_endpoint, the client must POST client_metadata to register itself dynamically. When credentials are pre-provided via Builder, skip registration.

Scope

  • Mcp\Client\Auth\DynamicClientRegistrar:
    • POST client_metadata (client_name, redirect_uris, grant_types, token_endpoint_auth_method, software_id, software_version) to registration_endpoint.
    • Persist returned client_id / client_secret / client_secret_expires_at via TokenStorageInterface.
  • Client\Builder::setOAuthClient(string $clientId, ?string $clientSecret = null) for pre-registration.

Conformance scenarios unblocked

auth/pre-registration (and unblocks every other auth scenario by providing a client_id).

Dependencies

Blocked by: #318 (AS metadata gives registration_endpoint).

Acceptance

  • Unit tests for registration request shape + pre-registration bypass.
  • Conformance: auth/pre-registration passes.

cc @soyuka

Activity

  1. added
    ClientIssues & PRs related to the Client component
    P1Significant bug affecting many users, highly requested feature
    authIssues and PRs related to Authentication / OAuth
    improves spec complianceImproves consistency with other SDKs such as TyepScript
    enhancementRequest for a new feature that's not currently supported
    on May 19, 2026
  2. chr-hertel commented on May 26, 2026

    @chr-hertel
    Member

    Cross-reference: this work covers two 2026-07-28 SEPs:

    See umbrella #338 for the full MCP Spec 2026-07-28 authorization milestone.

  3. removed
    P1Significant bug affecting many users, highly requested feature
    on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientIssues & PRs related to the Client componentauthIssues and PRs related to Authentication / OAuthenhancementRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions