Install Meta Ads MCP for Claude Code (remote)

by Serkan Haşlak · v1.0.0

  1. Add the snippet to ~/.claude/settings.json
    • Set META_MCP_URL, MCP_API_KEY, META_ACCESS_TOKEN in your .env file — .mcp.json does the interpolation.
    • X-Meta-Token is passed per session — no shared workspace token.
    {
      "mcpServers": {
        "meta-mcp": {
          "command": "npx",
          "args": [
            "mcp-remote",
            "${META_MCP_URL}",
            "--header",
            "Authorization: Bearer ${MCP_API_KEY}",
            "--header",
            "X-Meta-Token: ${META_ACCESS_TOKEN}"
          ]
        }
      }
    }

    Recommended setup: meta-mcp runs on your own Railway or Docker host, Claude Code connects via mcp-remote.

  2. Restart your Claude Code session (Ctrl+C, then run claude again)

    This loads the new MCP into your client.

  3. Authorize

    Paste the bearer token into the snippet above where it says `<TOKEN>` before saving the config.

See full page