explainx.ainewsletter3.5k
TrendingNewsPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

corporate training

support@explainx.ai

get started

Find your pathTake Free Evaluation

learn

pathways — start freeworkshopsbootcampscoursescertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsagentsllmsdesignsdictionaryagi trackerranks

company

aboutvisionmissionteaminstructorscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource libraryfor LLMsexplainx.ai kids

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportcontactprivacytermsdata rightshow we create contentsubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

On this page

  • TL;DR: what can X Ads MCP actually do?
  • What X actually documented
  • Read access and write access should be separate products
  • Paused by default is useful—but it is not an approval gate
  • A production approval contract for ad-spend agents
  • What about prompt injection and “ad fraud at machine speed”?
  • Safe prompts to use first
  • How to connect without granting writes
  • The practitioner takeaway
  • Related on explainx.ai
← Back to blog

explainx / blog

X Ads MCP: What Its 23 Tools Can Do—and How to Gate Ad Spend

X Ads MCP gives AI agents 23 tools for analytics and campaign writes. Learn how OAuth scopes, paused defaults, approval gates, and budgets should work.

Aug 22, 2026·9 min read·Yash Thakker
X AdsMCPAI AgentsMarketing AutomationAgent Security
go deep
X Ads MCP: What Its 23 Tools Can Do—and How to Gate Ad Spend

As of August 22, 2026, X's official developer documentation describes a new X Ads MCP endpoint at https://ads-api.x.com/mcp. It gives MCP-compatible AI clients a natural-language path into X Ads reporting and campaign management without requiring teams to write their own Ads API adapter.

The headline circulating on X was that agents can create and manage advertising campaigns through conversation. That is directionally correct, but incomplete. The official X Ads MCP documentation lists 23 tools, separates read access from write access with OAuth scopes, and creates campaigns in a paused state. It also exposes explicit activation tools. For anyone building AI marketing agents, that final detail is where the architecture starts—not where the safety discussion ends.

Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

TL;DR: what can X Ads MCP actually do?

table · 2 cols
QuestionDirect answer
Is the launch real?Yes. X's official developer docs publish a remote Ads MCP endpoint and a 23-tool API reference.
Is it only for analytics?No. Thirteen documented tools are reads, analytics, or targeting search; ten create, update, activate, promote, or remove data.
Can I make it read-only?Yes. Grant ads.read and omit ads.write.
Do new campaigns spend immediately?No. X says new campaigns and line items are created paused.
Can the agent activate them later?Yes. activate_campaign and activate_line_item are documented write tools.
Does X require a human approval before activation?The public Ads MCP docs do not document a mandatory approval gate. Add one in your client or gateway.
What should teams deploy first?A read-only analyst, then paused drafting, then a separately authorized activation workflow.

What X actually documented

X describes Ads MCP as a remote Model Context Protocol server using Streamable HTTP. An MCP client discovers the tool schemas and calls the hosted endpoint; X translates those calls into version 12 Ads API operations.

AI marketing agent funnel representing X Ads MCP campaign analysis and controlled execution

The official API reference divides the 23 tools into four practical groups:

table · 4 cols
SurfaceCountExamplesRisk level
Account and campaign reads9List accounts, campaigns, line items, funding instruments, promoted posts, targeting, account postsLow to medium; can expose sensitive business data
Analytics2Account statistics, campaign reachLow to medium; decisions can still be wrong if metrics are delayed or misread
Targeting search2Search interests and locationsLow; useful for planning
Writes10Create/update/activate campaigns and line items, add/remove targeting, create ad posts, promote postsHigh; can change public creative, targeting, and spend state

This is not merely a chat interface over dashboards. A model can chain account lookup, funding-instrument selection, campaign creation, line-item creation, targeting, creative creation, promotion, and activation. That is real execution authority.

The implementation is also distinct from X's earlier general-purpose hosted MCP at api.x.com/mcp. The earlier server focuses on posts, search, users, bookmarks, news, trends, and Articles; our X hosted MCP setup guide covers that surface. Ads MCP lives at ads-api.x.com/mcp, uses Ads-specific scopes, and maps to the X Ads API.

Read access and write access should be separate products

X documents three relevant OAuth scopes:

table · 3 cols
ScopeWhat X says it enablesRecommended production use
ads.readRead and analytics toolsDefault for analysts, reporting bots, and diagnostics
ads.writeCampaign and creative writesTemporary or tightly gated execution identity
offline.accessRefresh-token supportNeeded for durable sessions; protect the rotating refresh token as a secret

