Skip to main content
Glama
Google Search Console Audit MCP

Google Search Console Audit MCP

Google Search Console MCP Server

PyPI version Python versions License: MIT PyPI downloads CI

Read this in: English | Italiano

Open-source Model Context Protocol (MCP) server for Google Search Console. Brings your Search Console performance data, URL inspection, indexing checks, and sitemaps into Claude Code, Claude Desktop, Cursor, Zed, Continue, and any MCP-compatible client, and generates complete brandable HTML SEO audit reports in a single call.

If you work with SEO and use an AI coding assistant, this MCP server removes the copy-paste loop between Search Console and your chat: ask for top queries, check which pages are indexed, inspect a URL, or produce a 30/60/90-day SEO roadmap as an HTML report, all without leaving the assistant.

Features

  • Read-only access to Search Console (no write operations to your properties, only the webmasters.readonly OAuth scope)

  • 8 tools covering sites, performance queries, pages, devices, countries, indexing, sitemaps, URL inspection

  • gsc_audit: one-call generator for a self-contained HTML SEO report with Chart.js graphs, automatic issue detection, concrete examples, actionable strategy and a 30/60/90-day roadmap

  • Brandable reports: customize logo, font, and color palette via branding.json, perfect for agencies delivering white-label audits

  • Stateless-friendly: credentials via environment variables (ideal for CI, Docker, hosted MCP) or via the XDG config directory

  • Zero setup with uvx: no clone, no virtualenv, runs straight from PyPI

  • Works with any MCP client: Claude Code, Claude Desktop, Cursor, Zed, Continue, Windsurf

Related MCP server: Google Search Console MCP Server

Why use this MCP server

  • Skip the Search Console UI when you already live inside your AI assistant

  • Turn GSC data into a shareable client-ready HTML audit in a single prompt

  • Keep full control over credentials: choose env vars, XDG config, or legacy file layout

  • Safe by design: read-only scope means the server cannot edit or remove anything from your properties

  • Python 3.10+, MIT licensed, published on PyPI as mcp-google-search-console

Tools

Tool

Description

gsc_sites

List all verified sites

gsc_site_details

Details of a specific site

gsc_query

Performance report with dimensions (query, page, country, device, date)

gsc_performance_overview

Aggregated metrics for a period (clicks, impressions, CTR, position)

gsc_indexing_issues

Check indexing status for a list of pages

gsc_inspect_url

Detailed URL Inspection for a single page

gsc_sitemaps

List all sitemaps submitted for a site

gsc_audit

Generate a complete HTML audit report for a date range

Installation

Option A — uvx (recommended, zero setup)

Run directly from PyPI, no clone or venv required:

uvx mcp-google-search-console auth      # one-time OAuth authorization
uvx mcp-google-search-console            # start the MCP server

Option B — pipx

pipx install mcp-google-search-console
mcp-google-search-console auth
mcp-google-search-console

Option C — From source

git clone https://github.com/acamolese/google-search-console-mcp.git
cd google-search-console-mcp
uv venv && uv pip install -e .
.venv/bin/mcp-google-search-console auth

Configuration

1. Google Cloud setup

  1. Google Cloud Console → create a project

  2. Enable the Google Search Console API

  3. APIs & Credentials → Create Credentials → OAuth 2.0 Client ID → Desktop app

  4. Download the JSON

2. Provide the OAuth client credentials

You have three ways, pick whichever fits your setup. The server reads them in this order:

A — Environment variables (best for headless, CI, Docker, hosted MCP):

export GSC_CLIENT_ID="xxxxxxxxxxxx.apps.googleusercontent.com"
export GSC_CLIENT_SECRET="GOCSPX-xxxxxxxxxxxxxxxx"
export GSC_REFRESH_TOKEN="1//0xxxxxxxxxxxxxxxx"

With these three variables set, the server is fully stateless: no files are read or written.

B — XDG config directory (recommended for local desktop usage):

Save the OAuth client JSON as:

~/.config/mcp-google-search-console/oauth_credentials.json

Then run the interactive authorization flow:

mcp-google-search-console auth

This opens a browser, captures the OAuth consent and saves the refresh token to ~/.config/mcp-google-search-console/token.json. On Linux and macOS the path honors $XDG_CONFIG_HOME if set.

