Skip to main content

fastmcp.server.auth.providers.oci

OCI OIDC provider for FastMCP. The pull request for the provider is submitted to fastmcp. This module provides OIDC Implementation to integrate MCP servers with OCI. You only need OCI Identity Domain’s discovery URL, client ID, client secret, and base URL. Post Authentication, you get OCI IAM domain access token. That is not authorized to invoke OCI control plane. You need to exchange the IAM domain access token for OCI UPST token to invoke OCI control plane APIs. The sample code below has get_oci_signer function that returns OCI TokenExchangeSigner object. You can use the signer object to create OCI service object. Example:

Classes

OCIProvider

An OCI IAM Domain provider implementation for FastMCP. This provider is a complete OCI integration that’s ready to use with just the configuration URL, client ID, client secret, and base URL.