yera.tools.mcp.oauth_profiles
Predefined OAuth client behavior for MCP providers.
Symbols
get_mcp_oauth_client_profile
get_mcp_oauth_client_profile(
name: str,
) → MCPOAuthClientProfile | NoneReturn a predefined MCP OAuth client profile.
Parameters
Stable profile name from MCP server configuration.
Returns
The matching client profile, or None when it is unknown.
MCPOAuthClientProfile
BaseModelDescribe how Yera authenticates with one MCP provider.
Attributes
Stable name persisted in MCP server configuration.
Whether the OAuth client can protect a client secret.
OAuth grant used to authorize the user.
How the provider recognizes Yera as a client.
How authorization results return to Yera.
Whether users may connect without provider approval.
Whether users may supply a token instead.
Optional public identifier assigned to Yera by the provider.
Optional HTTPS Client ID Metadata Document URL.
Optional endpoint issuing device codes.
Optional endpoint issuing OAuth tokens.
Provider-specific scopes requested by default.
Methods
MCPOAuthClientProfile.require_client_id
require_client_id() → strReturn the profile's deployed OAuth client identifier.
Returns
Public OAuth client identifier configured for this Yera build.
Raises
If the client has not been registered.
resolve_mcp_oauth_client_profile
resolve_mcp_oauth_client_profile(
auth: MCPOAuthAuth,
) → MCPOAuthClientProfile | NoneResolve the predefined profile referenced by OAuth configuration.
Parameters
Persisted OAuth authentication configuration.
Returns
The selected predefined profile, or None for generic OAuth.
Raises
If an explicitly selected profile is unknown.
yera_oauth_client_metadata_document
yera_oauth_client_metadata_document() → dict[str, object]Return Yera's canonical public OAuth client metadata document.
Returns
JSON-compatible CIMD metadata to publish at Yera's client ID URL.