C — Legacy per-project directory (backward compatibility only):

Place files under ./credentials/oauth_credentials.json and ./credentials/token.json in the working directory where the server is launched. This mode is still supported for older setups but not recommended.

Client configuration

All examples below assume you installed with uvx. Adjust the command if you used pipx (mcp-google-search-console) or cloned from source (/path/to/.venv/bin/mcp-google-search-console).

Claude Code

Edit ~/.claude/.mcp.json:

{
  "mcpServers": {
    "google-search-console": {
      "command": "uvx",
      "args": ["mcp-google-search-console"]
    }
  }
}

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "google-search-console": {
      "command": "uvx",
      "args": ["mcp-google-search-console"]
    }
  }
}

Cursor

Edit ~/.cursor/mcp.json (or the project-local .cursor/mcp.json):

{
  "mcpServers": {
    "google-search-console": {
      "command": "uvx",
      "args": ["mcp-google-search-console"]
    }
  }
}

Zed

Add to your Zed settings.json under context_servers:

{
  "context_servers": {
    "google-search-console": {
      "command": {
        "path": "uvx",
        "args": ["mcp-google-search-console"]
      }
    }
  }
}

Continue, Windsurf, and other MCP clients

Any MCP client that supports stdio servers can use the same pattern:

{
  "mcpServers": {
    "google-search-console": {
      "command": "uvx",
      "args": ["mcp-google-search-console"]
    }
  }
}

Stateless configuration with environment variables

If you prefer not to persist anything on disk, pass credentials inline:

{
  "mcpServers": {
    "google-search-console": {
      "command": "uvx",
      "args": ["mcp-google-search-console"],
      "env": {
        "GSC_CLIENT_ID": "xxxxxxxxxxxx.apps.googleusercontent.com",
        "GSC_CLIENT_SECRET": "GOCSPX-xxxxxxxxxxxxxxxx",
        "GSC_REFRESH_TOKEN": "1//0xxxxxxxxxxxxxxxx"
      }
    }
  }
}

Usage examples

Once the MCP server is wired into your client, you can ask things like:

  • "List my verified sites in Search Console"

  • "Show the top 50 queries for sc-domain:example.com over the last 30 days"

  • "Check if these 5 pages are indexed: ..."

  • "Generate a complete audit of example.com for the period 2026-01-01 → 2026-03-31"

The gsc_audit tool writes a self-contained HTML file to ~/gsc-reports/ and returns the path. Open it in any browser.

Tips

  • Use sc-domain:example.com for domain properties or https://example.com/ for URL-prefix properties.

  • Available dimensions for gsc_query: query, page, country, device, date (combine with commas).

  • Maximum 25,000 rows per request.

Customizing the audit report

The audit report layout uses a Jinja2 template in src/google_search_console_mcp/templates/report.html.j2 with colors and fonts driven by branding.json.

To customize without touching the package, create your own branding.json in the XDG config directory:

~/.config/mcp-google-search-console/branding.json

Example:

{
  "brand_name": "Acme SEO Studio",
  "logo": "logo.png",
  "font_family": "Poppins",
  "font_url": "https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap",
  "colors": {
    "primary": "#ff6b35",
    "primary_dark": "#cc4a1f",
    "secondary": "#004e89",
    "accent": "#00b894",
    "danger": "#e74c3c",
    "warning": "#f39c12",
    "text": "#004e89",
    "text_muted": "#5a6c7d",
    "text_light": "#8395a7",
    "bg": "#f8f9fc",
    "surface": "#ffffff",
    "border": "#e1e8ed"
  }
}

The logo field accepts either a local file name (resolved against the XDG config dir, then the package dir) or a full URL. Local files are automatically base64-encoded into the HTML so the report stays self-contained.

You can also pass a custom branding file per report via the branding_path parameter of gsc_audit:

"Generate an audit of example.com using the branding at /path/to/client-branding.json"

FAQ

What is an MCP server?

MCP (Model Context Protocol) is an open protocol that lets AI assistants like Claude or Cursor talk to external data sources and tools through a standard interface. An MCP server exposes a set of tools (functions) and resources that the assistant can call during a conversation. This project is an MCP server that exposes Google Search Console as tools your assistant can use.

