Skip to main content
Glama
Google Search Console MCP Server

Google Search Console MCP Server

Google Search Console MCP Server (read-only by default)

License: Apache 2.0 Python 3.10+

An MCP server for Google Search Console, using the Search Console API (Search Analytics, Sites and Sitemaps) and the URL Inspection API. Use it from Claude, ChatGPT, Cursor, Codex, Gemini or any MCP client to report on organic search performance, compare periods, check sitemaps and inspect how Google indexes your pages.

  • search analytics: clicks, impressions, CTR and position by query, page, country, device, date or search appearance, for web, image, video, news, Discover and Google News

  • period comparisons: this period against the last one or last year, with winners and losers, and brand vs non-brand totals

  • page and query reports: the queries a page ranks for, and the pages that compete for a query

  • URL Inspection: index status, coverage reason, Google's canonical against yours, last crawl, rich results; one URL or a paced batch of up to 200

  • sitemaps: status, errors and warnings; submit and delete with --allow-write

  • built-in Google sign-in: no gcloud needed

Part of the AI Shopping Feeds MCP family: Google Ads · Google Merchant Centre · Google Analytics · YouTube Studio · Google Search Console.

Let your agent set it up

Paste this into Claude Code, Codex, Cursor or any agent that can read web pages and edit files:

Set up the Google Search Console MCP server for me by following https://raw.githubusercontent.com/AI-Shopping-Feeds/search-console-mcp/main/skills/search-console-mcp/SKILL.md

The agent checks whether it's already connected, installs the runner if you agree, asks for your OAuth client file and has you sign in to Google in your browser, adds the server to your client's config without touching your other servers, and checks it works by calling list_sites.

The same file is an Agent Skill, so your agent can keep it as a guide to using the tools well. For Claude Code, copy the folder into your skills:

git clone --depth 1 https://github.com/AI-Shopping-Feeds/search-console-mcp.git /tmp/search-console-mcp
cp -r /tmp/search-console-mcp/skills/search-console-mcp ~/.claude/skills/

Other agents that support skills load the same skills/search-console-mcp folder from their own skills directory.

Related MCP server: Google Search Console MCP Server

What it can do

12 tools: 10 read tools, plus 2 write tools when the server runs with --allow-write.

Read

Area

Tools

Properties

list_sites, get_site

Search analytics

query_search_analytics (any dimensions, filters and search type, up to 25,000 rows a page)

Reports

compare_performance (period over period or year over year, with brand split), get_queries_for_page, get_pages_for_query

Sitemaps

list_sitemaps, get_sitemap

URL Inspection

inspect_url, batch_inspect_urls (up to 200 URLs, paced to the quota)

Write

Only listed when the server starts with --allow-write.

Area

Tools

Sitemaps

submit_sitemap, delete_sitemap

Nothing else writes. Search Console's API can't change settings, remove URLs or request indexing.

Safety

  • The server is read-only unless it starts with --allow-write. Without it, it asks Google only for the webmasters.readonly scope.

  • Tools carry MCP titles and annotations; delete_sitemap is marked destructive so clients can ask first.

  • batch_inspect_urls keeps to Google's URL Inspection quota (600 a minute and 2,000 a day per property) and stops cleanly if Google says the quota is used up.

  • The sign-in token is saved with 0600 permissions in your user config directory, never in the project.

Supported clients

Client

Works?

How

Claude Code

✅

Local server, claude mcp add (below)

Claude Desktop

✅

Local server, claude_desktop_config.json

Cursor

✅

Local server, ~/.cursor/mcp.json

VS Code (Copilot)

✅

Local server, .vscode/mcp.json (uses servers instead of mcpServers)

Codex

✅

Local server, ~/.codex/config.toml

Gemini CLI

✅

Local server, ~/.gemini/settings.json

Windsurf and other local clients

✅

Local server, same JSON entry

Claude.ai and ChatGPT

❌ not yet

These need a remote server with sign-in. This server only runs locally (stdio). Use a local client.

Setup

1. Install uv

The server runs with uvx from uv (brew install uv on macOS) and needs Python 3.10 or later. It installs straight from this repository:

uvx --from git+https://github.com/AI-Shopping-Feeds/search-console-mcp.git search-console-mcp

Add --allow-write after search-console-mcp to enable the sitemap write tools (here and in the client configs below). Pin a release by adding @vX.Y.Z to the URL.

