Open-source SEO, GEO, and marketing skills for AI agents.
fix(ads): detect AdsAgent MCP on Claude Desktop plugin (v0.11.4) (#40)
Tong Chenb78e3c22f7f2
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 04125a4c..27dc9dbe 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,6 +6,16 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).---+## [0.11.4] — 2026-04-15++### Fixed+- **Google Ads MCP detection on Claude Desktop plugin** — When connected through the claude.ai plugin connector, the AdsAgent MCP server is exposed as `mcp__claude_ai_AdsAgent__*` instead of `mcp__adsagent__*`. The shared preamble only recognized the Claude Code CLI prefix, so ads-audit and other google-ads skills incorrectly reported "MCP not connected" and refused to run. Detection now scans the available tool list for any `*listConnectedAccounts` tool, extracts the prefix, and uses that prefix for all subsequent tool calls. Supports Claude Code CLI, Claude Desktop, and any future host using an AdsAgent variant.++### Changed+- **Consistent tool references across google-ads skills** — `ads-copy/SKILL.md` had hardcoded `mcp__adsagent__` prefixes on tool references (`createAd`, `updateAdAssets`, `enableAd`, `undoChange`, `listAds`, `pauseAd`, `listCampaigns`, `listAdGroups`). Stripped to bare tool names to match `ads`, `ads-audit`, and `ads-landing`, which already used bare names. Skills now uniformly defer to the preamble for prefix resolution.++---+## [0.11.3] — 2026-04-12### Addeddiff --git a/VERSION b/VERSIONindex 1a96df19..35ad3442 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-0.11.3+0.11.4diff --git a/google-ads/ads-copy/SKILL.md b/google-ads/ads-copy/SKILL.mdindex 25c52af2..90abeef2 100644--- a/google-ads/ads-copy/SKILL.md+++ b/google-ads/ads-copy/SKILL.md@@ -134,7 +134,7 @@ Based on the competitive landscape, choose the strongest angle:Detect or ask:- What product/service is this ad for?- Target audience or segment?-- Which campaign/ad group? (pull with `mcp__adsagent__listCampaigns` → `mcp__adsagent__listAdGroups`)+- Which campaign/ad group? (pull with `listCampaigns` → `listAdGroups`)- Landing page URL?- Any geographic targeting?@@ -225,11 +225,13 @@ Always show character counts. Always show pin positions. Always name the targetAfter user approves a variant, push it live:-- **New ad:** `mcp__adsagent__createAd` — create the RSA in the target ad group (created paused)-- **Update existing:** `mcp__adsagent__updateAdAssets` — replace headlines/descriptions on a live ad-- **Enable when ready:** `mcp__adsagent__enableAd`+- **New ad:** `createAd` — create the RSA in the target ad group (created paused)+- **Update existing:** `updateAdAssets` — replace headlines/descriptions on a live ad+- **Enable when ready:** `enableAd`-Always confirm before any write operation. Note the `changeId` returned — user can undo within 7 days (if the entity hasn't been modified since) via `mcp__adsagent__undoChange`.+Always confirm before any write operation. Note the `changeId` returned — user can undo within 7 days (if the entity hasn't been modified since) via `undoChange`.++(Call tools under the MCP prefix detected by the shared preamble — do not hardcode `mcp__adsagent__`.)### 6. A/B test (if running one)@@ -249,7 +251,7 @@ Always confirm before any write operation. Note the `changeId` returned — userAfter the test period, pull results:```-mcp__adsagent__listAds → compare metrics for each variant+listAds → compare metrics for each variant```| Variant | Impressions | Clicks | CTR | Conversions | Conv Rate | CPA | Winner? |@@ -266,7 +268,7 @@ mcp__adsagent__listAds → compare metrics for each variant| Similar | Similar | No meaningful difference | Need a bolder test — the variants were too similar. Change the core messaging angle, not just word choice || Both low | Both low | Neither variant works | The problem isn't A vs B — it's the overall approach. Check: keyword intent match, landing page quality, offer strength. May need `/ads-audit` to diagnose |-After deciding a winner: pause the loser with `mcp__adsagent__pauseAd`, keep the winner running. Then create a new variant to test against the winner — continuous improvement, never stop testing.+After deciding a winner: pause the loser with `pauseAd`, keep the winner running. Then create a new variant to test against the winner — continuous improvement, never stop testing.## Rulesdiff --git a/google-ads/shared/preamble.md b/google-ads/shared/preamble.mdindex 7501aa77..1edb2dbf 100644--- a/google-ads/shared/preamble.md+++ b/google-ads/shared/preamble.md@@ -77,9 +77,14 @@ Continue to Step 3 (MCP detection always runs).Always verify that a Google Ads MCP server is available — the MCP server could be down or misconfigured even with a valid API key and saved accountId.-1. Check for AdsAgent tools: try calling `mcp__adsagent__listConnectedAccounts` — save the result for reuse in Step 4-2. If not found, check for Google's official MCP: look for tools matching `mcp__google_ads_mcp__*` in the available tools-3. If neither exists, guide the user:+1. Check for AdsAgent tools. The AdsAgent MCP server may be exposed under several different tool-name prefixes depending on the host:+ - `mcp__adsagent__*` — Claude Code CLI (toprank plugin default)+ - `mcp__claude_ai_AdsAgent__*` — Claude Desktop / claude.ai plugin connector+ - any other prefix matching `mcp__.*[Aa]ds[Aa]gent__` (future hosts)++ **How to detect:** scan your available tool list for any tool whose name ends in `listConnectedAccounts`. Take everything before `listConnectedAccounts` as the detected prefix. If multiple candidates exist, prefer them in this order: `mcp__adsagent__` > `mcp__claude_ai_AdsAgent__` > any other AdsAgent match. Call `listConnectedAccounts` using that detected prefix, and save both the result and the prefix itself for reuse in Steps 4 and 5.+2. If no AdsAgent variant exists, check for Google's official MCP: look for tools matching `mcp__google_ads_mcp__*`.+3. If none exists, guide the user:> No Google Ads MCP server detected.>@@ -110,12 +115,13 @@ If the user explicitly asks to switch accounts, run `listConnectedAccounts`, let## Step 5: Calling tools-Use whichever MCP server prefix was detected:+Use whichever MCP server prefix was detected in Step 3:-- **AdsAgent MCP (default):** `mcp__adsagent__<toolName>` with `accountId` parameter+- **AdsAgent MCP via Claude Code CLI:** `mcp__adsagent__<toolName>`+- **AdsAgent MCP via Claude Desktop / claude.ai plugin:** `mcp__claude_ai_AdsAgent__<toolName>`- **Google's official MCP:** `mcp__google_ads_mcp__<toolName>`-Always pass `accountId` from the resolved config (Step 2) to every tool call (except `listConnectedAccounts`).+Always call tools under the exact prefix detected in Step 3 — do not hardcode `mcp__adsagent__`. Pass `accountId` from the resolved config (Step 2) to every tool call (except `listConnectedAccounts`).### Prefer GAQL for multi-campaign reads