Does this work with Claude Desktop, Claude Code, Cursor, Zed, and Continue?

Yes. Anything that can speak MCP over stdio can use this server. Ready-to-paste configuration snippets for each client are in Client configuration.

Can this server change or delete data in my Search Console account?

No. The server only requests the webmasters.readonly scope from Google, which is read-only by design. It cannot submit sitemaps, request indexing, or modify any property settings.

How do I obtain the OAuth client credentials?

Create a Google Cloud project, enable the Google Search Console API, then create an OAuth 2.0 Client ID of type Desktop app and download the JSON. Full steps are in the Configuration section.

Can I use a service account instead of OAuth?

Not currently. The Search Console API requires that the identity has been granted access to the property, and Google's own docs recommend OAuth user credentials for most use cases. If you need service account support, open an issue.

Can I customize the SEO audit report?

Yes. Drop a branding.json file in ~/.config/mcp-google-search-console/ to override logo, font, and the full color palette. See Customizing the audit report. You can also pass a per-report branding_path parameter when calling gsc_audit, which is ideal for agencies producing white-label audits for multiple clients.

Where are the audit reports saved?

gsc_audit writes a self-contained HTML file to ~/gsc-reports/ and returns the path. The file is fully inlined (CSS, charts, images base64-encoded) so you can share it without worrying about external assets.

What's the difference between sc-domain: and URL-prefix properties?

sc-domain:example.com covers the entire domain, including all subdomains and both http/https. https://example.com/ only covers that specific prefix. Use whichever matches how you verified the property in Search Console.

Does it work on headless servers or in Docker?

Yes. Set GSC_CLIENT_ID, GSC_CLIENT_SECRET, GSC_REFRESH_TOKEN as environment variables and skip the browser auth flow. The server is fully stateless in this mode and never writes to disk.

Security

  • Never commit oauth_credentials.json, token.json, or .env files with real secrets.

  • The XDG config directory is the default storage location and is outside the repository.

  • The server only requests the webmasters.readonly scope.

Troubleshooting

  • 401 Unauthorized on first call: token expired or missing. Run mcp-google-search-console auth or set GSC_REFRESH_TOKEN.

  • "No OAuth client credentials found": neither env vars nor files are configured. See the Configuration section.

  • Browser flow fails on headless machines: skip auth entirely and export GSC_CLIENT_ID, GSC_CLIENT_SECRET, GSC_REFRESH_TOKEN as environment variables.

Migration from legacy installs (pre-f2fe60e)

The package was restructured in commit f2fe60e and no longer ships a top-level server.py. If your MCP client was configured to launch the server with python server.py, it will now fail at startup with:

can't open file '.../server.py': [Errno 2] No such file or directory

Update your client config to use the installed entry-point instead:

"google-search-console": {
  "command": "uvx",
  "args": ["mcp-google-search-console"]
}

Equivalent forms are listed under Client configuration.

License

MIT © Andrea Camolese. Not affiliated with Google or Anthropic. "Google Search Console" is a trademark of Google LLC.

Available Tools

18 tools
gsc_alertsA
Read-onlyIdempotent

What changed sharply enough to be worth a message today.

Compares the last window_days against the window before (or a year earlier) across queries and pages, and returns only movements past fixed alerting rules, listed in the meta: lost positions, collapsed CTR, dropped or vanished pages. The window ends on the last day with final data.

Inputs: site_url (required), type, compare, date_to, +5 more. Returns: result

gsc_auditA
Read-onlyIdempotent

Build a complete, self-contained HTML SEO audit for one property.

Collects the period and its baseline (previous period or a year earlier), top queries and pages, devices, countries, the daily trend, six complete months of history, brand totals, sitemaps and an indexing check, then detects issues and builds a prioritised strategy and roadmap. Sections that could not be fetched are named, never shown as clean. English and Italian.

Ask the user for the period if they have not named one: the 28-day default is rarely what a client report wants.

Returns a compact JSON summary first (KPIs with deltas, issue counts, top quick wins, roadmap), so the findings can be discussed without reading the HTML, followed by the report path or the document itself.

Inputs: site_url (required), days, output, period, +10 more.

