Meta Ads MCP at mcp.facebook.com/ads rejects Claude Code CLI OAuth — redirect_uris not registered
Summary
The Meta Ads MCP server at https://mcp.facebook.com/ads cannot complete OAuth from Claude Code CLI. The flow fails server-side before the browser opens, with:
SDK auth failed: The provided redirect_uris are not registered for this client.
The same MCP authenticates fine from claude.ai web (Pro/Max) and Claude Desktop, so the gap is specifically in what Meta has whitelisted for Claude Code CLI.
Reproduction
- Register the MCP in Claude Code CLI:
````
claude mcp add --transport http meta-ads https://mcp.facebook.com/ads
- In a fresh Claude Code session inside a project where the MCP is registered, trigger the OAuth flow (e.g. by calling the
mcp__meta-ads__authenticatetool or asking Claude to use a Meta MCP tool). - The flow fails immediately with the redirect_uri error above. No browser window opens.
Working clients
claude.aiweb (Pro/Max) — connector OAuth completes successfully.- Claude Desktop — connector OAuth completes successfully.
Per the support article Meta links to (https://support.claude.com/en/articles/11175166), only those two clients are documented. Claude Code CLI is not mentioned.
Likely root cause
Claude Code CLI uses dynamic client registration (RFC 7591) with a localhost loopback redirect URI (e.g. http://localhost:<port>/callback), which is the standard pattern for HTTP MCP servers and works out of the box with most third-party MCP servers. The Meta Ads MCP appears to:
- Only allow specific pre-registered redirect URIs (the ones used by claude.ai web and Claude Desktop), and
- Not support DCR or the localhost loopback redirect URI pattern.
Since Claude Code CLI's redirect URI is not in Meta's allowlist and the server doesn't accept dynamic registration, OAuth is rejected before the user ever sees a browser prompt.
Requested fix
Either:
- Enable DCR support on the Meta Ads MCP OAuth client, or
- Whitelist Claude Code CLI's localhost loopback redirect URI pattern on Meta's side.
This appears to require action from Meta on the MCP server configuration. Filing this here in case Anthropic has a partner channel to flag it through, in addition to a parallel report on Meta's developer bug tracker.
Workaround currently in use
Falling back to the official meta-ads Python CLI with a long-lived system-user access token from Business Manager. Functional but bypasses the MCP entirely. This is not a viable substitute for users who specifically want the MCP-driven conversational workflow inside Claude Code CLI.
Environment
- Claude Code CLI (Opus 4.7, 1M context).
- macOS Darwin 25.3.0.
- MCP registered locally per project:
claude mcp add --transport http meta-ads https://mcp.facebook.com/ads. claude mcp listreportsmeta-adsas "Failed to connect" because the local health probe receives 401 without OAuth — the actual failure is the redirect_uri rejection above when OAuth is triggered.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