2.13.0
This guide shows you how to secure your FastMCP server using Supabase Auth. This integration uses the Remote OAuth pattern, where Supabase handles user authentication and your FastMCP server validates the tokens.
Configuration
Prerequisites
Before you begin, you will need:- A Supabase Account with a project or a self-hosted Supabase Auth instance
- Your FastMCP server’s URL (can be localhost for development, e.g.,
http://localhost:8000)
Step 1: Get Supabase Project URL
In your Supabase Dashboard:- Go to Project Settings
- Copy your Project URL (e.g.,
https://abc123.supabase.co)
Step 2: FastMCP Configuration
Create your FastMCP server using theSupabaseProvider:
server.py
Testing
Running the Server
Start your FastMCP server with HTTP transport to enable OAuth flows:Testing with a Client
Create a test client that authenticates with your Supabase-protected server:client.py
- Your browser will open to Supabase’s authorization page
- After you authorize, you’ll be redirected back
- The client receives the token and can make authenticated requests
Production Configuration
For production deployments, load configuration from environment variables:server.py

