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 Other MCP Clients to Madgicx MCP

Connect any MCP-compatible client to a Madgicx MCP server via OAuth or client credentials.

Any MCP-compatible client that supports remote servers can connect to Madgicx MCP. The same flow works for both servers. Only the URL differs.

Server URL
Facebook Ads MCP https://mcp.madgicx.com/mcp
Google Ads MCP https://mcp-google-ads.madgicx.com/mcp

There are two ways to authenticate, depending on what your client supports.

Use this if your client has built-in OAuth support. The client handles the authentication flow automatically.

Find the MCP or connector settings in your client

Add a new remote server with the MCP URL

Facebook Ads MCP

https://mcp.madgicx.com/mcp

Google Ads MCP

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

To use both servers, add them as two separate connectors in your client.

Complete the OAuth flow

Your client should open a browser window where you log in to Madgicx, select a team, and authorize access. The same Madgicx login authorizes both servers.

Verify the connection

Ask your assistant: "What Madgicx team am I connected to?" It should call the whoiam tool and return your user and team details.

Option 2: Client ID / Client Secret

Use this if your client does not support OAuth but allows you to pass custom headers or tokens. This is the same approach used by Agentic Frameworks.

Get your credentials

Navigate to Workspace Settings → MCP Integration in your Madgicx dashboard and copy your Client ID and Client Secret. The same credentials authorize both MCP servers.

See the Agentic Frameworks credentials guide for detailed instructions.

Obtain an access token

Exchange your credentials for an access token using the token endpoint:

curl -X POST https://app.madgicx.com/o/token/ \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "scope=mcp:read mcp:write"

Configure your client

Add the MCP server URL and pass the access token as a Bearer token in the Authorization header:

Facebook Ads MCP

  • URL: https://mcp.madgicx.com/mcp
  • Header: Authorization: Bearer YOUR_ACCESS_TOKEN

Google Ads MCP

  • URL: https://mcp-google-ads.madgicx.com/mcp
  • Header: Authorization: Bearer YOUR_ACCESS_TOKEN

Verify the connection

Ask your assistant: "What Madgicx team am I connected to?" It should call the whoiam tool and return your user and team details.

Token refresh

Access tokens expire. For long-running integrations, use the MadgicxConfidentialClientAuth helper to handle automatic token refresh, or implement your own refresh logic.

Troubleshooting

Client doesn't show an OAuth prompt

Your client may not support OAuth. Use Option 2 (Client ID / Client Secret) instead to authenticate with a Bearer token.

Connection times out

Ensure your network allows HTTPS connections to mcp.madgicx.com (Facebook Ads MCP) or mcp-google-ads.madgicx.com (Google Ads MCP), as well as OAuth redirects to/from madgicx.com.

Tools not appearing after connection

Ask the assistant to call the whoiam tool directly. If it returns your user info, the connection is working and the client should discover all available tools automatically.

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