MCP Setup · Windsurf

Connect Windsurf to Admaxxer

Codeium's agentic IDE — speaks MCP.

Windsurf reads MCP servers from `~/.codeium/windsurf/mcp_config.json`. Paste and restart Windsurf.

Setup walkthrough

1 Generate an MCP token in Admaxxer

Sign in to Admaxxer and open Settings → AI Providers → MCP. Click 'Generate MCP token'. Copy the token immediately — we only store a SHA-256 hash, so the plaintext is shown exactly once. Save it somewhere safe; if you lose it, generate a new one.

2 Open Windsurf's MCP config

Windsurf reads `~/.codeium/windsurf/mcp_config.json`. Create the file if it doesn't exist (Windsurf will pick it up on next launch).

code ~/.codeium/windsurf/mcp_config.json

3 Paste the Admaxxer MCP server config

Standard MCP config shape — Windsurf supports the same `mcpServers` block as Claude Desktop and Cursor.

{
  "mcpServers": {
    "admaxxer": {
      "url": "https://admaxxer.com/mcp/sse",
      "transport": "sse",
      "headers": {
        "Authorization": "Bearer mcp_ADM_<paste_token_here>"
      }
    }
  }
}

4 Restart Windsurf

Quit and reopen — Windsurf reads the MCP config once at launch. The Cascade panel will list `admaxxer` under available MCP servers.

5 Verify the connection

Ask your AI 'What ad accounts do I have connected?' If it lists your Meta + Google connections, you're done. If it says it doesn't have access to that information, see the Troubleshooting section below — most often a stale config or an unrestarted client.

Try these prompts after setup

Once Windsurf is connected, ask it any of these — the answers come straight from your Admaxxer workspace.

Tools your AI can call

Admaxxer's MCP server exposes 13 tools. Most are read-only and run automatically. The one tool that can change a campaign is unlocked only by a “Read + manage” token and always asks you to confirm the change in the conversation first — management stays at the campaign level (pause, resume, daily budget).

admaxxer_list_connectionsread

Lists every Meta + Google ad-platform connection in the workspace, with status (healthy / token expired / disabled), platform, and account label. Used by the AI to discover which connections to query for insights.

Example prompt: “What ad accounts do I have connected?”

admaxxer_list_campaignsread

Lists active or paused campaigns for a given connection (Meta or Google). Returns campaign ID, name, objective, status, daily budget, and lifetime spend.

Example prompt: “Show me all my Meta campaigns sorted by spend.”

admaxxer_list_adsetsread

Lists ad sets (Meta) / ad groups (Google) for a connection with the same to-the-cent metrics as campaigns — spend, ROAS, conversions, CTR, CPC, daily budget. Returns the whole account in one call; your AI filters by campaignId to drill into a single campaign without another request.

Example prompt: “Show me the ad sets under my best Meta campaign, by ROAS.”

admaxxer_list_adsread

Lists individual ads (Meta) / ad-group ads (Google) for a connection with the same metrics, plus creative thumbnail and preview links where the platform provides them. Returns the whole account in one call; your AI filters by adSetId or campaignId to drill in without another request.

Example prompt: “Which ads in my retargeting ad set have the worst ROAS this week?”

admaxxer_get_campaign_insightsread

Pulls metrics for one campaign over a date range — impressions, clicks, spend, conversions, ROAS, CPA. Optional breakdowns by age, gender, device, region.

Example prompt: “How did campaign 'BFCM Scale' perform last week?”

admaxxer_get_account_insightsread

Account-level rollup of insights across all campaigns for a connection. Optional breakdowns. Best for high-level ROAS / spend trends.

Example prompt: “What's my Meta account ROAS for the last 30 days?”

admaxxer_query_metricsread

Runs a whitelisted analytics-warehouse query (visitors, revenue, MER, LTV, MMM, attribution, forecast). The workspace_id is injected server-side — the AI cannot see another workspace's data.

Example prompt: “What's my blended MER for the last 14 days vs the prior 14 days?”

admaxxer_get_workspace_contextread

Returns the workspace's plan tier, currency, time zone, connected platforms, and last-sync timestamps. Useful for the AI to ground its answers.

Example prompt: “What plan am I on and when was my data last synced?”

admaxxer_get_event_setupread

Returns copy-paste event-tracking code (pixel install + identify() + funnel events) pre-filled with your website id, so your AI can wire analytics into your app for you.

Example prompt: “Fetch my Admaxxer event setup and add the pixel and identify call to this app.”

admaxxer_get_summary_kpisread

Returns the dashboard's headline numbers for a date window — revenue, ad spend, blended MER/ROAS, orders, sessions, visitors — straight from the same analytics store the dashboard reads, so your AI quotes the numbers you see.

Example prompt: “Give me my headline KPIs for the last 14 days.”

admaxxer_get_attribution_breakdownread

Channel-level revenue, spend, and ROAS under your chosen attribution model (last click, first click, linear, time decay, position based, and more) — the same rows as the Sources & Attribution drill-down.

Example prompt: “Break down last week's revenue by channel using last-click attribution.”

admaxxer_get_web_analyticsread

Sessions, unique visitors, pageviews, and bounce rate for a date window — the corrected, dashboard-matching web analytics read.

Example prompt: “How many sessions and visitors did the site get this week?”

admaxxer_update_campaignwrite

Pauses/resumes a campaign or changes its daily budget — campaign-level only, never creation or deletion. Requires a token minted with the 'Read + manage' scope, and EVERY change is two-step: your AI shows you a preview (e.g. "Daily budget $50 → $75") and only executes after you approve it in the conversation.

Example prompt: “Pause the 'Summer Sale — Prospecting' campaign on Meta (I'll confirm).”

Troubleshooting

401 Unauthorized when the client first connects

Your token has been revoked or expired. Open Admaxxer → Settings → AI Providers → MCP and generate a fresh token. Replace the value in your client's config file and restart the client.

The Admaxxer tools don't show up in the tool picker

Most MCP clients only read the config file at startup. Fully quit the client (not just close the window) and reopen it. In Cursor, Cmd-Shift-P → Reload Window. In Claude Desktop, Cmd-Q then relaunch.

Rate-limit errors on heavy questions (HTTP 429)

Analytics-warehouse queries are rate-limited per token to protect the analytics layer. Spread the call out (`for the last 7 days` instead of `the last 90 days hourly`) or wait 30 seconds and retry. Free workspaces share a tighter bucket than paid.

Tool result says 'Connection does not belong to this workspace'

You issued the MCP token from a workspace that doesn't have the ad connection wired up. Switch to the right workspace in Admaxxer (top-left switcher), reissue the token, and update the client config.

Destructive tool calls (pause / update_campaign) aren't running

By design — write tools require explicit confirmation in Admaxxer's UI. Open `/chat` in Admaxxer; the agent will surface a confirm card with the exact action. The same confirmation flow applies to MCP-initiated writes.

Ready to connect?

Generate an MCP token in Admaxxer, paste it into Windsurf's config (~/.codeium/windsurf/mcp_config.json), and your AI is wired into every ad account in this workspace.

Generate your MCP token