Connect the X Ads API
Integrate the X Ads API through Modiva’s unified REST API and hosted MCP server. Manage X (Twitter) ad campaigns and read reporting. OAuth, token refresh, rate limits and 9 typed tools are handled for you — connect once and call X Ads from any agent or app through a single endpoint.
What you can do with the X Ads API
- ✓ Campaign management
- ✓ Reporting
- ✓ Audiences
- ✓ Creative upload
- — Webhooks (Most ad APIs are poll-based)
X Ads MCP tools & scopes
- accounts_
- list · health · status
- ads_campaigns
- list · create · pause · resume
- ads_reporting
- spend · conversions · roas
- analytics_
- unified · breakdown
OAuth scopes requested
- Read ad accounts
- Create & manage campaigns
- Read spend & conversion reporting
Connect X Ads in your agent
# Add Modiva's MCP server to your agent
{
"mcpServers": {
"modiva": {
"url": "https://mcp.modiva.ai",
"headers": { "Authorization": "Bearer $MODIVA_MCP_KEY" }
}
}
}
# Then connect X Ads and call its tools, e.g.
accounts_list(provider="x-ads")Frequently asked questions
How do I connect the X Ads API with Modiva?
Create a Modiva account, generate an MCP key, and connect X Ads from your dashboard. Modiva runs the full OAuth flow and stores the encrypted token for you — no client secrets in your code.
What can I do with the X Ads API through Modiva?
Manage X (Twitter) ad campaigns and read reporting. You get 9 typed tools grouped by resource (accounts_, ads_campaigns, ads_reporting, analytics_), callable over REST or the MCP server.
Do I need to handle OAuth or token refresh myself?
No. Modiva handles the X Ads OAuth handshake, token storage (envelope-encrypted) and automatic refresh. You call a single unified endpoint.
Can an AI agent use the X Ads API?
Yes — that is the point. Modiva exposes X Ads as Model Context Protocol (MCP) tools, so agents like Claude, Cursor or your own app can read and act on X Ads through one endpoint.