mcp-gsc is a self-hostable Model Context Protocol (MCP) server for Google Search Console, part of the DigestSEO open-source SEO tool suite. It lets users connect their own Google account to Claude.ai, Cursor, ChatGPT, or any MCP-compatible client, and then ask an AI assistant in natural language about a site's organic search performance: impressions, clicks, top queries, indexing status, and sitemap health.
Purpose and positioning The tool's core purpose is to expose Google Search Console data to AI clients as MCP tools. It runs on Cloudflare Workers and includes built-in Google OAuth guidance: after a client connects to the server, it sees the mcp-gsc consent page (which identifies the requesting MCP client and the permissions), then signs in with a Google account and grants the required Search Console permissions. There is no need to copy API keys or manage a service account JSON.
Main capabilities The default read-write mode (GSC_ACCESS_MODE=readwrite) exposes 23 tools; read-only analytics and reporting tools carry MCP's readOnlyHint marker, while write tools can change Search Console properties, sitemaps, or indexing status. Setting GSC_ACCESS_MODE=readonly requests only read-only Search Console permissions and exposes 16 tools that do not require write permissions or separate Indexing API permissions (the read-only indexing.status query is also not registered because it still requires Indexing API permissions). The tools cover query clicks, impressions, average ranking, URL inspection, sitemaps, and eligible indexing workflows. List-type tools provide start_row / next_start_row where applicable; ranking analysis tools provide limit, start_row, and result_page metadata including has_more, truncated, and byte_limit_reached, and pagination should continue when has_more is true.
How to use It can be run locally with npm, or self-hosted on Cloudflare Workers. The self-hosting launcher is published as @digestseo/mcp-gsc: the npm launcher starts a local-only Streamable HTTP Worker on 127.0.0.1 (default port 8080); it is not a stdio MCP process. The npx command can be run from any directory, because the launcher resolves its bundled Worker configuration from the installed package. Before starting, provide the Google OAuth and token encryption environment variables as described in SETUP.md; if GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, or TOKEN_ENCRYPTION_KEY is missing or empty, the launcher exits before starting Wrangler; if TOKEN_ENCRYPTION_KEY is non-empty, it must be valid base64 and decode to exactly 32 bytes. Error messages only indicate the invalid or missing setting and do not leak key values. Before the first OAuth login, authorize the exactly matching callback address in Google CloudURL. After providing the environment variables, the client connects http://127.0.0.1:8080/google/callback(或使用启动时所用的同一自定义端口);启动器会在启动时打印这两个 URL. The client connects after providing the environment variable http://127.0.0.1:8080/mcp。
Local KV and Durable Object state (including the encrypted Google session) are stored by default in ~/.mcp-gsc/state, rather than in the npm package cache, so that the local connection persists after package upgrades and routine npm cache cleanups. MCP_GSC_STATE_DIR may be used to specify a different directory; when reusing existing state, the same TOKEN_ENCRYPTION_KEY must be kept, because the stored refresh token is encrypted with it. The launcher prints the effective state directory at startup.
Regarding client connections, the Codex CLI and the Codex IDE extension share the MCP configuration, so registering once makes it available in both; when using it, start the npm launcher first, and when authentication is needed, Codex opens the server's OAuth flow. When installed as a Cursor plugin, Cursor also automatically discovers three built-in Agent Skills: gsc-weekly-review, gsc-indexing-triage, and gsc-search-opportunities. The GitHub Copilot CLI can be installed via the marketplace workflow or directly from the repository (copilot plugin install AKzar1el/mcp-gsc), and the plugin likewise bundles these three Agent Skills and the local loopback MCP configuration. The Gemini CLI extension also bundles the verified local loopback MCP configuration and the same three Agent Skills. Before using any of these plugins, the npm launcher must be started first; the plugins themselves do not start or deploy mcp-gsc.
ChatGPT cannot connect directly to the 127.0.0.1 loopback endpoint; for private/local use, an OpenAI Secure MCP Tunnel can be created, running tunnel-client on the same machine as the launcher to access http://127.0.0.1:8080/mcp,创建 In the ChatGPT app, choose the Tunnel connection. Alternatively, deploy your own externally accessible HTTPS Worker and add its /mcp URL as a custom MCP app in developer mode. Claude.ai / Claude Desktop can add a custom connector in Customize → Connectors and paste the /mcp URL; Cursor can add a remote Streamable HTTP MCP server pointing to the same /mcp URL.
Use cases After connecting, you can ask, for example: the top 20 queries by clicks in the past 28 days; compare this month's and last month's impressions for a domain and find pages that declined; the index status and last crawl time of a URL according to Google's indexed version; high-impression query/page optimization opportunities with average position between 5 and 15; a weekly summary scoped to a sitemap; whether the sitemap has errors or warnings; approximately distinguishing branded from non-branded clicks by the provided brand regex; how a site performs in Google Discover versus regular web search, etc.
Limitations and caveats Search analytics calendar dates (start_date, end_date, and comparison-period dates) use Google's Pacific Time calendar (America/Los_Angeles), not the caller's local time zone or UTC, and the server-generated default date ranges are subject to this as well. Regarding platform properties, Search Console already supports platform properties for social/video accounts such as Instagram, TikTok, X, and YouTube, but the current Search Console API documentation still only defines the URL-prefix and sc-domain: website property forms and has not published an API identifier convention for platform properties; sites.list will retain every identifier returned by Google and flag whether it conforms to the documented API syntax, while other tools will deliberately reject undocumented forms; for platform properties, please use the Search Console UI/export for now.
Query regexes are only manual approximations; Search Console's native branded/non-branded filtering uses Google's own AI-assisted classification and is not exposed through the Search Analytics API. Search Console has a dedicated generative AI performance report (Search and Discover), but the currently documented Search Analytics API does not expose a dedicated generative AI search type or filter selector, and this MCP will not guess; AI Overviews and AI Mode are still included in the overall web search performance data. As of September 24, 2026, the Search Console UI also has web multimodal performance filters for searches such as Lens, Circle to Search, image upload, and Chrome image search, but the current API and discovery documents still only expose the web, image, video, news, discover, and googleNews search types, and this MCP will not invent a multimodal search type or guess searchAppearance values.
Indexing API eligibility and provider approval: The Google Indexing API is not a general-purpose page submission tool; as of the time of writing, Google documentation limits it to two types of content—pages containing JobPosting structured data, and livestream pages with BroadcastEvent structured data nested inside VideoObject. Before indexing.request, the server crawls the target URL and checks static JSON-LD, Microdata, and RDFa markup for the presence of one of these two types; if neither is present (or the page cannot be crawled), it returns an error explaining that the URL is not eligible, rather than calling the Indexing API. Structured data injected only after client-side JavaScript runs cannot be confirmed by this bounded pre-check, so it fails closed. Before indexing.remove, the server confirms Google's removal prerequisites: the URL must already return HTTP 404/410 or expose a robots noindex meta directive. Update and removal notifications share the same publishing quota. Google defaults to 200 publish requests per project per day, used for onboarding and submission testing; using the API beyond that context requires Google's usage/resource configuration approval. Google also performs spam detection on each submission and warns that abuse or attempts to exceed quota through multiple accounts or other means may result in revoked access. A successful notification is only confirmation that Google has received it, and does not guarantee that indexing or removal is complete.
Otheritems: For complete installation, Google OAuth, and Cloudflare deployment configuration, see SETUP.md. When read mode is readwrite, it requests Search Console read-write and Indexing API permissions; read-only mode requests only https://www.googleapis.com/auth/webmasters.readonly(外加 openid and email). Read-write is still the default, to preserve existing deployment behavior. For ChatGPT, the full MCP (including write/modify tools) is currently available to Business and Enterprise/Edu, while Pro's custom MCP access is read-only/fetch, and that path should use GSC_ACCESS_MODE=readonly.