2. Get credentials

  1. Google Cloud project: enable the Google Search Console API and create an OAuth client of type Desktop app. Download its JSON.

  2. Sign in as a Google user with access to your properties. Your browser opens Google's sign-in page; the token is saved to ~/.config/search-console-mcp/token.json (Windows: %APPDATA%\search-console-mcp\token.json). Add --allow-write for the write scope.

    uvx --from git+https://github.com/AI-Shopping-Feeds/search-console-mcp.git \
      search-console-mcp auth --client-secrets /abs/path/client_secret.json

Service accounts and Application Default Credentials also work: docs/credentials.md.

3. Add it to your client

Keep your other servers in each file. With the built-in sign-in, no environment variables are needed.

Claude Code

claude mcp add --scope user search-console \
  -- uvx --from git+https://github.com/AI-Shopping-Feeds/search-console-mcp.git search-console-mcp

Claude Desktop, Cursor, Gemini CLI, Windsurf (and VS Code under servers)

{
  "mcpServers": {
    "search-console": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/AI-Shopping-Feeds/search-console-mcp.git", "search-console-mcp"]
    }
  }
}

Desktop apps often can't find uvx on the PATH; if the server doesn't start, use the full path from which uvx as the command.

Codex (~/.codex/config.toml)

[mcp_servers.search-console]
command = "uvx"
args = ["--from", "git+https://github.com/AI-Shopping-Feeds/search-console-mcp.git", "search-console-mcp"]

4. Check it works

Restart or reload the client, then ask it to "list my Search Console properties". It should call list_sites.

Configuration

Variable

Required

What it does

SEARCH_CONSOLE_TOKEN_FILE

no

Token saved by search-console-mcp auth. Default: your config directory (see above)

SEARCH_CONSOLE_OAUTH_CLIENT

no

Desktop OAuth client JSON for search-console-mcp auth, instead of --client-secrets

SEARCH_CONSOLE_SERVICE_ACCOUNT_KEY

no

Service account key; used instead of the token when set

GOOGLE_APPLICATION_CREDENTIALS

no

Application Default Credentials; used when there's no key or token

--allow-write (flag)

no

Enables submit_sitemap and delete_sitemap; needs the webmasters scope

--tools (flag) or SEARCH_CONSOLE_MCP_TOOL_GROUPS

no

Comma-separated tool groups to register, e.g. --tools analytics,inspection. The flag wins over the variable. Default: all groups

Tool groups keep the tool list short when you only need part of it. list_sites and get_site are always registered, and write tools still need --allow-write. An unknown group stops the server at startup.

Group

Read tools

Write tools (--allow-write)

analytics

query_search_analytics, compare_performance, get_queries_for_page, get_pages_for_query

none

sitemaps

list_sitemaps, get_sitemap

submit_sitemap, delete_sitemap

inspection

inspect_url, batch_inspect_urls

none

Example prompts

Compare the last 3 months with the 3 months before: clicks, impressions, CTR and position, split into brand and non-brand for "example".
Which queries lost the most clicks this month compared with last month?
Which pages compete for "running shoes", and which queries does https://www.example.com/collections/shoes rank for?
Inspect the home page and these product URLs. Are any not indexed, or is Google choosing a different canonical?

More docs

  • Credentials: the built-in sign-in, service accounts and Application Default Credentials

  • Agent skill: setup and usage guide for agents

Contributing and licence

Issues and pull requests are welcome on this repository. See CONTRIBUTING.md.

Licensed under the Apache License 2.0.

  • The server sends your Search Console data to the agent or LLM you connect it to.


Try out AI Shopping Feeds, our shopping feed management tool (including Google Shopping feeds).

Available Tools

10 tools
batch_inspect_urlsInspect a batch of URLsA
Read-only

Inspects up to 200 URLs, paced to Google's URL Inspection quota.

Runs a few inspections at a time, never more than max_per_minute per minute or 2,000 per property per day (counted by this server). Stops cleanly if Google reports the quota is used up; URLs not inspected are listed under 'skipped'. Returns a short summary (index verdicts, coverage states, canonical mismatches) and one result per URL as inspect_url gives.

