What happened?
When adding a FastMCP server backed by GitHubProvider to claude.ai as a remote MCP server, the OAuth flow fails with a 400 "Client Not Registered" error. The browser popup shows:
The client ID Ov23lifBJkuc3N90PTD4 was not found in the server's client registry.
Clearing auth tokens and reconnecting does not fix it — the error reappears immediately. The server works fine with MCP Inspector and Claude Desktop.
The cause: claude.ai doesn't call /register before /authorize. It sends the GitHub OAuth App's client_id (the one you configured in GitHubProvider) directly in the authorization request. OAuthProxy.get_client() returns None for any id not previously registered via /register, and the MCP SDK's authorize handler returns 400 before the provider code is reached at all.
Example Code
from fastmcp import FastMCP
from fastmcp.server.auth.providers.github import GitHubProvider
auth = GitHubProvider(
client_id="Ov23lifBJkuc3N90PTD4", # GitHub OAuth App client_id
client_secret="...",
base_url="https://your-server.example.com",
)
mcp = FastMCP("My Server", auth=auth)
Steps:
- Run the server above (publicly accessible over HTTPS)
- In claude.ai → Settings → Integrations → Add remote MCP server
- Set the server URL; when prompted for OAuth credentials, enter the GitHub OAuth App
client_id
- Browser popup opens and immediately shows the 400 error page
Expected: GitHub authorization screen (or FastMCP consent screen)
Actual: "Client Not Registered" error — flow never starts
Version Information
fastmcp 3.2.5
mcp 1.6.0
Python 3.14
Client: claude.ai web
What happened?
When adding a FastMCP server backed by
GitHubProviderto claude.ai as a remote MCP server, the OAuth flow fails with a 400 "Client Not Registered" error. The browser popup shows:Clearing auth tokens and reconnecting does not fix it — the error reappears immediately. The server works fine with MCP Inspector and Claude Desktop.
The cause: claude.ai doesn't call
/registerbefore/authorize. It sends the GitHub OAuth App'sclient_id(the one you configured inGitHubProvider) directly in the authorization request.OAuthProxy.get_client()returnsNonefor any id not previously registered via/register, and the MCP SDK's authorize handler returns 400 before the provider code is reached at all.Example Code
Steps:
client_idExpected: GitHub authorization screen (or FastMCP consent screen)
Actual: "Client Not Registered" error — flow never starts
Version Information