MCP server for the Google Search Console API: search analytics, sitemaps, URL inspection, sites.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
MCP server for the Google Search Console API: search performance analytics (clicks, impressions, CTR, position), sitemap management, URL index inspection and property management β from Claude, Cursor, Codex and other AI clients, in natural language.
Ask your assistant "which queries brought the most clicks last month?", "is this page indexed?", or "resubmit the sitemap" β it drives the Search Console API for you, from a quick indexing check to a full performance analysis.
Get OAuth credentials for the Search Console API.
Add the server β for example, in Claude Code (other clients):
Ask the assistant: "Show me the top 20 search queries for example.com over the last 28 days, with clicks and CTR."
| Tool | Description |
|---|---|
list_sites | All Search Console properties the account can access, with permission levels. |
get_site | One property's entry (siteUrl + permissionLevel). |
add_site | Add a property (stays unverified until verified in Search Console). |
delete_site | Unlink a property from the account (no data is deleted). |
search_analytics | Performance query: clicks/impressions/CTR/position by date, query, page, country, device, search appearance or hour; filters, search type, pagination, fresh-data mode. |
get_top_queries | Shortcut for the most common ask: top queries by clicks, optionally filtered by page substring, country or device. |
list_sitemaps | Submitted sitemaps (or children of a sitemap index), with errors/warnings. |
get_sitemap | One sitemap's status and per-content-type counts. |
submit_sitemap | Submit or resubmit a sitemap. |
delete_sitemap | Remove a sitemap from Search Console. |
inspect_url | Google-index status of a URL: verdict, coverage, crawl info, canonicals, rich results. |
raw_request | Escape hatch: any Search Console API path (webmasters/v3 or v1). |
Plus resilience built in: automatic OAuth token refresh (including on 401), retries with backoff on 429 (and on 5xx/network errors for reads only β mutations are never replayed), a request timeout, and an SSRF guard so the token can't leak to a foreign host.
The site_url must match the property exactly as registered in Search Console:
https://example.com/. Note http://example.com/, https://example.com/
and https://www.example.com/ are three different properties.sc-domain:example.com (no scheme, no slash).A near-match returns 403/404. list_sites shows the exact registered values β
the assistant will usually call it first.
end_date is inclusive; final analytics
data lags ~2β3 days (pass data_state: "all" for fresh, still-changing rows).start_row);
anonymized long-tail queries are never returned.add_site registers a property, but
verification happens in the Search Console UI or the Site Verification API.Requires Node.js 20+ (runs via npx, no separate install).
claude_desktop_config.json β macOS ~/Library/Application Support/Claude/, Windows %APPDATA%\Claude\
~/.cursor/mcp.json (or .cursor/mcp.json in the project)
.vscode/mcp.json β note the servers key (not mcpServers)
The Search Console API has no API-key access β every call needs OAuth 2.0 (the data belongs to your account). One-time setup, ~10 minutes:
https://developers.google.com/oauthplayground as an authorized redirect
URI to the OAuth client first).https://www.googleapis.com/auth/webmasters
and click Authorize APIs, signing in with the test-user account that
owns your Search Console properties.GOOGLE_SEARCH_CONSOLE_CLIENT_ID,
GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET and
GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN. The server exchanges the refresh
token for short-lived access tokens automatically.Scope notes: https://www.googleapis.com/auth/webmasters covers everything
including sitemap submission and property management. If you only need reads
(analytics, inspection, listings), the narrower
https://www.googleapis.com/auth/webmasters.readonly works β but add_site,
delete_site, submit_sitemap and delete_sitemap will then return 403.
While the consent screen stays in Testing mode, refresh tokens expire after
7 days β publish the app (or keep it Internal in a Workspace domain) for
long-lived tokens.
β οΈ The credentials are stored in plain text in your client's config β treat them like a password. The refresh token grants access to your Search Console data until revoked at myaccount.google.com/permissions.
| Variable | Required | Default | Description |
|---|---|---|---|
GOOGLE_SEARCH_CONSOLE_CLIENT_ID | yes* | β | OAuth2 client id (refresh flow). |
GOOGLE_SEARCH_CONSOLE_CLIENT_SECRET | yes* | β | OAuth2 client secret (refresh flow). |
GOOGLE_SEARCH_CONSOLE_REFRESH_TOKEN | yes* | β | OAuth2 refresh token (refresh flow). |
GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN | yes* | β | Alternative: a static access token (~1 h lifetime), mostly for testing. |
GOOGLE_SEARCH_CONSOLE_API_BASE | no | https://searchconsole.googleapis.com | API root override. |
GOOGLE_SEARCH_CONSOLE_TIMEOUT_MS | no | 60000 | Per-request timeout, ms. |
GOOGLE_SEARCH_CONSOLE_MAX_RETRIES | no | 3 | Retries on transient errors. |
* Either the three refresh-flow variables together, or GOOGLE_SEARCH_CONSOLE_ACCESS_TOKEN.
Questions, ideas, issues β Telegram @gistrec or GitHub issues.
MIT β see LICENSE.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/google-search-console-mcp-2)<a href="https://allmcps.com/mcp/google-search-console-mcp-2"><img src="https://allmcps.com/api/badge/google-search-console-mcp-2?style=directory" alt="Google Search Console MCP on AllMCPs" /></a>