Skip to content

invalid client_id format error with Supabase Auth #1927

@tleyden

Description

@tleyden

I have a basic FastMCP based script with Supabase Auth:

import os
from dotenv import load_dotenv
from fastmcp import FastMCP
from fastmcp.server.auth.providers.supabase import SupabaseProvider

load_dotenv()

auth = SupabaseProvider(
    project_url=os.environ["SUPABASE_PROJECT_URL"],
    base_url=os.environ["BASE_URL"],
)

mcp = FastMCP("Hello Supabase", auth=auth)

@mcp.tool
def hello_supabase() -> str:
    """Simple authenticated hello world."""
    return "Hello from Supabase-protected MCP server!"

if __name__ == "__main__":
    mcp.run(transport="http", port=8000)

But it gets stuck at this error when trying to connect to it:

Image

Here's a longer snippet from the Authorization URL that contains the client_id:

/auth/v1/oauth/authorize?response_type=code&client_id=https%3A%2F%2Fwww.mcpjam.com%2F.well-known%2Foauth%2Fclient-metadata.json&redirect_uri=

Here is my MCPJam config for that server:

Image

(I wasn't sure what to put here TBH)

And my supabase OAuth config has DCR enabled:
Image

Any idea what causes this error? {"code":400,"error_code":"oauth_client_not_found","msg":"invalid client_id format"}. Is that basically Supabase complaining that it doesn't like the client id format?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions