ads-mcp MCP Server
MCP server for Google Ads and Meta Ads. Wraps both APIs directly to manage campaigns.
ads-mcp scores 61 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 6 tools. Filed under Marketing. GitHub shows 0 stars. Package registries report about 37 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
61 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade A
92/100 for listing completeness. Lost points: 1 of 6 tools barely described, short summary.
How quality is graded
Where the 61 comes from
22 + 15 + 0 + 10 + 4 + 10 = 61. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 15 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 0 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "gudlab-ads-mcp": { "command": "npx", "args": [ "-y", "@gudlab/ads-mcp@0.1.1" ], "env": { "GOOGLE_ADS_CLIENT_ID": "YOUR_GOOGLE_ADS_CLIENT_ID", "GOOGLE_ADS_CLIENT_SECRET": "YOUR_GOOGLE_ADS_CLIENT_SECRET", "GOOGLE_ADS_DEVELOPER_TOKEN": "YOUR_GOOGLE_ADS_DEVELOPER_TOKEN", "GOOGLE_ADS_REFRESH_TOKEN": "YOUR_GOOGLE_ADS_REFRESH_TOKEN", "GOOGLE_ADS_CUSTOMER_ID": "", "GOOGLE_ADS_LOGIN_CUSTOMER_ID": "", "META_APP_ID": "", "META_APP_SECRET": "YOUR_META_APP_SECRET", "META_ACCESS_TOKEN": "YOUR_META_ACCESS_TOKEN", "META_AD_ACCOUNT_ID": "" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
GOOGLE_ADS_CLIENT_IDSecret | Required | OAuth client ID from Google Cloud Console |
GOOGLE_ADS_CLIENT_SECRETSecret | Required | OAuth client secret from Google Cloud Console |
GOOGLE_ADS_DEVELOPER_TOKENSecret | Required | Developer token from Google Ads API Center |
GOOGLE_ADS_REFRESH_TOKENSecret | Required | Refresh token minted via `pnpm google:auth` |
GOOGLE_ADS_CUSTOMER_ID | Required | Default Google Ads account ID, 10 digits, no dashes |
GOOGLE_ADS_LOGIN_CUSTOMER_ID | Optional | MCC account ID, only if the customer account is managed under one |
META_APP_ID | Required | Meta App ID from developers.facebook.com |
META_APP_SECRETSecret | Required | Meta App secret |
META_ACCESS_TOKENSecret | Required | Long-lived System User access token with ads_management scope |
META_AD_ACCOUNT_ID | Required | Default Meta ad account ID, numeric, no act_ prefix |
Tools6Tool docs quality grade D
All capabilitiesPage, link, primary text, headline, description, CTA, urltags
Delivery / reach estimate
get_accounttoolAd account + optional token debug
get_insightstoolAccount / campaign / ad set / ad metrics, presets or custom dates, optional breakdowns
search_targetingtoolKeyword search for interests, behaviours, geo
upload_imagetoolLocal path or URL → image hash
About
ads-mcp
An MCP server wrapping the Google Ads API and Meta Marketing API directly, with no third-party quota or middleman. Point an MCP-compatible client at it and manage Search campaigns, keywords, ads, and the full Meta campaign lifecycle (create, publish, monitor, report) against Google's and Meta's own APIs.
Every write tool that could spend money is safe by default: google_ads_create_search_campaign and every Meta create/copy tool always create objects PAUSED. The only tools that can turn spend on are google_ads_set_campaign_status and meta_ads_set_campaign_status / meta_ads_set_ad_set_status / meta_ads_set_ad_status, called explicitly.
Setup
Credentials require logins and business identity only you have; nothing here can be automated. Do not commit .env.
Google Ads
- Google Cloud project + OAuth client: console.cloud.google.com, new (or existing) project, APIs & Services, Credentials, Create OAuth client ID (type: Desktop app). Copy the Client ID/Secret into
.env. - Under that OAuth client, add
http://localhost:8787/oauth2callbackas an authorized redirect URI. - Developer token: ads.google.com/aw/apicenter, apply for a token. Basic access is free and usually approved within a few days; it allows ~15,000 operations/day. Put it in
.envasGOOGLE_ADS_DEVELOPER_TOKEN. - Run
pnpm installthenpnpm google:auth. This opens a browser, you sign in and consent, and it prints a refresh token to paste into.envasGOOGLE_ADS_REFRESH_TOKEN. - Set
GOOGLE_ADS_CUSTOMER_IDto the 10-digit account ID (no dashes) these tools should operate on by default. If that account is managed under an MCC account, also setGOOGLE_ADS_LOGIN_CUSTOMER_IDto the MCC's ID.
Meta Ads (System User token)
A personal user token dies when Facebook shows a login checkpoint (Graph error 190 / subcode 459). A Business Manager System User token is the supported way to keep Marketing API access independent of a person's browser session.
- Meta App: developers.facebook.com, My Apps, Create App (type: Business). Copy the App ID and App Secret from Settings > Basic into
.envasMETA_APP_ID/META_APP_SECRET. - Business Manager: open business.facebook.com > Business Settings.
- Create a System User: Users > System Users > Add. Admin is simplest for ad account + Page + pixel assignment. Name it something like
ads-mcp. - Assign assets to that System User (Add Assets):
- Ad account: allow manage campaigns (or full control).
- Facebook Page used in creatives: allow create content / manage ads (or full control).
- Pixel used for optimization: allow advertise.
- Generate a token: on the System User, Generate New Token. Select the app from step 1. Request at least:
ads_managementads_readbusiness_managementpages_show_listpages_read_engagementpages_manage_ads(needed to create unpublished Page posts / link creatives) Choose a never-expiring token if the UI offers it.
- Put the token in
.envasMETA_ACCESS_TOKEN. Never commit it. - Set
META_AD_ACCOUNT_IDto the numeric account ID (act_prefix optional). Optionally setMETA_PAGE_IDandMETA_PIXEL_IDso create tools do not need them on every call. - Optional:
META_GRAPH_API_VERSIONpins the Graph version. Default isv26.0.
App Review / Development mode. If the app, ad account, Page and pixel all belong to the same Business, a System User token usually works while the app is in Development mode (Standard Access) without App Review. Advanced Access and App Review are required to manage other businesses' ad accounts, or when the app is Live and those permissions are restricted. ads_management and the pages_* permissions are the ones Meta most often holds behind review.
Housing, employment, credit, and (in some regions) financial products and services ads must set special_ad_categories accordingly (HOUSING, EMPLOYMENT, CREDIT, FINANCIAL_PRODUCTS_SERVICES). Those campaigns have extra targeting limits; Advantage+ may be required or forbidden depending on the category.
Call meta_ads_get_account first. If META_APP_ID and META_APP_SECRET are set, the response includes token debug (scopes, expiry).
Graph errors this server rewrites
| Code | Typical cause | What to do |
|---|---|---|
190 / 102 | Token expired, revoked, or invalid | Generate a new System User token |
190 + subcode 459, or code 459 | User checkpoint | Complete the Facebook login checkpoint, then switch to a System User token |
10, 200-299 | Missing permission or asset assignment | Assign the ad account / Page / pixel; add the scopes above; App Review if Live or cross-business |
100 + error_user_title / error_user_msg | Invalid field or ads policy rejection | Fix the field or creative. Policy rejects cannot be overridden via the API |
4 / 17 / 32 / 613 | Rate limit | Wait and retry |
368 | Temporary policy block | Check Business Support Home and the account Quality tab |
Running
pnpm install
pnpm test
pnpm dev # MCP server over stdio via tsx
pnpm build && pnpm start # compiled version
Once published to npm, it also runs via npx @gudlab/ads-mcp, no local clone needed. Point an MCP-compatible client at it, e.g. in Claude Code's .mcp.json:
{
"mcpServers": {
"ads-mcp": {
"command": "npx",
"args": ["-y", "@gudlab/ads-mcp"],
"env": {
"GOOGLE_ADS_CLIENT_ID": "...",
"GOOGLE_ADS_CLIENT_SECRET": "...",
"GOOGLE_ADS_DEVELOPER_TOKEN": "...",
"GOOGLE_ADS_REFRESH_TOKEN": "...",
"GOOGLE_ADS_CUSTOMER_ID": "...",
"META_APP_ID": "...",
"META_APP_SECRET": "...",
"META_ACCESS_TOKEN": "...",
"META_AD_ACCOUNT_ID": "...",
"META_PAGE_ID": "...",
"META_PIXEL_ID": "..."
}
}
}
}
Before that's published, point it at the local build instead: command: "node", args: ["/path/to/ads-mcp/dist/index.js"], or command: "pnpm", args: ["dev"] with cwd set to this directory for local iteration.
First real run: verify before trusting it
The Google Ads and Meta Marketing APIs both shift field/enum names across versions, so before relying on any tool here for real campaign work:
- Run
google_ads_list_campaigns/meta_ads_get_account/meta_ads_list_campaignsfirst, read-only, the cheapest way to confirm auth and the client libraries are wired correctly. - Test
google_ads_create_search_campaignormeta_ads_create_campaignon a throwaway name, then check it in the ads UI rather than trusting the tool's own response as proof of correctness. - Only after that, use
*_set_*_statuswithACTIVEon a real campaign.
End-to-end Meta example (always paused until the last step)
Budgets are in the ad account currency (e.g. 20 means 20 GBP, sent to Graph as 2000 minor units).
1. meta_ads_get_account
Confirm the token is valid and the account currency / timezone.
2. meta_ads_search_targeting
{ "q": "online shopping", "type": "interest" }
Copy an interest id from the results. Some detailed interests have been retired by Meta; try a broader query or type=behavior if this is empty.
3. meta_ads_estimate_audience
{ "targeting": { "countries": ["GB"], "age_min": 25, "age_max": 54, "interests": [{ "id": "6003139266461" }] },
"optimization_goal": "OFFSITE_CONVERSIONS" }
4. meta_ads_create_campaign
{ "name": "UK leads - paused",
"objective": "OUTCOME_LEADS",
"special_ad_categories": [] }
Returns campaign_id. Status is PAUSED.
5. meta_ads_create_ad_set
{ "campaign_id": "<campaign_id>",
"name": "GB 25-54 shopping",
"daily_budget": 15,
"optimization_goal": "OFFSITE_CONVERSIONS",
"billing_event": "IMPRESSIONS",
"custom_event_type": "COMPLETE_REGISTRATION",
"advantage_audience": false,
"targeting": {
"countries": ["GB"],
"age_min": 25,
"age_max": 54,
"interests": [{ "id": "6003139266461", "name": "Online shopping" }]
} }
Advantage+ audience is off (`targeting_automation.advantage_audience = 0`). Status is PAUSED.
6. meta_ads_upload_image
{ "url": "https://example.com/ads/hero.jpg" }
or { "path": "/absolute/path/hero.jpg" }
Returns hash.
7. meta_ads_create_ad_creative
{ "name": "Homepage v1",
"link": "https://example.com/?utm_source=meta",
"message": "Open an account from your banking app.",
"headline": "Pay from your bank",
"description": "No card needed.",
"image_hash": "<hash>",
"cta_type": "LEARN_MORE",
"url_tags": "utm_source=meta&utm_medium=paid&utm_campaign=uk_leads" }
8. meta_ads_create_ad
{ "name": "Ad 1", "ad_set_id": "<ad_set_id>", "creative_id": "<creative_id>" }
Status is PAUSED. Still no spend.
9. Activate spend, in this order (or campaign last):
meta_ads_set_ad_status { "ad_id": "<ad_id>", "status": "ACTIVE" }
meta_ads_set_ad_set_status { "ad_set_id": "<ad_set_id>", "status": "ACTIVE" }
meta_ads_set_campaign_status { "campaign_id": "<campaign_id>", "status": "ACTIVE" }
10. meta_ads_get_ad_status
Review / rejection lives in ad_review_feedback and issues_info.
11. meta_ads_get_insights
{ "level": "campaign", "object_id": "<campaign_id>", "date_preset": "last_7d" }
Optional: "breakdowns": ["age", "gender", "placement", "day"]
or "since": "2026-10-01", "until": "2026-10-07"
Tool reference
Google Ads (src/google-ads/tools.ts): list_campaigns, get_campaign_structure, create_search_campaign (always PAUSED), add_keywords, set_keyword_status (pause/enable, reversible), remove_keywords (permanent, requires confirm_delete: true), update_bid_strategy, add_negative_keywords, set_campaign_status (the only enable/spend switch).
Meta Ads (src/meta-ads/tools.ts), all names prefixed meta_ads_:
| Tool | Role |
|---|---|
get_account | Ad account + optional token debug |
list_campaigns / get_campaign / get_campaign_structure | Campaigns, nested ad sets and ads |
list_ad_sets / get_ad_set | Ad sets with targeting, budgets, Advantage+ flag |
list_ads / get_ad / get_ad_status / list_ads_by_status | Ads, creatives, ad_review_feedback / issues_info |
get_insights | Account / campaign / ad set / ad metrics, presets or custom dates, optional breakdowns |
search_targeting | Keyword search for interests, behaviours, geo |
estimate_audience | Delivery / reach estimate |
create_campaign / update_campaign | Objective, special_ad_categories, campaign or ad-set budget. Create is PAUSED |
create_ad_set / update_ad_set | Daily budget, optimization, pixel+event, manual targeting, Advantage+ off by default. Create is PAUSED |
upload_image | Local path or URL → image hash |
create_ad_creative | Page, link, primary text, headline, description, CTA, url_tags |
create_ad / update_ad | Attach a creative or replace copy. Create is PAUSED |
set_campaign_status / set_ad_set_status / set_ad_status | Explicit ACTIVE / PAUSED. The only spend switches |
copy_campaign / copy_ad_set / copy_ad | Duplicates, always PAUSED |
Privacy and data handling
All credentials stay in your own .env (never committed, see .gitignore) or your MCP client's own env config, and are used only to call Google's and Meta's APIs directly from your machine. This server sends nothing to any third party: no telemetry, no analytics, no relay service. Every request goes straight from your process to googleads.googleapis.com or graph.facebook.com, using your own developer token and access token.
License
MIT, see LICENSE.
Frequently asked questions
What is ads-mcp MCP Server?
MCP server for Google Ads and Meta Ads. Wraps both APIs directly to manage campaigns.
How do I install ads-mcp MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. ads-mcp MCP Server runs locally from the npm package @gudlab/ads-mcp with the command npx -y @gudlab/ads-mcp@0.1.1.
Is ads-mcp MCP Server free and open source?
Yes. ads-mcp MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does ads-mcp MCP Server support remote (HTTP) connections?
No remote endpoint is listed for ads-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does ads-mcp MCP Server provide?
ads-mcp MCP Server provides 6 tools, including create_ad_creative, estimate_audience, get_account, and get_insights. See the full tool list for descriptions and parameters.
How is ads-mcp MCP Server's trust score calculated?
ads-mcp MCP Server scores 61 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.
