API Reference¶
opinionated_mcp: Zero-config OAuth for MCP servers
Opinionated decisions: - Google OAuth only - Fernet-encrypted user ID cookies - Automatic auth redirects - PKCE with no client secrets - FastAPI + FastMCP integration
- class opinionated_mcp.OpinionatedMCP(name: str, google_client_id: str, session_key: str, base_url: str, host: str = 'localhost', port: int = 8000)[source]¶
Zero-config OAuth MCP server with Google auth
- authenticated_endpoint(path: str, methods: list = ['GET'])[source]¶
Create an authenticated FastAPI endpoint that receives user_id
- property redirect_uri: str¶
Generate redirect URI from base URL