To connect X Ads to Claude via MCP: copy mcp.portermetrics.com/mcp, go to Claude.ai, open Connectors → Manage connectors → Add custom connector, paste the URL, and sign in. From there, ask Claude anything about your X Ads campaigns in plain English.
Once connected, you can automate your X Ads reporting and analysis — ask questions about your data, build dashboards, trigger alerts, or ship client-ready reports like the one below.
Prerequisites
- A Porter Metrics account with your X Ads account connected (free tier is enough to try it end-to-end)
- A Claude account — the free plan works for Claude Web; a Pro subscription is needed for Claude Code and Desktop MCP features
- Admin or standard access to the X Ads ad accounts you want to connect
Connect X Ads to Claude with MCP
For this tutorial we’re going with the MCP method. Here’s a quick explainer of what MCP is and why it’s the best path for X Ads.
MCP (Model Context Protocol) is the open standard that lets AI tools like Claude, ChatGPT, Claude Code and others access and use external APIs — the things that make tools like X Ads work under the hood. Instead of building a custom integration for every AI tool you use, you install one MCP and every compatible AI gets access to the same data.
The full setup takes under 5 minutes and breaks into three moves: connect X Ads to Porter, point Claude at the Porter MCP, and ask your first question.
1. Connect your X Ads data to Porter
Porter sits between X’s Ads API and Claude. It handles OAuth, rate limiting, pagination and all the plumbing so Claude only ever sees clean, structured data.
Sign up for Porter. Create a free account at portermetrics.com. The free tier is enough to run this full workflow end-to-end.
Connect your X Ads account. In Porter, click Create → pick Claude as the destination → select X Ads as the source → sign in with X to grant access to your ad accounts.
Select your ad accounts. Choose the X Ads ad accounts you want Claude to query. When you select multiple ad accounts under a single connection, Porter automatically blends their data together so you can query them as one.
Optional: enable automatic BigQuery storage if you’re connecting multiple ad accounts with large data volumes. This keeps Claude’s responses fast even at scale.
2. Connect the MCP to Claude
Porter’s MCP URL is what you paste into Claude. Once added, Claude can query X Ads data on demand in any conversation.
Go to claude.ai and click the + icon in the chat input to open the tools menu.
In the menu that opens, hover over Connectors and click Manage connectors.
In the Connectors panel, click the + button at the top of the list to start adding a new connector.
Pick Add custom connector from the dropdown that appears.
A dialog opens with the name and URL fields. Type Porter in the first field to name the connector.
In the second field, paste https://mcp.portermetrics.com/mcp. Leave the advanced settings alone.
Click Add at the bottom right of the dialog. Claude opens a sign-in window — use the same Google account linked to your Porter workspace and approve access.
Once the authorization finishes, you’ll see Porter’s read-only tools appear in the connectors panel. You’re ready to start asking questions.
For a fuller walkthrough with screenshots at every step, see the Porter MCP tutorial.
3. Start building questions and dashboards
With Porter connected, open a new Claude chat and ask anything about your X Ads in plain English. Claude calls Porter behind the scenes, pulls live data from X, and answers with tables, charts, or summaries.
Try one of these to verify the setup is working:
For a full catalogue of copy-paste prompts organized by use case (performance, fatigue, budget, agency, B2B, e-commerce, cross-channel), jump to the prompts section below.
Alternative ways to connect X Ads to Claude
MCP is the path we just walked through — and the one we recommend for most marketers. But it’s not the only way to get X Ads data in front of Claude. The most common alternatives are X Ads’s direct API (or its official MCP if it has one), a live Google Sheets bridge, and BigQuery for scale. Each has its trade-offs — pick the one that fits how your team already works.
- 🔌 X Ads’s direct API (or official MCP) — Talk to X’s Ads API yourself, or install X Ads’s native MCP (if one exists). Maximum control, but you handle auth, rate limits and pagination — and you only get one source.
- 📊 Google Sheets — Live Sheet or one-off CSV upload. Auditable, familiar, faster for big exports — but aggregation happens in the Sheet, not the API.
- 🗄️ Google BigQuery — For large ad accounts or agencies running multi-account analysis. BigQuery aggregates; Claude only queries pre-built summaries.
Via X Ads’s direct API (or official MCP)
If you’re building a product around X Ads — or you’re a developer who’d rather own every layer of the integration — the most direct path is talking to X’s Ads API yourself, or installing the official X Ads MCP (if one exists). X doesn’t ship an official MCP yet, so this means writing API calls directly in Claude Code or in your own scripts. You’ll need to follow X’s rate limits & quotas and request API access where applicable. Either way, you skip Porter entirely and call X from your own code or from Claude Code with raw HTTP requests.
Via Google Sheets (live Sheet or manual CSV)
If your team already lives in Google Sheets — or you want a paper trail before Claude touches anything — feed X Ads into a Sheet, then let Claude read the Sheet. You can automate the X Ads → Sheets pipeline with Porter so it refreshes daily, or do one-off CSV exports from X Ads’s native UI for static analysis.
Read the full Sheets tutorial →
Via Google BigQuery (for scale)
This is the path most people overlook — and it’s the one that saves you when your X Ads ad account gets serious. A single large advertiser or an agency managing 10+ ad accounts will hit API rate limits and latency problems querying Claude directly. Claude will literally tell you it’s taking too long or timing out on big pulls.
BigQuery fixes that. You load X Ads data into BigQuery tables on a schedule, then connect BigQuery to Claude — either through a BigQuery MCP or via Claude Code with SQL queries. Instead of asking Claude to pull raw X Ads data, you let BigQuery aggregate into small, optimized tables, and Claude only queries the summarized output. Scale problem solved.
Read the full BigQuery tutorial →
Connecting X Ads to Claude Code
Most marketers lump Claude and Claude Code together and miss the biggest advantage of the entire MCP ecosystem. They’re not the same tool — and the difference matters enormously once you start working with X Ads data seriously.
Claude is a chat interface. You ask a question, Claude pulls live data through the MCP, answers, maybe builds a quick dashboard inside the conversation. Great for one-off analysis. The problem: everything is ephemeral. Want to refresh the dashboard tomorrow? You regenerate it from scratch. Want the same report every Monday? You re-ask the question every Monday.
Claude Code is Claude running inside your computer’s terminal. Because it has access to your filesystem, runtime, and other developer tools, it doesn’t just answer questions — it can build real software. Persistent scripts, scheduled routines, HTML apps, internal dashboards, integrations that run 24/7 without your input. Once it’s connected to Porter’s MCP for X Ads, a whole category of work becomes possible.
What Claude Code unlocks that Claude alone cannot
This is where the MCP ecosystem pays off most. Because Claude Code can combine Porter’s MCP with other MCPs — Firecrawl for web scraping, Airtable for structured data, Notion for wikis, Vercel for deployment, Slack and Gmail for delivery — you’re no longer querying data. You’re building tools.
🛠️ Build your own budget management app Stack: Porter MCP + Vercel MCP (or Cloudflare Pages, Netlify) Feed Claude Code your X Ads targets and goals — CPA goals, daily budgets, ROAS thresholds — and ask it to generate a custom ROI dashboard for each client. It builds the HTML, pulls live data, deploys to a URL. No Data Studio embed to break when the vendor changes pricing, no template constraints. The dashboard updates automatically because it queries Porter’s MCP on every page load. Best for: agencies that want white-label client dashboards without Looker or Data Studio dependencies.
🔍 Full competitor + performance monitoring Stack: Porter MCP + Firecrawl MCP Combine your own X Ads performance from Porter with competitor landing pages and live ads from the X Ads platform scraped via Firecrawl. Claude Code stitches both into a weekly competitive intelligence report — your numbers next to their creative angles and targeting, with an LLM summary on top of what changed week over week. Runs on cron, lands in your inbox every Monday morning. Best for: in-house teams that need market context, not just internal numbers.
📚 Internal marketing wiki with live metrics Stack: Porter MCP + Airtable MCP (or Notion MCP) Use Airtable or Notion as the schema, Porter as the data source. Claude Code keeps every page populated with current spend, CPA, and ROAS for every ad account — no stale screenshots, no copy-paste from Excel. New hires read one wiki entry and have full context on a client’s account. Best for: agencies and ops teams onboarding analysts or rotating account managers frequently.
🔔 24/7 alerts on spend, CTR, and quality drops Stack: Porter MCP + Slack MCP (or Gmail MCP) A Claude Code routine on cron pulls X Ads via Porter, evaluates thresholds — CTR drops below 1%, daily spend spikes 2× the trailing average — and pushes Slack or Gmail alerts the moment something crosses the line. You stop checking dashboards reactively; the dashboard checks itself and tells you when to look. Best for: any team that’s ever discovered a problem 48 hours too late because nobody opened the report.
Bottom line: Claude is for quick questions and ad-hoc dashboards. Claude Code is for building apps, live dashboards, alerts, and actual tools — anything you want to run on its own without re-asking. Same Porter MCP URL works in both, so you don’t pick once and lock in.
Use cases — what you can actually do once X Ads is connected to Claude
Getting the connection right is half the battle. The real value shows up in what you do next. Here are the use cases Porter users build around their X Ads data — from simple Q&A to full client-facing workflows.
1. Chat and ask questions directly
The simplest use case — and still the one 80% of marketers start with. Open Claude, ask a question, get an answer grounded in live data.
It’s the fastest way to replace a daily Ads Manager check-in. But chat is table stakes — the interesting use cases come next.
2. Blend X Ads with your sales data (Stripe, HubSpot, Shopify)
This is where a 360° view gets real. When you connect X Ads and your revenue source (Stripe for SaaS, HubSpot CRM for B2B, Shopify for e-commerce), Claude can map ad campaigns to actual closed-won deals or purchases — using UTMs, campaign names, and timestamps — and give you attribution that no platform-side number can.
Claude handles the UTM mapping and joins. You get a client-ready attribution report that no single platform can generate on its own.
3. Automated alerts and notifications on Slack or Gmail
With Claude Code you can turn X Ads monitoring into a routine that runs on its own. Hook Porter’s MCP (for the data) together with a Slack or Gmail MCP (for delivery), then write a Claude Code scheduled task that pulls performance every morning and pings you only when something actually needs attention.
No dashboards, no daily check-ins. The report comes to you — and only when it matters.
4. Client-ready presentations with live data (Gamma, HTML, PDF)
A common agency pain: you send clients a Data Studio link, Looker breaks, the client panics — and you spend an hour explaining a broken dashboard. With Claude you can build the presentation itself — as a Gamma deck, a custom HTML page, or a PDF — populated with live numbers each time.
The presentation becomes a delivery artifact you send to the client, not a dashboard that depends on another tool staying up. No broken iframe, no login prompts, just the content.
X Ads fields and metrics you can query with Claude
Before you start writing prompts, it helps to know what data is actually available. Porter MCP gives Claude access to 899 X Ads fields and metrics across every reporting level, plus breakdowns by audience, placement, device, and geography. And the same MCP URL also unlocks 25+ other sources — so Claude can blend X Ads with Google Ads, GA4, Shopify, HubSpot and more in a single prompt.
Prompts you can copy-paste today
1. For agencies
Use these when managing multiple client X Ads accounts or shipping weekly client reports.
2. For B2B marketers
Use these for lead-gen optimization, keyword targeting refinement, and profile-visit-to-conversion tracking.
3. For e-commerce teams
Use these for website purchase monitoring, creative fatigue detection, and budget reallocation.
4. Cross-channel
Use these when blending X Ads with other platforms for unified reporting and attribution.
Limits, auth, and best practices for X Ads via Claude
This is the most common failure mode for marketers using X Ads via API or MCP: quota exhaustion during bulk data pulls, not account bans. The marketer is typically an agency owner or in-house performance lead running multi-account audits on Monday mornings — the exact persona Porter serves. The real cost isn’t a suspended account; it’s lost productivity (4–6 hours of manual exports) and delayed client reporting that damages trust. X Ads API’s documented 48-hour reporting delay compounds the problem: even when quota resets, yesterday’s data often isn’t available yet, making “real-time” promises from third-party tools actively misleading.
X’s API enforcement is quota-based and pattern-based, not tool-based. X doesn’t ban advertiser accounts because you used Claude or an MCP server. It throttles or temporarily suspends API access because of how the API was used: sending parallel bursts that exceed per-window request limits, redistributing content IDs at scale without authorization, or scraping aggressively with browser automation. Read-only access within documented rate windows is safe. Parallel write bursts, unbatched bulk reads across dozens of ad accounts, and unauthorized data redistribution are not. The platform returns 429 Too Many Requests errors first, then progressive throttling; suspension is reserved for repeated abuse or policy violations like unauthorized data redistribution.
The three ways to burn through your X Ads quota
After reviewing official docs and community threads, three patterns come up again and again.
1. Parallel API bursts across multiple ad accounts. Sending concurrent requests to pull campaign data from many accounts simultaneously violates per-account and per-app rate windows. X’s API enforces category-level limits such as 450 writes per 1-minute window and 10,000 core entity reads per 15-minute window at the ad account level — exceeding these triggers immediate 429 throttling and can cascade into temporary access suspension if the pattern repeats within a short period. Source: docs.x.com/x-ads-api/fundamentals/rate-limiting. Instead: batch requests sequentially and respect x-rate-limit-remaining headers.
2. Programmatic writes at scale without tier verification. X Ads API requires Premium tier access for write operations (campaign creation, budget changes, bid adjustments). Basic tier is read-only. Attempting write operations from a Basic-tier token will fail silently or return authorization errors — and repeatedly retrying failed writes can burn through your request quota without accomplishing anything. Source: docs.x.com/x-ads-api/fundamentals/rate-limiting + competitor corpus analysis of API tier restrictions. Instead: verify your API tier before enabling write scopes, and use read-only MCP configurations for audit and reporting workflows.
3. Unauthorized redistribution of Post IDs and cached content. X’s developer guidelines impose a hard limit of no more than 1.5 million Post ID redistributions per 30-day period and require deletion of cached X content within 24 hours of a deletion request. Using Claude-generated scripts to pull ad creative content (tweets, images, videos) and redistribute them to external reporting tools or client dashboards without proper authorization violates these terms. Source: docs.x.com/developer-guidelines. Instead: use aggregate performance metrics only (impressions, clicks, spend) and link back to native X assets rather than caching or mirroring them.
All three behaviors trigger quota-based throttling and progressive 429 responses. If you want to use Claude for X Ads safely, batch your reads, verify your tier before writes, and never redistribute creative content without authorization.
The 5-rule scaling protocol
Based on X’s documented rate limits and quotas and the behaviors that have actually caused throttling — not guesswork:
-
Batch your reads; never burst. Stay within the documented 10,000 core entity reads per 15-minute window per ad account and 450 writes per 1-minute window. Exceeding these triggers
429throttling that can lock you out for the remainder of the window. Source: docs.x.com/x-ads-api/fundamentals/rate-limiting. Porter MCP enforces this automatically by queuing requests and respectingx-rate-limit-remainingheaders. -
Verify your API tier before enabling writes. Basic tier tokens are read-only; write operations require Premium tier approval from X. Attempting writes with Basic tier wastes quota and produces authorization failures. Porter MCP defaults to read-only scopes and surfaces a warning if write operations are requested without verified Premium access.
-
Respect the 48-hour reporting delay. X Ads API data is not real-time — campaign performance data typically has a 48-hour delay before it is fully available and reliable. Making budget or targeting decisions based on same-day or yesterday’s API pulls produces inaccurate conclusions. Source: competitor corpus (mcpplaygroundonline.com, 2025) + X Ads API community documentation. Porter MCP surfaces data freshness timestamps on every query so users know exactly how stale each metric is.
-
Limit Post ID redistribution to ≤1.5 million per 30 days. If your workflow involves pulling tweet content, creative IDs, or engagement data for redistribution (e.g., client dashboards, external reports), stay under X’s 1.5 million Post ID redistribution cap per 30-day period and delete cached content within 24 hours of any deletion request. Source: docs.x.com/developer-guidelines. Porter MCP does not cache or redistribute creative content — it queries aggregate metrics only, keeping you well within this limit.
-
Use minimal OAuth scopes and audit annually. Request only the scopes your MCP connection actually needs (typically
ads:readfor reporting;ads:writeonly if Premium tier is confirmed). X requires annual security audits for apps with elevated access. Porter MCP requests the narrowest possible scopes at connection time and logs every API call for audit trails.
What Porter MCP does differently: it enforces these rate limits and safeguards at the platform level. Porter batches API requests across accounts to stay within the 10,000-reads-per-15-minutes and 450-writes-per-minute windows, automatically backing off when x-rate-limit-remaining approaches zero. It defaults to read-only scopes so Basic-tier users never waste quota on unauthorized write attempts. It surfaces data freshness timestamps on every response, making the 48-hour reporting delay transparent rather than hidden. It never caches or redistributes Post IDs, keeping you well under the 1.5M redistribution cap. And it requests minimal OAuth scopes at connection time, reducing both security surface area and audit burden. That’s the behavior X’s automated systems handle gracefully — and that’s why Porter users don’t get throttled.
Frequently asked questions
A X Ads MCP is an open standard that lets AI tools connect to your X Ads data without custom integrations. Porter’s MCP server makes your campaigns, ad accounts, and ad groups available through one URL: no tokens, no scripts, no developer setup.
Claude is the conversational product (web, app, mobile). Claude Code is a terminal-based developer tool that can write scripts, save files, and automate workflows. Both can connect to X Ads via MCP.
No. X Ads data has a 48-hour reporting delay, so same-day and yesterday’s data are often incomplete. Porter MCP surfaces freshness timestamps so you know exactly how current each metric is.
Yes. X enforces 450 writes per 1-minute window and 10,000 core entity reads per 15-minute window per ad account. Porter MCP batches requests and respects rate-limit headers automatically.
Three common reasons: (1) Billing sync lag — API numbers can lag 36 hours behind Ads Manager as transactions finalize. (2) Date range filtering — API and UI may apply different timezone or status filters. (3) Attribution windows — custom attribution settings in Ads Manager may not match API defaults. The fix: compare identical date ranges and verify attribution settings match.
No. X doesn’t ban or restrict accounts for legitimate API usage, and Porter MCP is read-only by default — it stays well inside X’s normal rate limits. The thing to watch is rate throttling from parallel bursts across multiple accounts — see the limits section above.
Ready to chat with your X Ads?
Open Claude, add the Porter connector, and ask your first question. If you don’t have Porter yet, start a free trial and connect your X Ads account — you’ll be chatting with your campaigns in under five minutes.
rocket_launchStart free Porter trialopen_in_newOpen Claude