Remove the deprecated RFC7523OAuthClientProvider
Removes RFC7523OAuthClientProvider and its JWTParameters model from mcp.client.auth.extensions.client_credentials, ahead of v2.
Motivation and Context
RFC7523OAuthClientProvider implemented the RFC 7523 §2.1 jwt-bearer authorization grant with an SDK-minted or prebuilt JWT (plus a hybrid authorization_code + private_key_jwt mode). It landed in #1247, then was deprecated five weeks later in #1663 once the client-credentials extension (SEP-1046) settled on the client_credentials grant with §2.2 private_key_jwt client authentication instead — the flow PrivateKeyJWTOAuthProvider implements. It has warned on construction since 1.23.0 (Dec 2025).
No MCP auth extension specifies the flow it implements, no other SDK ships an equivalent, and nearly all of its flow methods were # pragma: no cover. Every mode has a purpose-built replacement:
- client secret →
ClientCredentialsOAuthProvider private_key_jwt(§2.2) →PrivateKeyJWTOAuthProviderwithSignedJWTParameters/static_assertion_provider- ID-JAG under
jwt-bearer(SEP-990) →IdentityAssertionOAuthProvider
The one sanctioned future use of a bare §2.1 grant, SEP-1933 Workload Identity Federation, is still a draft and wants a different shape (platform-provisioned assertion, no dynamic registration or interactive base class), so it will get its own provider rather than a resurrection of this one.
How Has This Been Tested?
Removed the tests for the deleted classes; the remaining client_credentials.py module stays at 100% coverage and strict-no-cover is clean. Confirmed at the package boundary that the removed names raise ImportError, the surviving providers still construct as httpx2.Auth under -W error, and every module in the package imports cleanly.
Breaking Changes
Yes — RFC7523OAuthClientProvider and JWTParameters are gone. docs/migration.md maps each mode to its replacement.
Types of changes
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality to change)
- Documentation update
Checklist
- I have read the MCP Documentation
- My code follows the repository's style guidelines
- New and existing tests pass locally
- I have added appropriate error handling
- I have added or updated documentation as needed