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 n8n to Madgicx MCP

Connect Madgicx MCP servers to n8n workflows using the MCP Client node.

n8n supports MCP servers through the MCP Client tool node. You can connect either or both Madgicx MCP servers (Facebook Ads, Google Ads) to any n8n AI Agent workflow using HTTP Streamable transport and OAuth 2.0 authentication.

Requirements

  • An n8n instance (self-hosted or n8n Cloud)
  • An AI Agent workflow (or any workflow that supports tool nodes)
  • Prerequisites for the Madgicx MCP server you intend to connect: see Facebook Ads or Google Ads

Setup Instructions

Add an MCP Client Node

You can add the MCP Client node in two ways:

  • Search: Open the nodes panel and search for MCP Client
  • AI Agent: Add an AI Agent node → click Tool → select MCP Client Tool

Configure the MCP Client Node

In the MCP Client node parameters, set:

Facebook Ads MCP

  • Endpoint: https://mcp.madgicx.com/mcp
  • Server Transport: HTTP Streamable
  • Authentication: MCP OAuth2
  • Tools to Include: All

Google Ads MCP

  • Endpoint: https://mcp-google-ads.madgicx.com/mcp
  • Server Transport: HTTP Streamable
  • Authentication: MCP OAuth2
  • Tools to Include: All

To use both, add a second MCP Client node with the other endpoint.

Create MCP OAuth2 Credentials

Click the Credential for MCP OAuth2 API dropdown → Create new credential, then fill in the following:

Field Value
Server URL https://app.madgicx.com/.well-known/oauth-authorization-server
Use Dynamic Client Registration Enabled

Leave all other fields at their defaults. Dynamic Client Registration will automatically handle client ID and secret provisioning. The same credential works for both MCP servers.

Authenticate with Madgicx

Click Connect in the credentials dialog. A browser window will open where you:

  1. Log in to your Madgicx account
  2. Select team: choose which Madgicx team to connect
  3. Authorize: click the "Authorize" button

Once authorized, you'll see Account connected in the credentials dialog.

n8n will display an OAuth Redirect URL in the credentials dialog. When prompted during the OAuth flow to enter a callback or redirect URL, use the URL shown there.

Verify the Connection

Run the workflow and ask your AI Agent: "What Madgicx team am I connected to?" It should call the whoiam tool and return your user and team details.

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