Skip to main content
Glama
gsc-mcp-server

gsc-mcp-server

gsc-mcp-server

A read-only MCP server for Google Search Console. It lets an AI client (Claude Code, Claude Desktop, Cursor, Antigravity...) answer questions like "which pages lost traffic this month?" or "which queries are one push away from page one?" directly from your own Search Console data.

It is not a thin wrapper around the API: besides raw queries it ships the analyses an SEO actually runs, computed server-side so the model gets a short, ranked answer instead of 25,000 rows.

Status: v0.1. The analysis logic and the server are covered by 15 offline tests (fake Google service). The OAuth flow and live API calls have not been exercised end to end yet: run gsc-mcp-server auth, then list_sites, before relying on results.

Tools

Tool

What it answers

list_sites

Which properties can I read, and with what permission?

search_analytics

Raw query for an explicit date range, any dimensions, with page/query/country/device filters.

top_queries / top_pages

Top queries or pages by clicks, optionally scoped to a path or term.

compare_periods

Last N days vs the previous N days, per page or query (new / lost / up / down).

traffic_drops

Pages or queries that lost >= X % of their clicks, biggest absolute loss first.

ctr_opportunities

Queries with a CTR far below what your own site gets at that position (rewrite candidates).

striking_distance

Queries/pages ranking 8-20 with real impressions: the cheapest wins.

position_buckets

How many queries sit in 1-3, 4-10, 11-20, 21-50, 51+.

keyword_cannibalization

Queries where two or more of your pages share the impressions.

inspect_url

URL Inspection: index status, Google-selected canonical, last crawl, mobile usability.

Design choices worth knowing:

  • Read-only. The only OAuth scope requested is webmasters.readonly. The server cannot change anything in your property.

  • No external benchmarks. ctr_opportunities compares each query with the median CTR of the same site at the same position (needs >= 3 data points per position), instead of a generic CTR curve that would not fit your SERPs.

  • Data lag handled. Date ranges end 3 days ago because recent Search Console data is incomplete.

  • Capped output. Every tool caps its rows so results stay small enough for an LLM context.

  • Credentials stay local. The refresh token lives in ~/.config/gsc-mcp-server/token.json and is never printed or logged.

Related MCP server: Google Search Console MCP Server

Setup

  1. In Google Cloud Console, create a project, enable the Google Search Console API, and create an OAuth client ID of type "Desktop app". Download the JSON.

  2. Install:

    pip install git+https://github.com/gradientseo432/gsc-mcp-server
  3. Authorize once (opens the browser, read-only consent):

    export GSC_OAUTH_CLIENT_SECRETS=/path/to/client_secret.json
    gsc-mcp-server auth
  4. Register it with your client.

    Claude Code

    claude mcp add gsc -- gsc-mcp-server

    Claude Desktop / Cursor (mcpServers in the client's JSON config)

    {
      "mcpServers": {
        "gsc": { "command": "gsc-mcp-server" }
      }
    }

Environment variables: GSC_OAUTH_CLIENT_SECRETS (OAuth client file, default ./client_secret.json) and GSC_TOKEN_PATH (token location, default ~/.config/gsc-mcp-server/token.json).

Example prompts

  • "List my sites, then show the pages that lost more than 30 % of their clicks in the last 28 days."

  • "Which queries rank between 8 and 15 with more than 100 impressions? Group them by page."

  • "Find CTR opportunities for /blog/ and propose new titles for the top 5."

  • "Do any of my pages cannibalize each other for the same query?"

  • "Is https://example.com/pricing indexed, and which canonical did Google pick?"

Development

python -m venv .venv && . .venv/bin/activate    # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
pytest

The analysis logic (src/gsc_mcp/analysis.py) is pure Python with no network access; the server tests use a fake Google service, so the suite needs no credentials.

Limitations

  • Search Console API quotas apply; very large properties return the top rows only (the API caps rows per request).

  • inspect_url uses the URL Inspection API, which has its own daily per-property limit.

  • Anonymized queries are not returned by Search Console, so totals from the UI can differ from summed rows.

License

MIT. See LICENSE.

Tool Schema Changelog

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

Loading tool schema changelog…

    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.
      22 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to analyze Google Search Console SEO data through natural language, including search analytics, URL inspection, sitemap management, and property management.
      21
      MIT