gsc_brand_splitA
Read-onlyIdempotent

Brand, non-brand and undisclosed clicks, month by month.

Computed over every query with server-side regex filters, so no row limit applies. anonymized is what Google counts but never shows as a query; it belongs to neither side. Whole months only: the month in progress is left out.

Inputs: site_url (required), brand_terms (required), type, months, +4 more. Returns: result

gsc_cannibalizationA
Read-onlyIdempotent

Queries where several pages of the site compete for the same result.

Leaves out brand queries (pass brand_terms), queries where one page sits in the top three with most of the clicks, and queries below the impression threshold. Reads up to 25,000 query/page pairs; the meta says when the tail was cut off.

Inputs: site_url (required), days, type, period, +10 more. Returns: result

gsc_compare_periodsA
Read-onlyIdempotent

Join two periods on one dimension and rank the rows by click delta.

Answers "what changed" without the model diffing two tables by hand. Rows present in only one period are kept, with zeros on the missing side; the biggest movers in both directions are returned, worst first. The meta counts how many rows gained and how many lost clicks. When a side was read only up to its row limit, the meta flags it: a row missing there may only be below the cut.

Inputs: site_url (required), days, type, period, +11 more. Returns: result

gsc_content_decayA
Read-onlyIdempotent

Pages sliding down month after month.

A period comparison hides this: a page that halves over six months never shows a sharp drop in any single month-on-month check. Only whole calendar months are compared, so the month in progress is left out (last_month in the meta). One query per month runs in parallel.

Inputs: site_url (required), type, months, date_to, +7 more. Returns: result

gsc_ctr_gapsA
Read-onlyIdempotent

Rows that rank well but are clicked far less than their position implies.

The snippet, not the ranking, is the problem, which makes these the cheapest fixes available. expected_ctr is what a result at that position normally earns.

Inputs: site_url (required), days, type, entity, +10 more. Returns: result

gsc_doctorA
Read-onlyIdempotent

Report the server's configuration and whether Search Console answers.

Call this first when something fails: it names the auth mode in use, when the token expires, how many properties the account can read, the cache state and the defaults every other tool applies. Secrets are masked.

Inputs: no named parameters. Returns: Everything `gsc_doctor` reports. Secrets are masked before they get here.

gsc_indexing_issuesA
Read-onlyIdempotent

Check whether a batch of URLs is indexed, and why not when they are not.

Runs the inspections concurrently and returns one row per input URL, in input order. A URL that fails gets an error column instead of a verdict; the rest of the batch still comes back. For the full payload of a single page (mobile usability, rich results, AMP) use gsc_inspect_url.

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

Columns: url, verdict (PASS / PARTIAL / FAIL / NEUTRAL), coverage_state, robots_txt_state, indexing_state, page_fetch_state, crawled_as, last_crawl_time, google_canonical, user_canonical, error. The meta carries a verdict summary.

Inputs: pages (required), site_url (required), no_cache, response_format. Returns: result

gsc_inspect_urlA
Read-onlyIdempotent

Full URL Inspection for one page: index, mobile, rich results and AMP.

Use this when one page needs a diagnosis. For an indexed-or-not sweep across many URLs use gsc_indexing_issues.

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

Inputs: page_url (required), site_url (required), no_cache. Returns: The URL Inspection payload for one page, with the sub-objects left as-is.

gsc_performance_overviewA
Read-onlyIdempotent

Site totals for a period, compared with a baseline by default.

Start here: it answers "is the site up or down" in one call, with the percentage change on every metric. position_delta is negative when the average position improves. With a comparison, a rolling window ends on the last day with final data (data_through), so both sides hold whole days.

Inputs: site_url (required), days, type, period, +7 more. Returns: Site totals for a period, optionally compared with the preceding one.

gsc_portfolioA
Read-onlyIdempotent

Every accessible property at a glance, ranked worst first.

One row per property with the current period, the previous one and a health flag: critical below -30% clicks, warning below -15%. Use it to decide which property to look at before running anything else.

Inputs: days, limit, date_to, no_cache, +1 more. Returns: result

gsc_queryA
Read-onlyIdempotent

Query the Search Analytics report: clicks, impressions, CTR, position.