This is a meaningful boundary. A reporting agent can answer “Which campaigns lost reach last week?” without receiving the ability to alter targeting or publish a promoted post.

But ads.write is broad. In the public documentation, it covers both drafting operations and activation operations. X does not document a finer OAuth split such as ads.draft versus ads.activate. That means the safest architecture is to treat analysis and execution as separate trust zones, even if both ultimately use the same server.

text
Untrusted briefs + reporting data
        ↓
Read-only agent: ads.read
        ↓
Structured change proposal
        ↓
Policy checks + human approval
        ↓
Short-lived write session: ads.write
        ↓
Create paused entities → verify exact IDs → activate

Use a dedicated X app for each zone when practical. Separate credentials make revocation, monitoring, and incident response much clearer than one long-lived token shared by every marketing workflow.

Paused by default is useful—but it is not an approval gate

X's best built-in safety choice is straightforward: new campaigns and line items start paused. The docs state that “campaigns and line items are always created PAUSED,” so a malformed creation request should not immediately begin buying impressions.

That protects the creation step. It does not protect the whole workflow.

The same documented server exposes activate_campaign and activate_line_item. If the MCP client has ads.write, and its policy lets the model call every discovered tool, the model can potentially create and then activate in one tool chain. Nothing in the public Ads MCP page says a human must approve between those calls.

This is the same distinction explained in our human-in-the-loop AI framework: a reversible draft can run autonomously, while the action that creates external cost should cross a deliberate checkpoint. “Starts paused” is a safe default. “Cannot activate without a separate approver” is an enforceable control.

A production approval contract for ad-spend agents

Before any activation, generate a review artifact that is boring, complete, and machine-checkable. At minimum, it should freeze:

  • Ads account ID and funding instrument
  • Campaign and line-item IDs
  • Objective, bid type, bid amount, daily budget, and total budget
  • Start and end time in the account's timezone
  • Target countries, locations, interests, exclusions, and audience size estimate
  • Promoted post or creative ID, exact copy, media, and landing-page URL
  • Policy category and any required X pre-authorization
  • The prompt, model version, tool calls, and source data used to make the recommendation
  • Approver identity, approval timestamp, activation result, and rollback owner

The activation service should reject any request whose live object differs from the approved snapshot. That prevents a human from approving a $100 test while the agent later activates a mutated $10,000 campaign.

For a first rollout, use this autonomy ladder:

  1. Observe: ads.read only; the agent reports metrics and anomalies.
  2. Recommend: the agent proposes budgets, targeting, and creative but makes no writes.
  3. Draft: a restricted write session creates paused entities only.
  4. Approve: a human reviews the frozen object IDs and financial exposure.
  5. Activate: a non-LLM policy service, or a separately approved tool call, changes state.
  6. Monitor: automated rules pause campaigns on overspend, policy errors, or metric anomalies.

This follows the broader MCP security guide: least privilege, explicit trust boundaries, and auditability matter more than whether the tool endpoint itself is first-party.

What about prompt injection and “ad fraud at machine speed”?

There is no evidence in X's documentation that Ads MCP itself creates a new ad-fraud technique. MCP standardizes tool access; it does not independently decide to commit fraud. The more defensible concern is execution speed plus compromised instructions.

An ad agent may reason over creative briefs, landing pages, account posts, campaign names, analytics exports, email, or documents. Any attacker-controlled text in that context can attempt indirect prompt injection: “ignore the budget,” “promote this post,” or “send performance data elsewhere.” If the same agent can read untrusted material and invoke activation tools, the blast radius moves from a bad recommendation to real spend.

Controls should therefore include:

  • Tool allowlists: disable activation and targeting deletion in general chat sessions.
  • Budget ceilings: enforce daily and lifetime limits outside the prompt.
  • Account allowlists: prevent a client or agency agent from crossing tenant boundaries.
  • Input provenance: label briefs, webpages, posts, and retrieved text as data—not instructions.
  • No secret echoing: never place OAuth tokens, client credentials, or refresh tokens in model-visible prompts or logs.
  • Idempotency and deduplication: stop retries from creating duplicate campaigns or promoted posts.
  • Anomaly detection: alert or pause on spend velocity, targeting expansion, unexpected geographies, or rapid creative churn.
  • Immutable audit events: preserve the proposal, approvals, tool parameters, responses, and state transitions.
  • Kill switch: revoke the write app or token and pause affected campaigns without relying on the agent that failed.

