Skip to content

Summary

X's official remote MCP server for advertisers — 23 tools to read campaign data, run analytics and create or activate campaigns from any MCP client.

Features

  • Remote server at https://ads-api.x.com/mcp — nothing to install
  • 23 tools across reads, analytics, targeting search and writes
  • Campaign, line item, funding instrument and promoted post reads
  • Account statistics and campaign reach estimates
  • Ten write tools that create and activate live campaigns
  • Scoped OAuth 2.0: ads.read, ads.write and offline.access

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "X Ads MCP" tools will be available.
{
  "mcpServers": {
    "x-ads-mcp": {
      "command": "claude",
      "args": [
        "mcp",
        "add",
        "x-ads",
        "https://ads-api.x.com/mcp",
        "--transport",
        "http",
        "--client-id",
        "YOUR_OAUTH2_CLIENT_ID",
        "--callback-port",
        "8080"
      ]
    }
  }
}

Description

X's official remote Model Context Protocol server for the X Ads API, launched 24 August 2026. It is built into X's own API gateway rather than shipped as a package, so there is nothing to install locally: point an MCP client at https://ads-api.x.com/mcp and authenticate over OAuth 2.0.

The server exposes 23 tools in four groups. Accounts and reads list and fetch campaigns, line items, funding instruments, targeting criteria, promoted posts and account posts. Analytics covers account statistics and campaign reach estimates. Targeting search discovers interests and locations. Writes — ten of the 23 tools — create and activate campaigns and line items, manage targeting, and create ad posts.

That write capability is the thing to plan around: those tools act on live advertising accounts and spend real money. Access is scoped, so the safe default is to grant ads.read and offline.access only, and add ads.write deliberately. In Claude Code the client requests every advertised scope by default; restricting it means editing ~/.claude.json and setting "scopes": "ads.read offline.access" by hand.

Setup runs through the existing X developer console. Register an app with Read/Write permission as a Native App type, set the callback URI to http://localhost:8080/callback, copy the OAuth 2.0 Client ID (not the numeric app ID), enable Ads Project access, and confirm your X account can reach at least one ads account. Native apps use PKCE; confidential clients pass a secret via environment variable.

Transport is HTTP POST carrying JSON-RPC with SSE-framed responses, so it works with Grok, Claude, and custom agents built on the MCP SDKs. X joins Meta, Pinterest, TikTok and Snapchat in shipping an advertiser-facing MCP server.

Related MCP Servers

New

Official Xero MCP server that lets an agent read and write a real accounting ledger — invoices, contacts, payments, payroll timesheets and financial reports — over the Xero API.

New

Modern Treasury's official MCP server, built on Code Mode: the agent writes TypeScript against the payments SDK and runs it in a sandbox instead of calling one tool per endpoint.

MCP: Binance

by Binance

New

Binance's official MCP server, part of Agent OS — spot and futures trading, live market data and account access, with per-agent permissions and funding limits.

MCP: Ramp

by Ramp

New

Ramp's official remote MCP server for corporate spend — read transactions, bills and reimbursements, and with the right role edit, approve and lock cards.

Browse all MCP servers →