Skip to content

Official Meta Ads MCP fails OAuth login with invalid_client_metadata #24103

@canorionen

Description

@canorionen

Summary

Official Meta Ads MCP login fails in Codex before the browser/OAuth consent flow opens.

MCP server:

https://mcp.facebook.com/ads

Codex reports:

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."}

Environment

  • Codex CLI: 0.130.0
  • Also reproduced with: npx @openai/codex@0.133.0
  • Platform: Linux server over SSH / Codex desktop remote
  • MCP config:
[mcp_servers.meta_ads_mcp]
enabled = true
url = "https://mcp.facebook.com/ads"

Reproduction

  1. Add the official Meta Ads MCP server with URL https://mcp.facebook.com/ads.

  2. Click Authenticate in Codex UI, or run:

    codex mcp login meta_ads_mcp
  3. No browser consent flow opens.

  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIauthIssues related to authentication and accountsbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) servers

    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