mcp-oauth
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-oauthadd 3 and 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP OAuth Server Example
This project demonstrates FastMCP server with Bearer token authentication mounted on FastAPI, including OAuth 2.1 endpoints for dynamic client registration and metadata discovery.
MCP Server Setup
Requirements
Python 3.8+
See
requirements.txtfor all dependencies
Installation
pip install -r requirements.txtEnv
cp .env.example .envCreate an OAuth application with any OAuth provider. (I've used Clerk as an example.)
Obtain the client_id and client_secret from your provider.
Update your .env file with the appropriate environment variables:
CLERK_ISSUER=<issuer_url>
CLERK_AUDIENCE=<clerk_client_id>
CLERK_CLIENT_SECRET=<clerk_client_secret>
BASE_URL=http://localhost:8000Running the Server
python server.pyeg.
python server.py --transport sse --host 0.0.0.0 --port 8000 --log-level infoCommand Line Options
python server.py --help--transport: Transport type (sseorhttp, default:sse)--host: Host address (default:127.0.0.1)--port: Port number (default:8000)--log-level: Logging level (default:info)
Related MCP server: MCP Server OAuth Toy
Testing the Server
Method 1: MCP Inspector
The MCP Inspector provides a web-based interface to test MCP servers with OAuth authentication.
Configure the server URL: Enter
http://localhost:8000/mcp/ssein the MCP Inspector
Initiate OAuth flow: Click the "Quick OAuth Flow" button to start authentication

Complete authentication: Follow the OAuth steps and grant the necessary permissions

Method 2: FastMCP Python Client
Use the FastMCP Client for programmatic access with OAuth authentication.
Update the client configuration: Modify the server URL in
client.pyto match your server endpointRun the client:
python client.py
Method 3: Claude Integration
Integrate the MCP server directly with Claude for AI assistant access.
Navigate to settings: Go to Settings → Integrations → Add Integration
Configure the server: Input the server configuration details

Establish connection: Click "Connect" to enable the integration
Server Endpoints
Core Endpoints
MCP Server:
http://127.0.0.1:8000/mcp- Main MCP endpointHealth Check:
http://127.0.0.1:8000/mcp/health- Server health statusAPI Documentation:
http://127.0.0.1:8000/docs- FastAPI auto-generated docs
OAuth 2.1 Endpoints
Authorization Server Metadata:
http://127.0.0.1:8000/.well-known/oauth-authorization-serverOpenID Connect Discovery:
http://127.0.0.1:8000/.well-known/openid-configurationProtected Resource Metadata:
http://127.0.0.1:8000/.well-known/oauth-protected-resourceDynamic Client Registration:
POST http://127.0.0.1:8000/register
Development Endpoints
Development Token:
http://127.0.0.1:8000/dev/token- Generate test tokens
Environment Variables
You can configure the server using environment variables:
ISSUER: JWT issuer (default:https://dev.example.com)AUDIENCE: JWT audience (default:my-mcp-server)CLIENT_SECRET: OAuth client secret (default: auto-generated UUID)BASE_URL: Base URL for the server (default:http://127.0.0.1:8000)
Example MCP Tools
hello(name: str) -> str: Returns a greeting messageadd_numbers(a: int, b: int) -> int: Adds two numbers together
Both tools require valid authentication.
OAuth 2.1 Compliance
This server implements key OAuth 2.1 endpoints:
Authorization Server Metadata Discovery
Dynamic Client Registration (RFC 7591)
Protected Resource Metadata (RFC 8705)
Note: This is a development/demonstration server. For production use, integrate with a proper OAuth 2.1 Authorization Server or Identity Provider.
Features
FastMCP server mounted on FastAPI
Bearer token (JWT) authentication using RSA public key validation
OAuth 2.1 Authorization Server metadata endpoints
Dynamic client registration endpoint
OpenID Connect discovery endpoint
CORS middleware for cross-origin requests
Structured logging with loguru
Development token generation endpoint
Health check endpoint
Multiple MCP tools (hello, add_numbers)
References
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA complete OAuth 2.1 server implementation for FastMCP with PKCE support, enabling secure authentication and authorization flows. Provides authorization code exchange, token management, and refresh capabilities for building authenticated MCP applications.
- Flicense-qualityDmaintenanceA simple MCP server with OAuth 2.0 authentication for testing OAuth support in mcp-cli.
- Alicense-qualityDmaintenanceDrop-in OAuth 2.1 + Dynamic Client Registration for MCP servers, providing authentication middleware and token verification.20MIT
- Flicense-qualityCmaintenanceAn MCP authorization server implementing OAuth2/OIDC flows, supporting dynamic client registration, PKCE, consent screens, and client ID metadata documents for MCP authorization.
Related MCP Connectors
MCP server for verifying EUDI/Talao wallet data via OIDC4VP (pull) for AI agents.
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
The official MCP Server from Mia-Platform to interact with Mia-Platform Console
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shahrear33/mcp-oauth'
If you have feedback or need assistance with the MCP directory API, please join our Discord server