Args: site_url: The property, exactly as list_sites returns it. urls: Full URLs (paths work for URL-prefix properties). Duplicates are inspected once. language_code: Language for issue messages. Default 'en-US'. max_per_minute: Pacing limit, 1 to 600. Default 600. concurrency: Inspections in flight at once, 1 to 10. Default 4.

Inputs: urls (required), site_url (required), concurrency, language_code, +1 more.

compare_performanceCompare search performanceA
Read-only

Compares a period with the one before it (or the year before).

Returns totals for both periods with the change, and, with a dimension, the top rows (e.g. top queries or pages) with their previous values. Use it for "top queries this month vs last month", winners and losers, and brand vs non-brand trends.

Args: site_url: The property, exactly as list_sites returns it. dimension: Optional 'query', 'page', 'country', 'device' or 'searchAppearance'. Leave out for totals only. start_date: Start of the current period. Default '30daysAgo'. end_date: End of the current period. Default '3daysAgo'. comparison: 'previous_period' (same length, immediately before) or 'previous_year' (same dates a year earlier). search_type: 'web' (default), 'image', 'video', 'news', 'discover' or 'googleNews'. filters: Same as query_search_analytics; applied to both periods. brand_terms: Optional brand terms, e.g. ['acme', 'acme shoes']. Adds brand and non-brand totals (queries containing any term, case insensitive) for both periods. sort_by: 'clicks', 'impressions', 'ctr', 'position', 'clicks_change', 'impressions_change' or 'position_change' (current period). descending: Sort order. Use False with 'clicks_change' for the biggest losers. row_limit: Rows to return after sorting. Default 50. fetch_limit: Rows fetched per period before joining, up to 25,000. Rows outside it count as zero, so raise it for long-tail work.

Note: changes in position are current minus previous, so negative means better. Brand plus non-brand totals are lower than the overall total because Google leaves anonymised queries out of query filters; the gap is reported as 'anonymised_or_unmatched'.

Inputs: site_url (required), filters, sort_by, end_date, +8 more.

get_pages_for_queryGet pages for a queryA
Read-only

Lists the pages that rank for a query, to spot cannibalisation.

Several pages sharing impressions for the same query often means they compete with each other.

Args: site_url: The property, exactly as list_sites returns it. query: The search query. start_date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo'. end_date: Same formats. Default '3daysAgo'. match: 'exact' (default) or 'contains' (every query containing it). search_type: 'web' (default), 'image', 'video' or 'news'. row_limit: Pages to return, up to 25,000. Default 100.

Inputs: query (required), site_url (required), match, end_date, +3 more.

get_queries_for_pageGet queries for a pageA
Read-only

Lists the search queries a page shows up for, with the page's totals.

Args: site_url: The property, exactly as list_sites returns it. page_url: Full URL of the page. A path such as '/products/x' works for URL-prefix properties. start_date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo'. end_date: Same formats. Default '3daysAgo'. match: 'exact' (default) or 'contains' (e.g. every URL with '/blogs/'). search_type: 'web' (default), 'image', 'video' or 'news'. row_limit: Queries to return, up to 25,000. Default 100.

The page totals include anonymised queries, so they're usually higher than the sum of the query rows.

Inputs: page_url (required), site_url (required), match, end_date, +3 more.

get_siteGet a Search Console propertyA
Read-only

Gets one property's type and your permission level.

Args: site_url: The property, exactly as list_sites returns it, e.g. 'sc-domain:example.com' or 'https://www.example.com/'.

Inputs: site_url (required).

get_sitemapGet a sitemapA
Read-only

Gets one sitemap's status: downloads, errors, warnings and URL counts.

Args: site_url: The property, exactly as list_sites returns it. sitemap_url: The sitemap's full URL.

Inputs: site_url (required), sitemap_url (required).

inspect_urlInspect a URLA
Read-only

Inspects a URL in Google's index, as the URL Inspection tool does.

Shows whether the URL is indexed and why not (coverage state), robots.txt and fetch status, last crawl, the canonical Google chose versus the one the page declares, sitemaps and referring URLs, and rich result and mobile usability findings. It reports Google's indexed copy, not a live test.

Quota: 2,000 inspections a day and 600 a minute per property.

Args: site_url: The property, exactly as list_sites returns it. The URL must belong to it. url: Full URL to inspect. A path such as '/products/x' works for URL-prefix properties. language_code: Language for issue messages, e.g. 'en-GB'. Default 'en-US'. include_raw: Also return Google's full response.