This is the general-purpose tool. With no dates it covers the last 28 days ending today (UTC), with data_state=all so today's partial data is included, matching what the Search Console UI shows.

Example: site_url="sc-domain:example.com", dimensions="query,page", period="last_28_days", row_limit=100.

Returns a # meta ... line then a TSV table, or JSON with meta and rows. The meta names the exact range, the row count, whether more rows exist and the start_row to pass next.

Inputs: site_url (required), days, type, period, +11 more. Returns: result

gsc_quick_winsA
Read-onlyIdempotent

Queries close enough to the top that a push would pay off.

Ranked by the clicks each query would gain at target_position, not by impressions: a big query already near its ceiling is not an opportunity. The meta reports the thresholds that were applied.

Inputs: site_url (required), days, type, period, +10 more. Returns: result

gsc_site_detailsB
Read-onlyIdempotent

Permission level and property type for one property.

Inputs: site_url (required), no_cache, response_format. Returns: result

gsc_sitemapsA
Read-onlyIdempotent

List the sitemaps Google knows about for a property, with errors and warnings.

Read-only: submitting or deleting a sitemap needs the read-write scope, which this server never requests.

Returns one row per sitemap: path, last submitted and downloaded timestamps, pending flag, index flag, warning and error counts, and the submitted / indexed URL counts when Google reports them.

Inputs: site_url (required), no_cache, response_format. Returns: result

gsc_sitesA
Read-onlyIdempotent

List every property the authenticated account can read.

Call this first when a property string fails: it returns the exact site_url values the other tools expect, and whether each one is a domain property (sc-domain:example.com) or a URL-prefix property.

Inputs: no_cache, response_format. Returns: result

gsc_traffic_dropsA
Read-onlyIdempotent

Pages that lost clicks against the baseline, each with a likely cause.

diagnosis tells a ranking loss from fewer impressions at a stable position, a collapsed CTR and a page gone from the results: they need different fixes, and both periods' numbers are in the row. Rolling windows end on the last day with final data (data_through in the meta); compare=year handles seasonality.

Inputs: site_url (required), days, type, period, +9 more. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 18 tools

    Disambiguation4/5

    The analytical tools (quick_wins, ctr_gaps, traffic_drops, content_decay, alerts, cannibalization) all read Search Analytics data, but each is anchored to a distinct question and the descriptions explicitly contrast them (e.g. month-on-month decay vs. sharp drops vs. alert windows). gsc_indexing_issues and gsc_inspect_url cross-reference each other for batch vs. single-page use, and gsc_sites vs. gsc_site_details differ only mildly (all properties vs. one property's permissions). A handful of boundaries require reading the descriptions, but true misselection risk is low.

    Naming Consistency4/5

    Every tool shares the gsc_ prefix and lowercase snake_case, which makes the set immediately recognizable and sorted together. The second element mixes conventions (nouns like gsc_sitemaps, gsc_portfolio vs. verbs like gsc_query, gsc_compare_periods), but the style is uniform enough that names remain predictable.

    Tool Count4/5

    18 tools sits at the upper end but each maps to a concrete SEO audit question (overview, quick wins, CTR gaps, cannibalization, drops, decay, alerts, brand split, indexing, audit, diagnostics). No tool looks like filler or a duplicate of another; the set is granular rather than bloated.

    Completeness4/5

    Coverage across discovery (sites, site_details, portfolio), analytics (query, overview, compare_periods), diagnosis (indexing_issues, inspect_url, sitemaps) and a full audit report is thorough for a read-only audit domain. The only dead end is the deliberately declared read-only scope — no sitemap submission or any mutation — which is documented rather than an oversight.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server for querying Google Search Console data — search analytics, URL inspection, sitemap monitoring, and more — read-only tools for any MCP-compatible AI client.
      7
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Read-only MCP server that gives AI clients access to Google Search Console data, enabling natural language queries about traffic, rankings, and SEO opportunities.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Read-only MCP server for Google Search Console data, enabling search analytics, URL inspection, indexing diagnostics, and sitemap management through MCP clients.
      3 npm
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Secure MCP server for Google Search Console. Query search analytics (clicks, impressions, CTR, position), manage sitemaps, inspect URL indexing status, and manage site properties.
      10
      AGPL 3.0