Ad Campaign 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., "@Ad Campaign MCPWhat are my active ad campaigns?"
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.
Ad Campaign MCP
An MCP (Model Context Protocol) client/server integration built with TypeScript/Node.js. It connects an AI assistant to a small REST API over structured, typed tools — with real error handling for a down API or a missing record — rather than the assistant calling the API directly.
Architecture
MCP client (AI assistant)
│ stdio, JSON-RPC
▼
MCP server (src/index.ts)
│ HTTP
▼
Campaign REST API (src/api.ts, Express)
│ SQL
▼
Postgres (docker-compose.yml)Postgres —
advertisers,campaigns,impressions, andclickstables, created on API startup bysrc/db.ts.REST API (
src/api.ts) —GET /campaigns(optionally filtered by?status=) andGET /campaigns/:id, backed by Postgres.MCP server (
src/index.ts) — exposes two tools that call the REST API and translate its responses (including non-2xx statuses and connection failures) into MCP tool results.
Related MCP server: Google Ads API v20 MCP Server
Getting started
docker compose up -d # start Postgres
npm install
npm run api # start the REST API on :3000
npm run build # compile the MCP server to dist/Run the MCP server directly during development with npm run dev (uses
tsx, no build step needed), or run the compiled version with
node dist/index.js. The compiled version starts noticeably faster,
since it skips on-the-fly TypeScript transpilation — worth using for an
MCP client that spawns the server, since Client.connect() has a
default 60s handshake timeout.
The API URL defaults to http://localhost:3000; override it with the
API_BASE_URL environment variable if the REST API runs elsewhere.
Sample API calls
There's no POST /campaigns endpoint yet, so the table starts empty —
seed a row directly via SQL first, or the calls below just return []
/ 404.
Seed a campaign (direct SQL)
docker exec -it ad-campaign-postgres psql -U postgres -d adplatform -c "
INSERT INTO advertisers (name) VALUES ('Acme Corp') RETURNING id;
-- suppose that returns id = 1
INSERT INTO campaigns (id, advertiser_id, name, status, budget, start_date, end_date)
VALUES ('camp_001', 1, 'Summer Launch', 'active', 5000.00, '2026-06-01', '2026-08-31');
"GET /campaigns — list all
curl http://localhost:3000/campaigns[
{
"id": "camp_001",
"advertiser_id": 1,
"name": "Summer Launch",
"status": "active",
"budget": "5000.00",
"start_date": "2026-06-01T00:00:00.000Z",
"end_date": "2026-08-31T00:00:00.000Z",
"created_at": "2026-08-29T10:00:00.000Z",
"updated_at": "2026-08-29T10:00:00.000Z"
}
]GET /campaigns?status=active — filtered by status
curl "http://localhost:3000/campaigns?status=active"GET /campaigns/:id — single campaign
curl http://localhost:3000/campaigns/camp_001Returns the same object as above, unwrapped from the array.
GET /campaigns/:id — not found
curl -i http://localhost:3000/campaigns/does-not-existHTTP/1.1 404 Not Found
{"error":"Campaign not found"}Tools exposed
list_campaigns— list campaigns, optionally filtered bystatus(active|paused|draft).get_campaign— fetch a single campaign byid; returns an error result (not a thrown exception) for a 404 or an unreachable API.
Trying it end-to-end
npm run build
node demo-mcp-client.mjsThis spawns the compiled MCP server, performs the MCP handshake, lists its tools, and calls each one — including the 404 case — printing the results.
Known limitations
The REST API has no authentication — anything reaching
:3000can read campaign data.No
POST/PUTendpoints yet — campaigns can only be seeded directly via SQL, not created through the API or the MCP tools.
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables users to manage Uber advertising campaigns through natural language by providing access to Uber's External Ads API. Supports campaign creation, retrieval, updating, and deletion with comprehensive filtering and configuration options.5
- AlicenseNot gradedqualityDmaintenanceProvides comprehensive access to Google Ads API v20, enabling AI assistants to manage campaigns, accounts, assets, and reporting through natural language. It features automatic retry logic, GAQL query support, and advanced functionality for Performance Max and Demand Gen campaigns.11MIT
- -licenseNot gradedqualityCmaintenanceExposes 23 AdTech tools as REST endpoints for AI agents to discover and call via HTTP.
- AlicenseNot gradedqualityDmaintenanceProvides access to Google Ads API for comprehensive campaign analytics, enabling conversational ad performance analysis with Claude Code.832MIT
Related MCP Connectors
Manage AI assistants, history, calls, campaigns, contacts, knowledge, messaging, and automations.
Manage ad campaigns across Google, Meta, LinkedIn, Reddit, TikTok, and more via AI.
Manage ad campaigns across Google, Meta, LinkedIn, Reddit, TikTok, and more via AI.
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/RPriya2019/ad-campaign-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server