Human review helps, but it should not carry the whole system. Real approval decisions degrade under repetition, as the 40,000-play agent approval study illustrates. Reserve human attention for the compact set of irreversible, costly, or public actions and let deterministic policy reject obvious violations first.

Safe prompts to use first

With a read-only token, start with diagnosis:

text
List the X Ads accounts I can access. For the selected account, compare campaign
spend, impressions, engagements, and reach for the last seven complete days.
Return observations and missing data only. Do not request or call write tools.

For a controlled draft session:

text
Create a PAUSED test campaign and PAUSED line item from the approved brief below.
Before calling any tool, restate the account ID, funding instrument, objective,
budget, bid, dates, targeting, creative ID, and landing page. Never call
activate_campaign or activate_line_item. Return the created IDs for review.

For approval, do not use “looks good” as the contract. Require exact values:

text
Compare the live paused campaign and line item against approval record AP-1042.
If any ID, budget, bid, dates, targeting, creative, or landing URL differs, stop.
If every field matches, produce a signed activation request for the policy
service. Do not activate from this session.

The prompt is guidance, not enforcement. The OAuth scope, tool filter, budget policy, and activation service are the actual control plane.

How to connect without granting writes

X's docs provide setup recipes for Grok, Grok Build, Claude Code, static tokens, and custom MCP SDK clients. For Claude Code, the official connection command is:

bash
claude mcp add x-ads https://ads-api.x.com/mcp \
  --transport http \
  --client-id YOUR_OAUTH2_CLIENT_ID \
  --callback-port 8080

X notes that Claude Code does not expose a scope flag in that command. To restrict it to read-only, configure the server entry in ~/.claude.json with a space-separated scope string:

json
{
  "oauth": {
    "scopes": "ads.read offline.access"
  }
}

Use a public/native X app, register the callback URL exactly, enroll it in an Ads Project, and verify the signed-in X user has access to the intended ads account. Do not paste access tokens into a chat transcript. For broader MCP client patterns, see our Claude connectors guide and the explainx.ai MCP server directory.

The practitioner takeaway

X Ads MCP removes integration work, not governance work. Its read-only surface is immediately useful for reporting and diagnosis. Its paused-write workflow is a sensible second step. Production activation should remain a separately authorized event with fixed budgets, exact-object approval, immutable logs, and a fast kill switch.

The most important implementation choice is simple: do not let the same unconstrained conversation both absorb untrusted marketing context and activate spend. Split read from write, draft from activation, and recommendation from approval.

Related on explainx.ai

  • X hosted MCP servers: connect Cursor, Claude, and Grok to the X API
  • What is MCP? Complete architecture guide
  • MCP security guide: secure AI agent tool access
  • Human-in-the-loop AI: where agent approval gates belong
  • What is indirect prompt injection?
  • Build AI marketing agents with Claude
  • Cloudflare Wallets: programmable payment caps for AI agents
  • X's open-source For You ranking system

Official references: X Ads MCP setup, X Ads MCP tool reference, X Ads API authentication, and X Ads analytics.

X Ads MCP endpoints, tool counts, OAuth scopes, and paused-creation behavior are accurate as of August 22, 2026 based on X's official developer documentation. The approval, budget, audit, and prompt-injection controls above are explainx.ai's production recommendations, not documented X platform guarantees.

Spotted something out of date? Let us know.
Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

Related posts

Aug 21, 2026

What is Microsoft Copilot Studio? Build Your First AI Agent (2026 Guide)

Microsoft 365 Copilot answers questions inside Word and Outlook; Copilot Studio is where you build your own agent from scratch — topics, grounded knowledge, connector actions, and 2026's MCP support. This guide walks through building a real FAQ agent end to end and publishing it to Teams.

Aug 20, 2026

Binance Agent OS: MCP Server That Lets Claude and ChatGPT Trade Crypto

Binance Agent OS, announced August 20, 2026, is a developer platform with a Model Context Protocol server that lets AI agents in ChatGPT, Claude Code, Codex, and Cursor access market data, manage subaccount portfolios, and execute trades under user-configured permissions — with withdrawals blocked by default and $20/day limits on wallet transactions.

Aug 19, 2026

Claude Gmail and Drive Connectors Get Write Actions — With Approval by Default

Anthropic expanded Claude's Google Workspace connectors on August 18, 2026 — Gmail can now send, reply, and forward; Drive can share, move, and trash files. Approval is required by default, with Team and Enterprise owners controlling whether members can skip per-action confirmation. The same day, Claude Cowork rolled out to all paid accounts on mobile and web.