Skip to content

claude.ai connector fails with OAuth registration error — key-based auth incompatible with new connector flow #340

@jhwright

Description

@jhwright

Summary

The open-brain-mcp Edge Function cannot be connected via the claude.ai custom connector UI (Settings → Connectors → Add custom connector). Every attempt fails with:

"Couldn't register with Open Brain's sign-in service. You can try again, or add an OAuth Client ID in the connector settings."

Environment

  • MCP SDK: @modelcontextprotocol/sdk@1.24.3
  • Transport: @hono/mcp@0.1.1 / StreamableHTTPTransport
  • Supabase Edge Function (remote, us-west-1)
  • Client: Claude.ai web + Claude Mac desktop app (cloud conversations)

What's happening

When claude.ai connects to a remote MCP server, it now attempts OAuth Dynamic Client Registration (RFC 7591). The MCP SDK 1.x advertises OAuth discovery endpoints, claude.ai picks them up and tries to register a client — which fails because Open Brain uses simple x-brain-key / ?key= authentication, not OAuth.

The 401 response from the key check is interpreted by claude.ai as an OAuth challenge, triggering the registration attempt.

What still works

  • Local Claude Code (claude mcp add --transport http) with x-brain-key header — fully working
  • Claude Desktop local sessions (epitaxy/sidebar mode) — inherit local Claude Code config, working

What's broken

  • claude.ai web conversations
  • Claude Mac app cloud conversations
  • Any client that goes through the claude.ai connector infrastructure

Suggested fix

Add an OAuth metadata endpoint that tells clients not to attempt dynamic registration, or implement minimal OAuth Dynamic Client Registration at /register that returns a static pre-registered client. The /.well-known/oauth-authorization-server response should either be absent (404) or include a registration_endpoint that handles the registration gracefully.

Alternatively, documenting a workaround (e.g. use local Claude Code sessions) would help users who hit this today.

Workaround

Use claude mcp add --transport http open-brain <URL> --header "x-brain-key: <KEY>" in Claude Code. Works in all local and local-agent sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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