Add one url entry to Cursor's mcp.json and sign in with Madgicx to ask about your Meta ad accounts from Cursor. Includes the config, sign-in and first prompts.
To connect Meta ads to Cursor, add the Madgicx MCP server to Cursor's mcp.json file with a single url entry, then sign in with your Madgicx login through OAuth. After you pick a team, Cursor can read your Meta ad accounts, and it asks for your approval before it uses MCP tools by default.
This guide follows Cursor's own MCP documentation and covers the config, the sign-in, the first prompts and common fixes.
One line in mcp.json adds the Madgicx MCP. Sign in, then ask about your ad accounts without leaving your editor. Included in the 7-day free trial.
What you need before you connect Meta ads to Cursor
- A Madgicx subscription or the 7-day free trial. The trial includes the MCP, so you can set this up before you pay.
- A Facebook ad account connected in Madgicx. If it shows under Settings, Ad Accounts in Madgicx, the assistant can reach it.
- Cursor installed. Cursor's MCP documentation covers remote servers and lists no plan requirement for them. If your organization manages Cursor, ask your admin whether MCP servers are allowed.
For the bigger picture, see the Meta ads MCP setup guide, which lists what the connection can read and change. To connect other assistants, here is how to connect your AI assistant.
Set up the Madgicx MCP in Cursor, step by step
- Choose where the config lives. Use
~/.cursor/mcp.jsonto make the server available in every project, or.cursor/mcp.jsoninside a project to keep it to that project. Skip the project file if the repository is shared, since you do not want to commit your connection. - Open or create the file and add the Madgicx server:
If the file already has other servers, add the{ "mcpServers": { "madgicx": { "url": "https://mcp.madgicx.com/mcp" } } }madgicxentry inside the existingmcpServersobject. - Save the file. Cursor picks up the new server. If it does not, restart Cursor.
Sign in with your Madgicx login
Cursor supports OAuth for servers that require it, using the authorization code flow with PKCE. In the browser window that opens, log in to Madgicx, pick a team and approve access. The team decides which Facebook ad accounts Cursor can use, and your Madgicx password is never shared with Cursor.
If you would rather use fixed credentials, Cursor accepts an auth object with a CLIENT_ID and an optional CLIENT_SECRET. Copy them from Workspace Settings, MCP Integration in Madgicx, and keep the secret out of any file you commit.
Check that the connection works
Open Cursor's MCP settings and check that madgicx is listed and enabled. Then, in the chat, ask: “What Madgicx team am I connected to?” Cursor should answer with your name and team. By default Cursor asks for your approval before it uses an MCP tool, so expect a prompt the first time. Approve it to continue.
How to get clear answers from Cursor
Cursor only knows what the Madgicx MCP returns, so be specific. Name the ad account if you have more than one, give a date range such as the last 7 days, and say which numbers you care about, such as spend, cost per result or ROAS. If an answer looks off, ask Cursor to show which account and dates it used, then compare with Ads Manager. Keep early questions read only until you trust the setup.
Three prompts to try first in Cursor
Start with questions that only read, and name the date range each time so the answer is clear.
Who am I connected as? “What Madgicx team am I connected to, and which Facebook ad accounts can you see?” Once that works, you can audit a Facebook ad account in one conversation.
List my ad accounts. “List my Facebook ad accounts with their status, currency and amount spent.” If you run several, here is how to manage multiple ad accounts.
Last 7 days by campaign. “Show the last 7 days by campaign: spend, results, cost per result and ROAS, as a table.” To turn that into a shareable summary, see how to make a Facebook ads report.
Results come back as one total per campaign for the dates you choose, using Meta's own calculated rates. To see a trend, ask for two periods separately, such as this week and last week.
What the Madgicx MCP reads and changes
The connection can read your ad accounts, campaigns, ad sets, ads, creatives, Facebook Pages and posts, results at every level, the account change history and Event Match Quality.
It can also change things: pause and restart campaigns, ad sets and ads, change budgets and bids, and edit names in bulk. Every change needs your confirmation. Cursor shows the exact change first, such as which campaign and what new budget, and waits for you to say yes before anything runs. See how to pause ads after you confirm and scale budgets after you confirm. For how access is limited, read how to connect AI assistants to Meta ads safely.
Add the Google Ads MCP to Cursor (read only)
Madgicx also runs a Google Ads MCP. It only reads: Cursor can analyze search terms, keywords, placements and performance by device or hour, and it changes nothing in Google Ads. It needs a Google Ads account linked in Madgicx. The same Madgicx login authorizes both servers, and Cursor picks the right one for each question.
Add a second entry to the same mcpServers object:
"madgicx-google": {
"url": "https://mcp-google-ads.madgicx.com/mcp"
}Sign in for that server the same way. Its tools need their own approval.
Troubleshooting
- No sign-in prompt. Check the JSON is valid (a missing comma is the usual cause) and that the URL ends in
/mcp. If sign-in still does not start, use the client ID and secret from Workspace Settings, MCP Integration in Madgicx. - Tools do not show. Confirm your Madgicx subscription or trial is active and a Facebook ad account is connected in Madgicx. Then restart Cursor and check the MCP settings again.
- Cursor shows the wrong accounts. The team you picked at sign-in sets the accounts. Switching teams means authorizing again.
- Cursor keeps asking for approval. That is the default for MCP tools. Keep it for anything that can change your ads.
More detail is in the Madgicx MCP docs.
Try it on your own ad account
The MCP gives Cursor a read on your Facebook ad accounts. Madgicx is also the agentic AI advertising platform for Meta ads and an official Meta Business Partner, with an AI marketer that prepares actions for you to approve. To see the connection working before you commit, the 7-day free trial includes the MCP.
FAQ
Where do I put the Madgicx MCP config in Cursor?
In ~/.cursor/mcp.json for all projects or .cursor/mcp.json for one project, as a url entry under mcpServers.
Does Cursor ask before it uses the MCP?
Yes. According to Cursor's documentation, it asks for approval before using MCP tools by default. On top of that, the Madgicx MCP asks you to confirm every change to your ads.
Can I use Cursor with my Meta ads without writing code?
Yes. You ask in plain English, such as for last week's results by campaign, and Cursor calls the Madgicx MCP to answer.
Can Cursor change my campaigns?
It can pause and restart ads and change budgets and bids, but only after you confirm the exact change.
Does it work for Google Ads too?
Yes, with a second entry for the read-only Google Ads server. It analyzes Google Ads and changes nothing there.
Working in a different assistant? See how to use ChatGPT for Facebook ads, connect Meta ads to Gemini, connect Meta ads to Grok or connect Meta ads to Perplexity.





