docs/python-sdk/fastmcp-server-auth-providers-scalekit.mdx
fastmcp.server.auth.providers.scalekitScalekit authentication provider for FastMCP.
This module provides ScalekitProvider - a complete authentication solution that integrates with Scalekit's OAuth 2.1 and OpenID Connect services, supporting Resource Server authentication for seamless MCP client authentication.
ScalekitProvider <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/scalekit.py#L23" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>Scalekit resource server provider for OAuth 2.1 authentication.
This provider implements Scalekit integration using resource server pattern. FastMCP acts as a protected resource server that validates access tokens issued by Scalekit's authorization server.
IMPORTANT SETUP REQUIREMENTS:
Create an MCP Server in Scalekit Dashboard:
Environment Configuration:
For detailed setup instructions, see: https://docs.scalekit.com/mcp/overview/
Methods:
get_routes <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/scalekit.py#L156" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>get_routes(self, mcp_path: str | None = None) -> list[Route]
Get OAuth routes including Scalekit authorization server metadata forwarding.
This returns the standard protected resource routes plus an authorization server metadata endpoint that forwards Scalekit's OAuth metadata to clients.
Args:
mcp_path: The path where the MCP endpoint is mounted (e.g., "/mcp")
This is used to advertise the resource URL in metadata.