SuperAPI AI Directory

gsc-mcp

Google Search Console: search analytics by query, page, country and device, striking-distance reports, sitemap management and URL inspection.

Open website

About this tool

gsc-mcp is an MCP (Model Context Protocol) server designed for AI assistants, exposing Google Search Console data and operations to AI agents. Its goal is to automate the tedious parts of SEO—finding keywords close to page-one rankings, checking indexing status, and keeping sitemaps healthy. The project was built by Conor Bronsdon, initially for SEO on two websites (a podcast and a personal site), but it is not specific to those sites and can point at any verified property.

In terms of purpose: the MCP server provides search analytics data (by query, page, country/region, device), calculates keywords near page one (striking distance), manages sitemaps, and checks the indexing status of specific URLs. It is intended to give AI assistants access to the data and operational levers behind organic search.

Main capabilities: it provides 7 tools, of which 5 are read-only tools and 2 are write tools (gsc_submit_sitemap and gsc_delete_sitemap). Each tool carries MCP read/write annotations, so clients can distinguish read-only from write tools. Read tools are marked readOnlyHint: true; gsc_submit_sitemap is a non-destructive write; gsc_delete_sitemap is marked destructiveHint: true. List tools default to a row limit (row_limit/limit) of 25 to keep responses compact, because agents consume tokens by response. Supports derived views such as gsc_striking_distance (client-side calculation: fetch up to 1000 query rows and filter to a position range). Supports listing verified properties (gsc_list_sites).

Usage: the server uses OAuth installed app credentials (a saved refresh token), rather than a service account or API key. It reads credentials from ~/.config/gws/searchconsole_credentials.json (an alternative path can be specified via the GSC_CREDENTIALS_PATH environment variable). The file format is the Credentials.to_json() shape from google-auth, containing client_id, client_secret, refresh_token and scopes. The server uses fetch directly to refresh short-lived access tokens from Google's token endpoint, without relying on the heavyweight googleapis library.

Setup steps: 1. Verify the property in Search Console (a domain property is recommended, verified via a DNS TXT record, covering http/https and all subdomains; gsc_list_sites will show it as sc-domain:example.com or https://example.com/)。2. generate credentials: create an OAuth client in the Google Cloud Console (type: Desktop app), download client_secret.json, enable the Search Console API, run the installed app OAuth flow and request the required scopes, save the credentials to ~/.config/gws/searchconsole_credentials.json. Read tools require https://www.googleapis.com/auth/webmasters.readonly scope; write tools and URL inspection require the full https://www.googleapis.com/auth/webmasters Scope. If the credential has only read-only scope, read tools work, and write tools return a clear "regenerate with full scope" error. 3. Configure the MCP client (such as .mcp.json or claude_desktop_config.json). The default path requires no env block.

The server can also start without credentials and respond to tools/list, making it easy for the MCP inspector to introspect; tool calls return setup guidance. stdout is reserved for the MCP transport.

Use cases: SEO automation, such as having an AI assistant list Search Console properties, show striking-distance keywords from the past 28 days, check the index status of a specific URL, manage sitemaps, etc. Suitable for users who need to integrate SEO work into AI agent workflows.

Limitations: No request indexing tool (by design): Search Console's "Request Indexing" button has no public API, and Google's Indexing API only supports JobPosting and BroadcastEvent pages, not ordinary content, so indexing requests for ordinary pages must be clicked manually in the UI; gsc_submit_sitemap is the supported API method. Data lags by about 2-3 days, Search Analytics is not real-time, and date ranges should end a few days ago. searchAnalytics has a per-call limit: row_limit is capped at 1000 (the API allows 25000 but requires pagination), and large pulls require pagination. Striking distance is calculated client-side, based on the top 1000 query rows by clicks, not the full long tail. URL inspection is rate-limited and slow; Google has a low daily quota for the URL Inspection API, each call may take 1-2 seconds, and you should check specific URLs rather than looping over an entire sitemap. There are no property add/remove tools; properties must be verified in the Search Console UI. General API quotas apply, and HTTP 429 returns a clear error.

This project is in maintenance mode: stable and receiving security fixes, with no new features planned, but issues and pull requests are welcome. Tests use mock fetch and make no network calls. This is an independent personal project and is not affiliated with Google LLC.