flin Google Keyword Planner MCP
Keyword-Ideen und historische Suchvolumen aus Google Ads für Claude Desktop. Die Keyword-Tools lesen Daten und verändern keine Kampagnen.
Start auf einem Mac mit Apple Silicon (M1 oder neuer)
- Desktop-Paket herunterladen. Versionierte Downloads und Prüfsummen bleiben verfügbar.
- In aktuellem Claude Desktop: Settings → Desktop app → Extensions → Manage →
Advanced settings → Install Extension… und die
.mcpbauswählen. - Die Pflichtfelder aus dem Passwortmanager eintragen. Die Werte erhältst du vom zuständigen Administrator; keine Zugangsdaten in den Chat kopieren.
- Ohne vorhandenen Refresh Token Claude bitten: «Starte
google_ads_start_local_oauth_flow.» Den Google-Link öffnen, das berechtigte Konto wählen und den Zugriff genehmigen. - «Rufe
connection_statusauf.» Das prüft die lokale Einrichtung ohne Google-Abfrage. Für einen echten Zugriffstest anschliessend ausdrücklich: «Prüfe mitkeyword_historical_metricsdas Keyword Wandern, Sprache Deutsch (1001), Schweiz (2756), NetzwerkGOOGLE_SEARCH.» Dieser Test verwendet Google-Ads-API-Kontingent; Fehler erscheinen als Tool-Ergebnis.
| Feld in Claude | Erforderlich? | Bedeutung |
|---|---|---|
| Google Ads developer token | Ja | API-Token des berechtigten Managerkontos |
| OAuth client ID | Ja | Google-Cloud-OAuth-Client, empfohlen: Desktop app |
| OAuth client secret | Ja | Zum OAuth-Client gehörendes Secret |
| Google Ads customer ID | Ja im Desktop-Paket | Zielkonto, zehn Ziffern; Bindestriche sind erlaubt |
Manager account ID / login_customer_id |
Nur bei Zugriff über ein MCC | ID des zugriffsberechtigten Managerkontos, nicht automatisch die Zielkonto-ID |
| Refresh token | Nein | Kann durch den Browser-Login erzeugt werden |
connection_status zeigt die tatsächlich laufende server_version.
configuration_status=configured bedeutet nur, dass die lokalen Angaben vorliegen.
Ein vorhandenes Token ergibt auth_status=unknown, nicht eine bestätigte Anmeldung;
live_access=not_checked bleibt beim lokalen Statusaufruf unverändert.
Updates und Hilfe
Die Erweiterungsversion bezeichnet den importierten Starter. Ab Starter 0.3.3
lädt jeder Serverneustart automatisch die neueste stabile PyPI-Version im geprüften
Bereich >=0.3.2,<0.4.0 für Python 3.13. Die Serverversion kann daher neuer
sein. Laufende Sitzungen bleiben bestehen, Einstellungen und Token werden nicht
umgeschrieben. Vorabversionen und die nächste Minor-Version sind ausgeschlossen.
Für die neue Kompatibilitätsgrenze den Starter einmal neu importieren; normale Serverupdates benötigen danach keinen neuen Import. Starter-/UI-Änderungen können einen weiteren Import erfordern. Internet ist beim Start erforderlich. Es gibt keinen automatischen Rückfall auf einen alten Cache; der bewusst manuelle Ausweg bei einer PyPI-Störung steht in SUPPORT.md.
Standardwerte sind Englisch, USA, Google Search mit Partnern. Für andere Märkte
Sprache und Region ausdrücklich angeben. Advertising Competition ist
Anzeigenwettbewerb, keine organische SEO-Schwierigkeit. Fehlende Kennzahlen sind
null, nicht 0. Volumen sind Näherungswerte; Google fasst ähnliche Varianten zusammen.
Ausführliche Mac-Anleitung · Datenschutz · Sicherheit · Hilfe
Das Python-Paket unterstützt weiterhin Python 3.10+ auf anderen geeigneten Systemen; Intel-Macs werden durch das plattformneutrale Paket nicht ausgeschlossen. Die Apple-Silicon-Prüfung ist unten von Linux-Tests und echten Kontotests getrennt. Entwicklerinstallation und manuelle JSON-Konfiguration folgen weiter unten.
Exposed MCP tools
connection_status— local setup and running version; no browser or API requestkeyword_ideas_from_keywordskeyword_ideas_from_urlkeyword_ideas_from_keyword_and_urlkeyword_ideas_from_sitekeyword_ideas_historicalkeyword_historical_metrics
Tool overview
1) keyword_ideas_from_keywords
Generate ideas from a keyword list (KeywordSeed).
Required:
keywords
2) keyword_ideas_from_url
Generate ideas from a page URL (UrlSeed).
Required:
url
3) keyword_ideas_from_keyword_and_url
Generate ideas from keyword list + URL (KeywordAndUrlSeed).
Required:
keywordsurl
4) keyword_ideas_from_site
Generate ideas from a full site/domain (SiteSeed).
Required:
site_url
5) keyword_ideas_historical
Generate ideas from keywords and constrain historical metrics to a year-month range.
Required:
keywordsstart_yearstart_monthend_yearend_month
Historical option:
include_average_cpc(defaultfalse)
Common optional parameters (keyword idea tools)
customer_idlanguage_id(default1000)location_ids(default2840= US;[]= all locations; max 10 unique IDs)network(GOOGLE_SEARCHorGOOGLE_SEARCH_AND_PARTNERS; default includes partners)include_adult_keywords(defaultfalse)limit(page size: default50, max1000; Google may return fewer rows)include_average_cpc(defaultfalse; also available on all four seed tools)page_tokenkeyword_annotation(currently:KEYWORD_CONCEPT)aggregate_metric_types(currently:DEVICE)login_customer_id
6) keyword_historical_metrics
Fetch historical search volumes and bids for an existing list of up to 10,000
keywords using Google's GenerateKeywordHistoricalMetrics endpoint. It does not
expand the list into new ideas. keyword_ideas_historical keeps its original
behavior: discovering ideas with a historical date range.
Required: keywords. Optional: customer, language, locations, network, adult
keywords, manager ID, and include_average_cpc. Omit dates for Google's default
past 12 months, or supply all four year/month fields. Google controls historical
data availability and may omit unavailable months.
Results include close variants and unmatched_keywords. Google can combine similar
keywords, so the result count need not match the input count; an unmatched term is
not evidence of zero search volume. Pagination and idea annotations do not apply.
Data interpretation and targeting
- Defaults remain English / US / Search and Partners for compatibility. For
German Switzerland, explicitly pass
language_id="1001",location_ids=["2756"]. Usenetwork="GOOGLE_SEARCH"for Google Search alone. - Responses echo their targeting. Bid amounts and CPC use the Google Ads customer account's currency; do not assume USD or CHF from the target location.
- Missing optional metrics are
null; genuine reported zeroes remain0. - Competition and competition index measure advertiser competition, not SEO difficulty.
- Search volumes are approximate and may group close variants.
- Idea seeds accept at most 20 unique keywords. URL seeds require absolute HTTP(S) URLs.
- Each ideas call returns one API page. Continue with
next_page_tokenand identical request parameters. A short or empty page does not imply the end if a token exists. - Requests use a 30-second RPC timeout and a 45-second retry window for transient transport errors. The last in-flight RPC may extend beyond that window. Quota and authentication errors are not automatically retried.
Requirements
- Python 3.10+ for manual/developer installation; Claude Desktop manages Python 3.13
- Google Ads API credentials:
GOOGLE_ADS_DEVELOPER_TOKENGOOGLE_ADS_CLIENT_IDGOOGLE_ADS_CLIENT_SECRET
Optional:
GOOGLE_ADS_REFRESH_TOKEN(only needed if you want a persistent token instead of generating one in Claude)GOOGLE_ADS_LOGIN_CUSTOMER_IDGOOGLE_ADS_CUSTOMER_ID(default customer if nocustomer_idargument is passed)GOOGLE_ADS_USE_PROTO_PLUS(trueby default)
Quickstart (local)
uv sync --locked --extra dev
cp .env.example .env
# Fill .env with real credentials
uv run --env-file .env flin-google-keyword-planner-mcp
Claude integration
Option A: Published package (uvx)
{
"mcpServers": {
"flin-google-keyword-planner-mcp": {
"command": "uvx",
"args": ["--refresh", "--prerelease", "disallow", "--from", "flin-google-keyword-planner-mcp>=0.3.2,<0.4.0", "flin-google-keyword-planner-mcp"],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "REPLACE_ME",
"GOOGLE_ADS_CLIENT_ID": "REPLACE_ME",
"GOOGLE_ADS_CLIENT_SECRET": "REPLACE_ME",
"GOOGLE_ADS_CUSTOMER_ID": "1234567890",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "",
"GOOGLE_ADS_USE_PROTO_PLUS": "true"
}
}
}
}
Option B: Local development checkout
{
"mcpServers": {
"flin-google-keyword-planner-mcp-local": {
"command": "uv",
"args": [
"run",
"--directory",
"/ABSOLUTE/PATH/TO/flin-google-keyword-planner-mcp",
"flin-google-keyword-planner-mcp"
],
"env": {
"GOOGLE_ADS_DEVELOPER_TOKEN": "REPLACE_ME",
"GOOGLE_ADS_CLIENT_ID": "REPLACE_ME",
"GOOGLE_ADS_CLIENT_SECRET": "REPLACE_ME",
"GOOGLE_ADS_CUSTOMER_ID": "1234567890",
"GOOGLE_ADS_LOGIN_CUSTOMER_ID": "",
"GOOGLE_ADS_USE_PROTO_PLUS": "true"
}
}
}
}
Leave GOOGLE_ADS_LOGIN_CUSTOMER_ID blank unless access goes through an MCC; then use the manager account ID. The manual server also accepts customer_id per query if no default is set.
Restart Claude Desktop after config changes.
Generate the refresh token in Claude
After Claude has loaded the MCP, ask it to run:
google_ads_start_local_oauth_flow- Open the returned
authorization_urlin your browser and approve Google Ads access. - After the browser shows the local completion page, run
google_ads_oauth_status. - Run the keyword tools once
token_availableistrue.
The default redirect URI is http://localhost:8080/. If your Google OAuth client uses a different loopback redirect URI, pass it to google_ads_start_local_oauth_flow.
If you cannot use the local callback flow, use the manual fallback:
- Run
google_ads_authorization_url. - Open the returned URL and approve access.
- Copy either the full redirected URL or the
codequery parameter. - Run
google_ads_exchange_authorization_codewith that value.
The exchanged refresh token is stored outside Claude config in ~/.config/flin-google-keyword-planner-mcp/oauth-token.json and reused after MCP restarts. Override the storage path with FLIN_GOOGLE_ADS_TOKEN_FILE if needed.
Security
- Never commit real credentials to git.
.envand.env.*are gitignored; only.env.exampleis tracked.- Keep secrets in environment variables or secret managers.
- Rotate credentials immediately if accidentally exposed.
- CI and release workflows run secret scanning with OSS
gitleaks(noGITLEAKS_LICENSEsecret required).
Testing
uv sync --locked --extra dev
uv run --locked python -m pytest
uv run --locked python -m compileall src
uv build
Release automation (GitHub + PyPI)
- CI workflow:
.github/workflows/ci.yml - Release workflow:
.github/workflows/release.yml - Tag push (
v*) triggers:
- tests + compile + build +
twine check - publish to PyPI via Trusted Publishing (OIDC)
- GitHub Release creation with built artifacts
PyPI Trusted Publishing (one-time)
In the PyPI project flin-google-keyword-planner-mcp, add a Trusted Publisher:
- Owner:
flin-agency - Repository:
flin-google-keyword-planner-mcp - Workflow:
release.yml - Environment:
pypi
Release steps
# 1) bump version in pyproject.toml + src/flin_google_ads_mcp/__init__.py
# 2) run checks
uv run --locked python -m pytest
uv run --locked python -m compileall src
uv build
# 3) release
git add -A
git commit -m "release: vX.Y.Z"
git tag vX.Y.Z
git push origin main --tags
Version 0.3.0 upgrade notes
Validated with Google Ads Python SDK 35.0.0 (API v26) and MCP SDK 1.30.0.
The MCP SDK remains on the compatible 1.x line; this is not a migration to MCP 2.x.
uv.lock is now tracked so local installs and CI use the same dependency versions.
OAuth exchange returns success and persistence status, never the refresh token. Local OAuth uses PKCE, state validation, a ten-minute expiry, and releases its callback port after completion. Token files are written atomically with private permissions. The manual code-copy fallback remains available.
Clients upgrading from 0.2.x must accept nullable metrics, the additional response
metadata, and the removal of refresh_token from the OAuth exchange response.
Existing five idea tool names and targeting defaults are retained.
Reference: Google historical metrics, Google keyword ideas, API releases.
Metadata
Release files for flin-google-keyword-planner-mcp 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flin_google_keyword_planner_mcp-0.3.3.tar.gz | 161.0 kB | With provenance | Details for flin_google_keyword_planner_mcp-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flin_google_keyword_planner_mcp-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for flin_google_keyword_planner_mcp-0.3.3-py3-none-any.whl |
Total release size: 183.9 kB
Release files / flin_google_keyword_planner_mcp-0.3.3.tar.gz
| Download URL | flin_google_keyword_planner_mcp-0.3.3.tar.gz |
|---|---|
| Size | 161.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a96713f2772ebb99337a3a6b5739188bd8ad6996c5b7e940481e9207cb58a386
|
|
BLAKE2b-256 checksum How to use checksums |
bb18ad991f09417ab80dab60fe4eba17a82f318ca887e2ce8cb28cf58eef12d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.
Transparency logRelease files / flin_google_keyword_planner_mcp-0.3.3-py3-none-any.whl
| Download URL | flin_google_keyword_planner_mcp-0.3.3-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d4b89e4f6cc94dedd7bef8f9ac3633f9932e373f9aade94e05c0df42c948951
|
|
BLAKE2b-256 checksum How to use checksums |
611f4300d22a4624652e74491aa628fbb5464a425cfd85c6986454fc6d992b20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.
Transparency logSecurity for flin-google-keyword-planner-mcp 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flin_google_keyword_planner_mcp-0.3.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.