Research & Benchmarks Optimization AI Ads Analytics Why Madgicx? About Us Blog Careers Case Studies Events Glossary Guides Answers Pricing Login Try for Free
MCP docs menu

Connect Claude Code to Madgicx MCP

Connect Madgicx MCP servers to Claude Code CLI.

Claude Code is Anthropic's command-line interface for Claude. It supports MCP connections for integrating external tools and services.

Requirements

  • Claude Code installed
  • Node.js 18+
  • Terminal access
  • Anthropic account with Claude access

Installation

If you haven't installed Claude Code yet:

npm install -g @anthropic-ai/claude-code

Setup Instructions

Add each Madgicx MCP server you want to use as a separate connector. Run the command(s) for the server(s) you need:

Add the MCP Server(s)

Facebook Ads MCP

claude /mcp add madgicx-facebook https://mcp.madgicx.com/mcp

Google Ads MCP

claude /mcp add madgicx-google-ads https://mcp-google-ads.madgicx.com/mcp

Both

claude /mcp add madgicx-facebook https://mcp.madgicx.com/mcp
claude /mcp add madgicx-google-ads https://mcp-google-ads.madgicx.com/mcp

Authorize in Browser

For each server you added, a browser window will open for OAuth authorization:

  1. Log in to your Madgicx account
  2. Select team: Choose which Madgicx team to connect
  3. Review permissions: Review the requested permissions
  4. Authorize: Click the "Authorize" button

After authorization, you'll be redirected back and can close the browser.

Verify Connection

Verify the connection was successful:

claude /mcp list

You should see madgicx-facebook and/or madgicx-google-ads in the list of configured MCP servers.

Using the Connection

Once connected, Claude Code can use Madgicx tools in your conversations. Start a conversation and ask:

What Madgicx team am I connected to?

MCP Commands

List Connections

claude /mcp list

Remove Connection

claude /mcp remove madgicx-facebook
claude /mcp remove madgicx-google-ads

Update Connection

To update or reconnect:

claude /mcp remove madgicx-facebook
claude /mcp add madgicx-facebook https://mcp.madgicx.com/mcp

Troubleshooting

Connection Fails
# Check network connectivity
curl https://mcp.madgicx.com/health
curl https://mcp-google-ads.madgicx.com/health

# Remove and re-add the connection
claude /mcp remove madgicx-facebook
claude /mcp add madgicx-facebook https://mcp.madgicx.com/mcp
Authorization Timeout

If the browser authorization times out:

  1. Ensure your browser can access madgicx.com
  2. Check for popup blockers
  3. Try running the command again

Next Steps

Official Meta Business Partner

Connect your AI assistant to your ad accounts. The 7-day free trial includes both MCPs.

Sign in with your Madgicx login, add the server addresses and ask in plain words. Meta changes wait for your confirmation, and the Google Ads MCP only reads.

Try for Free ($0 Trial)
200,000+ advertisers
$10B+ annual ad spend visibility
4.6 / 5 on G2, from 220+ reviews