fastmcp/docs/clients
Jeremiah Lowin f038cf3be7
Add machine-to-machine client authentication (#4583)
* Add M2M client credentials auth providers

Wrap the SDK's client_credentials and private_key_jwt OAuth providers as
FastMCP-idiomatic ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider,
enabling browser-free client authentication via Client(auth=...).

* Fix M2M token cache collision and explicit-scope drop

Namespace the token cache by client_id so distinct clients sharing one store don't overwrite each other's tokens; pin caller-supplied scopes so the token request keeps them; fix CodeQL URL-substring check in tests; drop unused logger.

* Preserve step-up scope union, scope-aware token cache, restore token expiry

Only pin the caller's explicit scopes on initial authorization, leaving the SDK's step-up scope union intact; namespace the token cache by requested scopes as well as client_id; restore persisted absolute expiry on init so an expired stored token is re-fetched.

* Skip expiry restore for non-expiring reloaded tokens

* Distinguish expires_in=0 from omitted when restoring expiry

* Scope step-up flag to the flow via ContextVar; runnable JWT signing example
2026-07-21 12:27:08 -04:00
..
auth Add machine-to-machine client authentication (#4583) 2026-07-21 12:27:08 -04:00
client-only-package.mdx fix(docs): use valid FA icon on client-only package page (#4139) 2026-05-14 22:14:38 -04:00
client.mdx Merge remote-tracking branch 'origin/main' into feature/client-auto-default 2026-07-20 12:02:38 -04:00
elicitation.mdx Make protocol-version notes scannable and drop era jargon from client docs 2026-07-20 15:00:58 -04:00
fastmcp-remote.mdx Align client, Apps, and integration docs (#4261) 2026-07-19 14:30:51 -04:00
logging.mdx Align client, Apps, and integration docs (#4261) 2026-07-19 14:30:51 -04:00
notifications.mdx Align client, Apps, and integration docs (#4261) 2026-07-19 14:30:51 -04:00
progress.mdx Restructure documentation for FastMCP 3.0 (#2951) 2026-01-19 21:33:35 -05:00
prompts.mdx Trim fastmcp.types to FastMCP-unique types only 2026-07-20 20:53:11 -04:00
resources.mdx Trim fastmcp.types to FastMCP-unique types only 2026-07-20 20:53:11 -04:00
roots.mdx Make protocol-version notes scannable and drop era jargon from client docs 2026-07-20 15:00:58 -04:00
sampling.mdx Trim fastmcp.types to FastMCP-unique types only 2026-07-20 20:53:11 -04:00
tasks.mdx Make protocol-version notes scannable and drop era jargon from client docs 2026-07-20 15:00:58 -04:00
tools.mdx Trim fastmcp.types to FastMCP-unique types only 2026-07-20 20:53:11 -04:00
transports.mdx Merge remote-tracking branch 'origin/main' into feature/client-auto-default 2026-07-20 12:02:38 -04:00