Inputs: url (required), site_url (required), include_raw, language_code.

list_sitemapsList sitemapsA
Read-only

Lists the sitemaps submitted for a property, with their status.

Shows when Google last downloaded each sitemap, error and warning counts, whether it's still pending, and how many URLs it lists. Google no longer reports indexed counts here; use inspect_url for index status.

Args: site_url: The property, exactly as list_sites returns it. sitemap_index: Optional sitemap index URL; lists only the sitemaps in that index.

Inputs: site_url (required), sitemap_index.

list_sitesList Search Console propertiesA
Read-only

Lists the Search Console properties the signed-in account can see.

Returns each property's exact site_url (pass it unchanged to every other tool), whether it's a domain property ('sc-domain:example.com') or a URL-prefix property ('https://www.example.com/'), and your permission level (siteOwner, siteFullUser, siteRestrictedUser or siteUnverifiedUser; unverified properties return no data).

Inputs: no named parameters.

query_search_analyticsQuery search analyticsA
Read-only

Queries Search Console performance: clicks, impressions, CTR, position.

Rows come back sorted by clicks. With no dimensions you get one row of totals. Data is usually two to three days behind; the most recent days are partial unless data_state is 'all'.

Args: site_url: The property, exactly as list_sites returns it. start_date: YYYY-MM-DD, 'today', 'yesterday' or 'NdaysAgo'. end_date: Same formats. Defaults to '3daysAgo' (complete data). dimensions: Any of 'query', 'page', 'country', 'device', 'date', 'searchAppearance' (and 'hour' with data_state 'hourly_all'). Countries are ISO 3166-1 alpha-3 codes in lower case (e.g. 'gbr'); devices are DESKTOP, MOBILE or TABLET. search_type: 'web' (default), 'image', 'video', 'news', 'discover' or 'googleNews'. Discover and Google News don't support the query dimension. filters: Filters combined with AND, each {'dimension': 'query', 'operator': 'contains', 'expression': 'shoes'}. Operators: equals, notEquals, contains, notContains, includingRegex, excludingRegex (RE2 syntax; prefix '(?i)' for case-insensitive). aggregation_type: 'auto', 'byPage' or 'byProperty'. Totals by page count a URL once per result; by property count the site once. data_state: 'final' (complete days only), 'all' (includes fresh, partial data) or 'hourly_all'. row_limit: Rows to return, 1 to 25,000. Default 1,000. start_row: Zero-based offset for paging; use next_start_row from the previous call.

Note: queries Google treats as anonymised are left out of rows that have the query dimension, so those rows add up to less than the totals.

Inputs: site_url (required), filters, end_date, row_limit, +6 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a clearly distinct target: site listing/detail, search analytics, period comparison, page/query inversions, sitemap listing/detail, and single vs batch URL inspection. The specialized query/page tools overlap slightly with query_search_analytics dimensions, but their purposes are explicit and unlikely to be confused.

    Naming Consistency5/5

    All tool names are snake_case and follow a predictable verb_noun pattern (list_sites, get_site, get_queries_for_page, inspect_url, batch_inspect_urls). The occasional multi-word object is still readable and consistent.

    Tool Count5/5

    Ten tools is well scoped for a Google Search Console analysis server. Each tool covers a distinct resource or workflow, with no obvious filler tools.

    Completeness4/5

    The surface strongly covers Search Console analytics, site access checks, sitemap inspection, and URL inspection including batch processing. Minor gaps remain around write operations such as sitemap submission/deletion, but core read/analysis workflows are well covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides read-only access to Google Search Console data, allowing AI assistants to query site performance metrics like keywords, clicks, and rankings using natural language. It supports listing verified properties, querying search analytics with dimension filters, and retrieving sitemap information.
      3
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides AI agents with read-only access to Google Search Console data, including search analytics, index coverage, and sitemap status. It enables users to query clicks, impressions, and ranking performance or check URL indexing status through natural language.
      4
      99 npm
      9
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to access Google Search Console search performance and index health data, including clicks, impressions, rankings, URL inspection, and sitemap management.
      25 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to query and analyze Google Search Console data, including search analytics, URL inspection, sitemaps, and property verification, and to perform actions like submitting sitemaps and adding properties through natural language.
      19
      28 npm
      1
      MIT