FastAPI + FastMCP OAuth Authentication with Scalekit
OfficialSecure MCP with FastAPI OAuth in production.
Authorscalekit-inc
Version1.0.0
Installs0
System Documentation
What problem does it solve?
FastAPI + MCP security pattern that enables production-grade OAuth 2.1 Bearer token validation for MCP endpoints using Scalekit, providing middleware-based enforcement and reliable token handling.
Core Features & Use Cases
- FastAPI middleware that validates Bearer tokens against Scalekit
- OAuth 2.1 resource metadata endpoint at /.well-known/oauth-protected-resource for client discovery
- FastMCP tool-style integration enabling plug-and-play MCP tools with authenticated context
- Real-world use: securing multi-tenant MCP services with scope-based access and audit-ready traces
Quick Start
Start the FastAPI app with MCP integration and point clients to the OAuth metadata endpoint to begin issuing and validating tokens.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: FastAPI + FastMCP OAuth Authentication with Scalekit Download link: https://github.com/scalekit-inc/codex-authstack/archive/main.zip#fastapi-fastmcp-oauth-authentication-with-scalekit Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.