gravity-ads-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gravity-ads-mcppause my campaign 'Summer Sale' and pull its last 7 days of metrics"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gravity-ads-mcp
Local MCP server for the Gravity advertiser dashboard API. Create, edit, pause, and archive campaigns — and pull all your reporting — from any MCP-capable agent without your API key leaving your machine.
Gravity exposes a hosted MCP server at https://platform.trygravity.ai/mcp, but it is read-only. This package wraps the full Gravity Dashboard API (including create/edit) as a local stdio MCP server that runs via npx, so requests go directly from your computer to platform.trygravity.ai — nothing passes through a third party.
Prerequisites
Node.js ≥ 18 (
node --versionto check)npx (bundled with npm; comes with Node)
A Gravity advertiser API key — get yours at https://app.trygravity.ai under Settings → API Key
Related MCP server: Nitrosend
Quickstart
Add the following to your MCP client's configuration file. Replace your-gravity-api-key with your actual key.
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"gravity": {
"command": "npx",
"args": ["-y", "gravity-ads-mcp"],
"env": {
"GRAVITY_API_KEY": "your-gravity-api-key"
}
}
}
}Windows users: If
npxis not found, try"command": "cmd"with"args": ["/c", "npx", "-y", "gravity-ads-mcp"].
Claude Code
Create a .mcp.json file in your project root (or add to ~/.claude/mcp.json for global config):
{
"mcpServers": {
"gravity": {
"type": "stdio",
"command": "npx",
"args": ["-y", "gravity-ads-mcp"],
"env": {
"GRAVITY_API_KEY": "your-gravity-api-key"
}
}
}
}Or add via CLI:
claude mcp add gravity --env GRAVITY_API_KEY=your-gravity-api-key -- npx -y gravity-ads-mcpCursor
~/.cursor/mcp.json:
{
"mcpServers": {
"gravity": {
"command": "npx",
"args": ["-y", "gravity-ads-mcp"],
"env": {
"GRAVITY_API_KEY": "your-gravity-api-key"
}
}
}
}opencode
opencode.json in your project root:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"gravity": {
"type": "local",
"command": ["npx", "-y", "gravity-ads-mcp"],
"environment": {
"GRAVITY_API_KEY": "your-gravity-api-key"
}
}
}
}Note: opencode uses
"environment"(not"env").
Windsurf
~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"gravity": {
"command": "npx",
"args": ["-y", "gravity-ads-mcp"],
"env": {
"GRAVITY_API_KEY": "your-gravity-api-key"
}
}
}
}Other Clients
Any MCP client that supports the mcpServers JSON format (same shape as Claude Desktop) can use this server. Add the following to your client's MCP config file:
{
"mcpServers": {
"gravity": {
"command": "npx",
"args": ["-y", "gravity-ads-mcp"],
"env": {
"GRAVITY_API_KEY": "your-gravity-api-key"
}
}
}
}Environment Variables
Variable | Required | Default | Description |
| Yes | — | Your Gravity advertiser API key |
| No |
| Override the base URL (for testing/staging) |
Tools
Account
Tool | Description |
| Get advertiser profile (ID, name, email) |
| List connected Shopify stores |
| List all tracking pixels |
| Create a conversion pixel for a site URL |
Campaigns
Tool | Description |
| List all campaigns with lifetime stats |
| Full campaign details with targeting config |
| Create a campaign with inline ad groups |
| Edit fields on an existing campaign |
| Pause a campaign |
| Activate a campaign (may trigger billing check) |
| Toggle archive state |
Ad Groups & Ads
Tool | Description |
| List ad groups with embedded ads |
| Single ad group with its ads |
| Create a generative or manual ad group |
| Update ad group fields or status |
| Archive an ad group and its ads |
| Add a manual ad to a manual ad group |
| Edit a manual ad's copy, CTA, etc. |
| Archive a manual ad |
Reporting
Tool | Description |
| Daily time-series: impressions, clicks, spend, conversions, CTR, CPC, CPM, CPA, ROAS |
| Per-ad-unit daily metrics |
| Per-ad-group daily metrics (paginated) |
| Recent conversions with cursor pagination |
| Billing summary (spend, billed, unbilled, credits) |
| Pixel event analytics (domains, hourly, event types) |
| Conversion time-series by event type |
Example Prompts
Once configured, try asking your agent:
"List my active campaigns"
"What's my ROAS for the last 14 days?"
"Create a campaign called 'Summer Sale' with a $100/day budget, targeting US and CA, using a generative ad group for running shoes"
"Pause all campaigns over $500 spend"
"Show me ad group performance for campaign camp-456 over the last 7 days in America/New_York"
"Create a manual ad group with these ads: headline '50% Off Running Shoes', copy 'Summer sale on all running shoes.', CTA 'Shop Now'"
"What conversions did I get yesterday?"
"Create a pixel for https://acme.com"
Security & Privacy
Your
GRAVITY_API_KEYis passed as a process environment variable and never logged or transmitted to any server other thanplatform.trygravity.ai.All API requests go directly from your machine to Gravity's API — no intermediary.
Running via
npxmeans no global install; the server starts fresh each session.Regenerate your key anytime at https://app.trygravity.ai under Settings → API Key.
Troubleshooting
Problem | Fix |
| npx downloads the package on first invocation — give it 10–20 seconds. |
401 Authentication error | Double-check your |
402 Campaign activation blocked | Your billing needs attention — check the Billing page in your Gravity dashboard. |
422 Validation error | The server response includes details. Ask your agent to check the error and adjust the payload. |
OpenAI accounts: daily totals differ from dashboard | Set |
Windows: | Use |
Contributors
For local setup, building, testing, and publishing instructions, see DEVELOPMENT.md.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for AI agents to manage ad campaigns across Google, Meta, LinkedIn, Microsoft, Reddit, TikTok, and more217116MIT
- AlicenseNot gradedqualityBmaintenanceAI-native email marketing platform built for agents. Control campaigns, automations, contacts, templates, and analytics via MCP with OAuth authentication.772MIT
- AlicenseAqualityAmaintenanceMCP server for Microsoft Advertising (Bing Ads) REST API enabling agent-led campaign management and reporting. It provides tools to manage campaigns, ad groups, keywords, ads, budgets, and pull performance reports.66MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Google Ads API through MCP, allowing search and listing of accessible customers.Apache 2.0
Related MCP Connectors
AgentIQ MCP for MoltAd: AI agent ads — placements, campaigns, coupons, attribution, cash out.
MCP Server for agents to onboard, pay, and provision services autonomously with InFlow
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/niyogi/gravity-ads-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server