io.github.AleemHaider/google-ads-manager-mcp
Unofficial MCP server for Google Ads: reporting plus safe draft/confirm campaign management.
ماذا يمكنك أن تفعل مع io.github.AleemHaider/google-ads-manager-mcp؟
list_accessible_customers— which accounts this refresh token can reachsearch_gaql— run any raw GAQLSELECTqueryget_campaigns— campaigns with status, budget, and core metricsget_ad_groups— ad groups (optionally filtered to a campaign) with metricsget_keywords— keyword criteria with match type, status, and metricsget_search_terms— actual search terms that triggered your ads, for finding negative keyword candidatescreate_campaign— new campaign + budget, createdPAUSEDunless you say otherwiseupdate_campaign_status— enable / pause / remove a campaign
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
google-ads-manager-mcpclaude mcp add google-ads-manager-mcp -e 'GOOGLE_ADS_CLIENT_ID=<GOOGLE_ADS_CLIENT_ID>' -e 'GOOGLE_ADS_CLIENT_SECRET=<your google_ads_client_secret>' -e 'GOOGLE_ADS_DEVELOPER_TOKEN=<your google_ads_developer_token>' -e 'GOOGLE_ADS_REFRESH_TOKEN=<your google_ads_refresh_token>' -e 'GOOGLE_ADS_CUSTOMER_ID=<GOOGLE_ADS_CUSTOMER_ID>' -e 'GOOGLE_ADS_LOGIN_CUSTOMER_ID=<GOOGLE_ADS_LOGIN_CUSTOMER_ID>' -- npx -y google-ads-manager-mcp@1.0.0
{
"mcpServers": {
"google-ads-manager-mcp": {
"command": "npx",
"args": [
"-y",
"google-ads-manager-mcp@1.0.0"
],
"env": {
"GOOGLE_ADS_CLIENT_ID": "<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_CUSTOMER_ID>",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "<GOOGLE_ADS_LOGIN_CUSTOMER_ID>"
}
}
}
}
متغيرات البيئة
GOOGLE_ADS_CLIENT_IDإلزامي OAuth client ID from a Google Cloud 'Desktop app' credentialGOOGLE_ADS_CLIENT_SECRETإلزامي سري OAuth client secret from the same Google Cloud credentialGOOGLE_ADS_DEVELOPER_TOKENإلزامي سري Developer token from Google Ads > Tools & Settings > API CenterGOOGLE_ADS_REFRESH_TOKENإلزامي سري OAuth refresh token, generated by running `npm run auth`GOOGLE_ADS_CUSTOMER_IDإلزامي The Google Ads account this server manages (10-digit ID, dashes optional)GOOGLE_ADS_LOGIN_CUSTOMER_IDManager (MCC) account ID, only needed if GOOGLE_ADS_CUSTOMER_ID is a client account under a manager account
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
Google Ads Manager MCP
Unofficial, community-maintained project. Not affiliated with, endorsed by, or sponsored by Google. "Google Ads" is a trademark of Google LLC.
A local MCP (Model Context Protocol) server that lets an AI assistant read and manage a Google Ads account: run GAQL reports, create campaigns, pause/enable campaigns, and add keywords.
Google also publishes an official Google Ads MCP server, which is read-only (reporting/diagnostics only). This project covers the same reporting ground and adds write support — creating and editing campaigns, budgets, ad groups, keywords, and ads — gated behind a draft/confirm safety layer so nothing changes in your account by accident.
Every write goes through a draft → confirm safety flow: the tool that "creates" or "updates"
something only validates the change against Google's API (validate_only) and hands back a
draftId with a preview. Nothing changes in your Ads account until you call confirm_write with
that draftId. Drafts expire after 10 minutes.
Tools
Read-only:
list_accessible_customers— which accounts this refresh token can reachsearch_gaql— run any raw GAQLSELECTqueryget_campaigns— campaigns with status, budget, and core metricsget_ad_groups— ad groups (optionally filtered to a campaign) with metricsget_keywords— keyword criteria with match type, status, and metricsget_search_terms— actual search terms that triggered your ads, for finding negative keyword candidates
Write (draft → confirm):
create_campaign— new campaign + budget, createdPAUSEDunless you say otherwiseupdate_campaign_status— enable / pause / remove a campaignupdate_campaign_budget— change an existing campaign's daily budgetadd_keywords— add keyword criteria to an ad groupcreate_ad_group— new ad group inside an existing campaignupdate_ad_group_status— enable / pause / remove an ad groupupdate_keyword_status— enable / pause / remove a keyword criterionadd_negative_keywords— add negative keyword criteria to an ad groupcreate_responsive_search_ad— new responsive search ad, createdPAUSEDunless you say otherwiseconfirm_write— execute a previously returneddraftIdfor real
Setup
1. Google Ads developer token
Google Ads → Tools & Settings → API Center. Test-account tokens are issued instantly; a production-level token requires Google's manual review (roughly 1-2 weeks), so apply for that early if you'll use this beyond a test account.
2. OAuth client
Google Cloud Console → APIs & Services → Credentials → Create credentials → OAuth client ID. Choose application type Desktop app. Copy the client ID and client secret.
3. Configure environment
cp .env.example .env
Fill in GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET, GOOGLE_ADS_DEVELOPER_TOKEN, and
GOOGLE_ADS_CUSTOMER_ID (the account this server should manage — 10 digits, dashes optional). If
that account is a client under a manager (MCC) account, also set GOOGLE_ADS_LOGIN_CUSTOMER_ID to
the manager account's ID.
4. Get a refresh token
npm install
npm run auth
This opens an authorization URL — open it, sign in with the Google account that has access to
your Ads account, approve the adwords scope. The script prints a GOOGLE_ADS_REFRESH_TOKEN;
add it to .env.
5. Build
npm run build
6. Point your MCP client at it
For Claude Desktop / Claude Code, add to your MCP config:
{
"mcpServers": {
"google-ads-manager": {
"command": "node",
"args": ["/absolute/path/to/google ads manger mcp/build/index.js"],
"env": {
"GOOGLE_ADS_CLIENT_ID": "...",
"GOOGLE_ADS_CLIENT_SECRET": "...",
"GOOGLE_ADS_DEVELOPER_TOKEN": "...",
"GOOGLE_ADS_REFRESH_TOKEN": "...",
"GOOGLE_ADS_CUSTOMER_ID": "..."
}
}
}
}
(Or skip the env block and just make sure .env is populated — the server loads it via
dotenv when run directly, e.g. npm run dev during local iteration.)
Notes
- This is scoped to a single Google Ads account (
GOOGLE_ADS_CUSTOMER_ID). To manage several client accounts under one manager account, either run one instance per customer ID, or extendgoogleAdsClient.tsto accept acustomerIdargument per tool call. - New campaigns default to
PAUSED(startEnabled: false) so nothing spends until you explicitly enable it.
Contributing
Issues and PRs welcome — new report types, negative-keyword-at-campaign-level support, and multi-account (MCC) handling are the most useful next additions.
License
الأسئلة الشائعة
ما هو io.github.AleemHaider/google-ads-manager-mcp؟
Unofficial MCP server for Google Ads: reporting plus safe draft/confirm campaign management.
كيف أثبّت io.github.AleemHaider/google-ads-manager-mcp؟
يعمل على جهازك. في Claude Code: claude mcp add google-ads-manager-mcp -e 'GOOGLE_ADS_CLIENT_ID=<GOOGLE_ADS_CLIENT_ID>' -e 'GOOGLE_ADS_CLIENT_SECRET=<your google_ads_client_secret>' -e 'GOOGLE_ADS_DEVELOPER_TOKEN=<your google_ads_developer_token>' -e 'GOOGLE_ADS_REFRESH_TOKEN=<your google_ads_refresh_token>' -e 'GOOGLE_ADS_CUSTOMER_ID=<GOOGLE_ADS_CUSTOMER_ID>' -e 'GOOGLE_ADS_LOGIN_CUSTOMER_ID=<GOOGLE_ADS_LOGIN_CUSTOMER_ID>' -- npx -y google-ads-manager-mcp@1.0.0. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج io.github.AleemHaider/google-ads-manager-mcp إلى مفتاح API؟
نعم. يتطلب GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET, GOOGLE_ADS_DEVELOPER_TOKEN, GOOGLE_ADS_REFRESH_TOKEN, GOOGLE_ADS_CUSTOMER_ID، وتضبطها في إعداداته.
هل io.github.AleemHaider/google-ads-manager-mcp مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون io.github.AleemHaider/google-ads-manager-mcp؟
ينشره AleemHaider. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.