Use this file to discover all available pages before exploring further.
New in version 2.13.0This 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.
Create a test client that authenticates with your Supabase-protected server:
client.py
from fastmcp import Clientimport asyncioasync def main(): # The client will automatically handle Supabase OAuth async with Client("http://localhost:8000/mcp", auth="oauth") as client: # First-time connection will open Supabase login in your browser print("✓ Authenticated with Supabase!") # Test the protected tool result = await client.call_tool("protected_tool", {"message": "Hello!"}) print(result)if __name__ == "__main__": asyncio.run(main())
When you run the client for the first time:
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