|
| 1 | +# X Ads |
| 2 | + |
| 3 | +Cursor plugin that connects agents to the [X Ads API](https://docs.x.com/x-ads-api/introduction) through X's official hosted [Model Context Protocol](https://modelcontextprotocol.io/) server at `https://ads-api.x.com/mcp`. |
| 4 | + |
| 5 | +This plugin signs you in with OAuth as your own X account and works with the ads accounts you can access. Agents can manage campaigns, create ads, set up pixels and conversion tracking, and pull performance stats. |
| 6 | + |
| 7 | +This is a separate plugin from the [X](../x/) plugin: the ads MCP server lives on a different subdomain (`ads-api.x.com` vs `api.x.com`) and requires different OAuth scopes, so it needs its own authorization. Installing both means signing in twice — once per plugin. |
| 8 | + |
| 9 | +## Install |
| 10 | + |
| 11 | +1. Open **Cursor Settings → Plugins**. |
| 12 | +2. Search for **X Ads**. |
| 13 | +3. Click **Install**, then complete the OAuth sign-in when prompted. |
| 14 | + |
| 15 | +Or run `/add-plugin x-ads` in chat. |
| 16 | + |
| 17 | +## MCP |
| 18 | + |
| 19 | +```json |
| 20 | +{ |
| 21 | + "mcpServers": { |
| 22 | + "x-ads": { |
| 23 | + "type": "http", |
| 24 | + "url": "https://ads-api.x.com/mcp", |
| 25 | + "auth": { |
| 26 | + "CLIENT_ID": "NGdZYmo4VVp2T1BnRG55NlExOGQ6MTpjaQ", |
| 27 | + "scopes": [ |
| 28 | + "ads.read", |
| 29 | + "ads.write", |
| 30 | + "media.write", |
| 31 | + "offline.access" |
| 32 | + ] |
| 33 | + } |
| 34 | + } |
| 35 | + } |
| 36 | +} |
| 37 | +``` |
| 38 | + |
| 39 | +## What agents can do |
| 40 | + |
| 41 | +| Category | Capabilities | |
| 42 | +| --- | --- | |
| 43 | +| Accounts | Read your ads accounts, funding instruments, and settings | |
| 44 | +| Campaigns | Create, update, pause, and read campaigns and line items | |
| 45 | +| Ads & creatives | Create and manage promoted ads and creatives | |
| 46 | +| Audiences | Read and manage targeting and audiences | |
| 47 | +| Pixels & conversions | Set up the X pixel and conversion tracking | |
| 48 | +| Analytics | Pull campaign, line item, and ad performance stats | |
| 49 | + |
| 50 | +## Setup |
| 51 | + |
| 52 | +No token to paste — the plugin ships with X's OAuth client ID (the same one the X connector uses) and requests the scopes below. On first use, Cursor opens a browser window where you sign in to X and approve access. The `offline.access` scope lets Cursor refresh the session automatically, so you only sign in once. |
| 53 | + |
| 54 | +Requests run in your user context against the ads accounts your X account can access. You can revoke access at any time from your X account's connected apps settings. |
| 55 | + |
| 56 | +## Scopes requested |
| 57 | + |
| 58 | +`ads.read`, `ads.write`, `media.write`, `offline.access` |
| 59 | + |
| 60 | +## Docs |
| 61 | + |
| 62 | +- X Ads API: https://docs.x.com/x-ads-api/introduction |
| 63 | +- OAuth protected resource metadata: https://ads-api.x.com/.well-known/oauth-protected-resource |
| 64 | +- Authentication overview: https://docs.x.com/fundamentals/authentication/overview |
| 65 | + |
| 66 | +Logo is X's official mark from the [X brand toolkit](https://about.x.com/en/who-we-are/brand-toolkit), placed on a black tile matching X's own app icon. |
| 67 | + |
| 68 | +## License |
| 69 | + |
| 70 | +MIT |
0 commit comments