You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Official Meta Ads MCP fails OAuth login with invalid_client_metadata #24103
CLIIssues related to the Codex CLIauthIssues related to authentication and accountsbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) servers
Error: Registration failed: Dynamic registration failed: Registration failed: HTTP 400 Bad Request: {"error":"invalid_client_metadata","error_description":"Dynamic registration is not available for this client."}
Add the official Meta Ads MCP server with URL https://mcp.facebook.com/ads.
Click Authenticate in Codex UI, or run:
codex mcp login meta_ads_mcp
No browser consent flow opens.
Login fails during dynamic client registration with invalid_client_metadata.
Expected behavior
Codex should complete OAuth login for the official Meta Ads MCP server, or support the client metadata/static client identity required by Meta's hosted MCP OAuth flow.
Notes
This appears related to #19154, but this case is for Meta's official hosted Ads MCP endpoint rather than a private/internal OAuth server.
Reacted by Guido Celada, ali, Burkhard Reffeling, svezyridis, saientzg, Júlio Mühlbauer, Kaspars Dambis, Totti, Tien Nguyen, André Battagello and 1 more
Error: Registration failed: Dynamic registration failed: Registration failed: HTTP 400 Bad Request: {"error":"invalid_client_metadata","error_description":"Dynamic registration is not available for this client."}
codex mcp list shows the server is added and enabled, but auth remains Not logged in.
So this appears to reproduce the same failure mode: the OAuth browser consent flow never opens because dynamic client registration fails first.
Reacted by Yuki Ito, sunberrysolar, Andrii Kotliarenko, Liudas Baronas and Burkhard Reffeling
Reproduced on macOS with the Codex desktop app / local CLI.
My MCP config is:
meta_mcp https://mcp.facebook.com/ads enabled Not logged in
Clicking Authenticate in Codex does not open a browser. Running:
codex mcp login meta_mcp
fails immediately with:
Error: Registration failed: Dynamic registration failed: Registration failed: HTTP 400 Bad Request: {"error":"invalid_client_metadata","error_description":"Dynamic registration is not available for this client."}
So this is reproducible on a local Mac as well, not only on a remote/Linux setup.
The Meta Ads MCP issue is not just a technical auth edge case. For small-business and marketing operators, this blocks a very natural workflow: connect Meta Ads, ask for campaign data, reason about the numbers, and then keep planning/executing in the same Codex session.
A smoother remote MCP OAuth flow would make Codex much stronger as a combined planning + execution workspace. The ideal experience is not only "chat" and not only "coding": users need an agent that can research, connect tools, pull data, reason over the business context, operate browser/UI when needed, and teach the user how to execute professionally while doing the work.
This kind of mode would help users learn to control AI tools instead of being replaced by them: fewer broken auth handoffs, clearer tool connection states, and a more fluid bridge between strategy, data, and action.
use meta cli from python, works fine. codex loves it. generate a token using the busniess manager "system user". took a bit (annyoing imo), but it works. codex is managing my ads now.
codex mcp get meta_ads shows the streamable HTTP server enabled. Running codex mcp login meta_ads still fails before opening browser consent:
Error: Registration failed: Dynamic registration failed: Registration failed: HTTP 400 Bad Request: {"error":"invalid_client_metadata","error_description":"Dynamic registration is not available for this client."}
User impact: this prevents handing off an existing Meta Ads analysis/creative-production workflow from Claude’s hosted Meta Ads connector to Codex. Codex can read the local handoff and downstream attribution systems, but cannot authenticate to Meta for live spend/delivery or approved ad preparation. No bearer-token workaround should be required for the official hosted MCP endpoint.
The MCP appears enabled and the UI shows Authenticate.
Clicking Authenticate repeatedly does not open a browser or show a visible error.
Restarting Codex does not change the behavior.
The MCP remains unavailable to Desktop threads.
Sanitized Codex log evidence:
resource metadata probe returned unexpected status: 405 Method Not Allowed
discovery url: https://mcp.facebook.com/.well-known/oauth-authorization-server/ads
resource metadata discovery url: https://mcp.facebook.com/.well-known/oauth-protected-resource/ads
worker quit with fatal: Transport channel closed, when AuthRequired(...)
The WWW-Authenticate response advertises Meta Ads scopes, including ads_management, ads_read, business_management, and ads_mcp_management, so the server is reachable and correctly requests OAuth. The flow stops before browser consent opens.
Control test:
The same Meta account and the same endpoint authenticate successfully in Claude Desktop.
This isolates the failure to Codex's MCP OAuth/DCR flow rather than the Meta account, browser, endpoint, or local MCP configuration.
Expected:
Codex Desktop should open the Meta consent flow and complete OAuth, or surface the exact registration/discovery failure in the UI.
No credentials, tokens, account IDs, campaign names, or local user paths are included in this report.
The official Meta Ads endpoint https://mcp.facebook.com/ads is reachable. Codex MCP login fails before browser consent with HTTP 400 invalid_client_metadata: Dynamic registration is not available for this client. A fresh app-server reports notLoggedIn and zero tools for this server, while other authenticated MCPs initialize successfully. This reproduces the behavior in #24103 . Please document a supported authentication route or resolve client registration compatibility. No credentials, account identifiers, or campaign information is included.
lucasrobertorezende6-a11y commented on Oct 18, 2026
The server is added, but the automatic OAuth flow fails before opening Meta's consent page: HTTP 400 Bad Request: {"error":"invalid_client_metadata","error_description":"Dynamic registration is not available for this client."}
codex mcp login meta-ads --oauth-client-registration cimd also fails before consent with: MCP authorization server does not advertise CIMD with token endpoint auth method none
The user reports that they connected the same Meta Ads service successfully in Claude. In Codex, the official endpoint remains unusable for this workflow. Please provide a supported authentication path for Codex or fix OAuth client registration compatibility.
No account IDs, tokens, or private campaign data are included.
CLIIssues related to the Codex CLIauthIssues related to authentication and accountsbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) servers
Activity
dal-mnr commentedon May 27, 2026
I can reproduce this on Codex Desktop for macOS as well.
Environment:
codex-cli 0.131.0-alpha.9https://mcp.facebook.com/adsCommands:
Result:
codex mcp listshows the server is added and enabled, but auth remainsNot logged in.So this appears to reproduce the same failure mode: the OAuth browser consent flow never opens because dynamic client registration fails first.
sunberrysolar commentedon May 29, 2026
Same here with codex v0.135.0
rzagmarz commentedon Jun 6, 2026
Same here.
liudasbar commentedon Jun 10, 2026
still an issue
apranevicius commentedon Jun 13, 2026
Any clue when this is going to be fixed?
jeffrey94 commentedon Jun 20, 2026
Reproduced on macOS with the Codex desktop app / local CLI.
My MCP config is:
Clicking Authenticate in Codex does not open a browser. Running:
fails immediately with:
So this is reproducible on a local Mac as well, not only on a remote/Linux setup.
guidocelada commentedon Jun 20, 2026
+1, please address.
Ziad-NasrEldin commentedon Jun 30, 2026
It still exists for more than a month now.
sanebg commentedon Jul 1, 2026
What happened? Will this be fixed?
evveame-creator commentedon Jul 6, 2026
Adding a user-impact note from Codex Desktop.
The Meta Ads MCP issue is not just a technical auth edge case. For small-business and marketing operators, this blocks a very natural workflow: connect Meta Ads, ask for campaign data, reason about the numbers, and then keep planning/executing in the same Codex session.
A smoother remote MCP OAuth flow would make Codex much stronger as a combined planning + execution workspace. The ideal experience is not only "chat" and not only "coding": users need an agent that can research, connect tools, pull data, reason over the business context, operate browser/UI when needed, and teach the user how to execute professionally while doing the work.
This kind of mode would help users learn to control AI tools instead of being replaced by them: fewer broken auth handoffs, clearer tool connection states, and a more fluid bridge between strategy, data, and action.
earonesty commentedon Jul 8, 2026
use meta cli from python, works fine. codex loves it. generate a token using the busniess manager "system user". took a bit (annyoing imo), but it works. codex is managing my ads now.
Emstr commentedon Jul 15, 2026
Reproduced again on 2026-07-15 with current local builds:
0.144.126.707.72221https://mcp.facebook.com/adscodex mcp get meta_adsshows the streamable HTTP server enabled. Runningcodex mcp login meta_adsstill fails before opening browser consent:User impact: this prevents handing off an existing Meta Ads analysis/creative-production workflow from Claude’s hosted Meta Ads connector to Codex. Codex can read the local handoff and downstream attribution systems, but cannot authenticate to Meta for live spend/delivery or approved ad preparation. No bearer-token workaround should be required for the official hosted MCP endpoint.
jovicailievski commentedon Jul 22, 2026
Still same, any updates ?
LiuLawrence45 commentedon Jul 28, 2026
Same issue here. It's really, really annoying. Codex would be great for this workflow, so I really hope this gets fixed soon.
bkosmetika commentedon Jul 30, 2026
Same issue here
lasguiaspracticas360-alt commentedon Aug 3, 2026
Reproduced on Codex Desktop for Windows on 2026-08-02.
Environment:
26.727.51351https://mcp.facebook.com/adsObserved behavior:
Sanitized Codex log evidence:
The
WWW-Authenticateresponse advertises Meta Ads scopes, includingads_management,ads_read,business_management, andads_mcp_management, so the server is reachable and correctly requests OAuth. The flow stops before browser consent opens.Control test:
Expected:
Codex Desktop should open the Meta consent flow and complete OAuth, or surface the exact registration/discovery failure in the UI.
No credentials, tokens, account IDs, campaign names, or local user paths are included in this report.
danielnrocha commentedon Oct 9, 2026
The official Meta Ads endpoint https://mcp.facebook.com/ads is reachable. Codex MCP login fails before browser consent with HTTP 400 invalid_client_metadata: Dynamic registration is not available for this client. A fresh app-server reports notLoggedIn and zero tools for this server, while other authenticated MCPs initialize successfully. This reproduces the behavior in #24103 . Please document a supported authentication route or resolve client registration compatibility. No credentials, account identifiers, or campaign information is included.
lucasrobertorezende6-a11y commentedon Oct 18, 2026
Reproduced on Codex Desktop for Windows on 2026-10-18 with the bundled
codex-cli 0.163.0-alpha.10.2.Steps:
codex mcp add meta-ads --url https://mcp.facebook.com/adsHTTP 400 Bad Request: {"error":"invalid_client_metadata","error_description":"Dynamic registration is not available for this client."}codex mcp login meta-ads --oauth-client-registration cimdalso fails before consent with:MCP authorization server does not advertise CIMD with token endpoint auth method noneThe user reports that they connected the same Meta Ads service successfully in Claude. In Codex, the official endpoint remains unusable for this workflow. Please provide a supported authentication path for Codex or fix OAuth client registration compatibility.
No account IDs, tokens, or private campaign data are included.