claude-code - 💡(How to fix) Fix meta-ads-official MCP server: OAuth fails with "redirect_uris are not registered for this client" [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55556Fetched 2026-05-03 04:50:21
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×5commented ×1

Error Message

manager fail at the same step with the same error. `/mcp` shows the same error in the server detail view:

Fix Action

Workaround

Use the separate `facebook-ads` MCP server (long-lived token auth instead of OAuth) — covers the same ad-account / campaign / adset / ad performance surface area.

RAW_BUFFERClick to expand / collapse

Bug

The meta-ads-official MCP server (https://mcp.facebook.com/ads) in the Claude Code MCP catalog cannot complete OAuth authentication. Both the auto-flow (triggered when a tool is invoked) and the interactive /mcp manager fail at the same step with the same error.

Reproduction

  1. Have meta-ads-official available as an MCP server (it surfaces by default in the Claude Code catalog).
  2. Trigger auth either way:
    • Invoke any mcp__meta-ads-official__* tool, which calls mcp__meta-ads-official__authenticate under the hood, or
    • Run /mcp → select meta-ads-official → "Authenticate".

Expected

Browser opens to facebook.com, user grants ads scope, token is cached locally, and the server's real tools (list ad accounts, campaign performance, etc.) become available.

Actual

Both paths return:

SDK auth failed: The provided redirect_uris are not registered for this client.

`/mcp` shows the same error in the server detail view:

``` Status: △ needs authentication Auth: ✘ not authenticated URL: https://mcp.facebook.com/ads SDK auth failed: The provided redirect_uris are not registered for this client. ```

This points at the OAuth client registered with Meta for this MCP server — the `localhost:<port>/callback` URLs that Claude Code's SDK uses aren't whitelisted on the Meta app config.

Environment

Workaround

Use the separate `facebook-ads` MCP server (long-lived token auth instead of OAuth) — covers the same ad-account / campaign / adset / ad performance surface area.

extent analysis

TL;DR

Update the Meta app configuration to whitelist the localhost:<port>/callback URLs used by Claude Code's SDK to fix the OAuth authentication issue.

Guidance

  • Verify that the localhost:<port>/callback URLs are correctly configured in the Claude Code SDK and match the URLs used in the Meta app configuration.
  • Check the Meta app configuration to ensure that the localhost:<port>/callback URLs are whitelisted for the OAuth client registered with Meta for this MCP server.
  • Consider using the separate facebook-ads MCP server with long-lived token auth as a temporary workaround.
  • Review the Claude Code documentation to ensure that the SDK is properly configured for OAuth authentication with the Meta app.

Example

No code snippet is provided as it is not explicitly supported by the issue.

Notes

The issue is specific to the meta-ads-official MCP server and the Claude Code SDK, and the workaround provided may not be applicable to other MCP servers or SDKs.

Recommendation

Apply the workaround by using the separate facebook-ads MCP server with long-lived token auth, as updating the Meta app configuration may require additional steps and verification.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING