3.1.0
This guide shows you how to secure your FastMCP server using PropelAuth, a complete authentication and user management solution. This integration uses the Remote OAuth pattern, where PropelAuth handles user login, consent management, and your FastMCP server validates the tokens.
Configuration
Prerequisites
Before you begin, you will need:- A PropelAuth account
- Your FastMCP server’s base URL (can be localhost for development, e.g.,
http://localhost:8000)
Step 1: Configure PropelAuth
Enable MCP Authentication
Navigate to the MCP section in your PropelAuth dashboard, click Enable MCP, and choose which environments to enable it for (Test, Staging, Prod).
Configure Allowed MCP Clients
Under MCP > Allowed MCP Clients, add redirect URIs for each MCP client you want to allow. PropelAuth provides templates for popular clients like Claude, Cursor, and ChatGPT.
Configure Scopes
Under MCP > Scopes, define the permissions available to MCP clients (e.g.,
read:user_data).Choose How Users Create OAuth Clients
Under MCP > Settings > How Do Users Create OAuth Clients?, you can optionally enable:
- Dynamic Client Registration — clients self-register automatically via the DCR protocol
- Manually via Hosted Pages — PropelAuth creates a UI for your users to register OAuth clients
Generate Introspection Credentials
Go to MCP > Request Validation and click Create Credentials. Note the Client ID and Client Secret - you’ll need these to validate tokens.
Step 2: Environment Setup
Create a.env file with your PropelAuth configuration:
Step 3: FastMCP Configuration
Create your FastMCP server file and use the PropelAuthProvider to handle all the OAuth integration automatically:server.py
Testing
With your.env loaded, start the server:
Accessing User Information
You can useget_access_token() inside your tools to identify the authenticated user:
server.py
Advanced Configuration
ThePropelAuthProvider supports optional overrides for token introspection behavior, including caching and request timeouts:
server.py

