SuperAPIAI Directory

mcp-server-gsc

github.com · AI developer platforms

mcp-server-gsc is a server based on the Model Context Protocol (MCP) for querying, comparing, and diagnosing Google Search Console data. It provides full search analytics access, period comparisons, SEO diagnostics, brand analysis, multi-site overview, bulk URL checks, and guided workflows, and is read-only by default, with write permissions that can be enabled through configuration.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)

About this tool

mcp-server-gsc is an MCP server designed to enable AI assistants to access and operate Google Search Console data. It supports querying, comparing, and diagnosing Search Console data, helping users with SEO analysis and decision-making.

Main capabilities include:

  • Full search analytics access: supports pagination, fresh data, hourly data, and all Search Console dimensions.
  • Period comparison: compares two date ranges by page, query, country, or device.
  • SEO diagnostics: identifies traffic drops, content decay, keyword cannibalization, CTR gaps, and quick-win opportunities.
  • Brand analysis: splits traffic into branded and non-branded portions.
  • Multi-site overview: compares all Search Console properties in a single call.
  • Bulk URL checks: checks up to 100 URLs, with rate limiting and partial results.
  • Guided workflows: uses MCP prompts for weekly reports, traffic drop diagnostics, and index audits.
  • Secure by default: the server is read-only until GSC_ALLOW_WRITE=true is set.

Usage: Requires Node.js 18 or later, a Google Cloud project with the Search Console API enabled, and a Google account or service account with access to the Search Console properties.

There are two methods for authentication setup:

  1. OAuth login: suitable for accessing properties of your own Google account. Create an OAuth client ID of type Desktop app, download the JSON file, run npx mcp-server-gsc auth login --client-secret /path/to/client_secret.json, and approve access in the browser. Login information is saved in ~/.config/mcp-server-gsc/oauth-token.json (file mode 600). To use write tools, add --write to the login command.
  2. Service account: suitable for automation, shared use, and remote deployment. Create a service account and download the JSON key, then add the service account email as a property user in Search Console (select "Restricted" for read-only, "Full" for write).

Configuration:

  • Claude Desktop: If using OAuth login, remove the env block.
  • MCP Bundle (.mcpb): Run the build command to generate a one-click installer; the client asks for the credentials file during installation.
  • Codex: Add the server in ~/.codex/config.toml or the project's .codex/config.toml, using an absolute path to specify the credentials file.

Write access (optional): By default, only the read-only scope (webmasters.readonly) is requested. To allow submitting sitemaps and managing sites, set GSC_ALLOW_WRITE=true; the server will then request the webmasters scope, and the account needs "Full" or "Owner" permission on the property. For a remote server, set GSC_ALLOW_WRITE as a Worker variable. When the flag is not set, the server does not list the submit_sitemap, delete_sitemap, add_site, and delete_site tools.

Remote deployment (Cloudflare Workers): The remote server uses OAuth; MCP clients sign in with Google, and only email addresses in ALLOWED_EMAILS can connect. All allowed users share one service account's Search Console access. If OAuth is not fully configured, /mcp returns HTTP 500. You need to create a Web application-type OAuth client ID in Google Cloud, add the redirect URI, set the Worker secrets (GOOGLE_CREDENTIALS, GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET, ALLOWED_EMAILS, PUBLIC_URL), deploy the Worker, then add https://<your-domain>/mcp to the MCP client and complete sign-in.

Available tools:

  • The search analytics tool supports parameters such as siteUrl, startDate, endDate, days, dimensions, type, aggregationType, dataState, rowLimit, startRow, responseFormat, pageFilter, queryFilter, filterOperator, regexFilter, countryFilter, deviceFilter, searchAppearanceFilter, brandedClassificationFilter, and more.
  • The analytics tools and batch_url_inspect return structuredContent matching outputSchema.
  • Note: Google does not report anonymous queries, so query-level totals may be lower than property totals; brand_split reports the difference as unattributed. If a tool reads maxRows rows, dataTruncated is set to true, and missing pages or queries are counted in unknownDueToTruncation.
  • The multi-site overview does not add metrics across properties, because a domain property and its URL-prefix properties may overlap.

Limits:

  • Google allows 2000 inspections per site per day and 600 per minute.
  • "Request indexing" in the URL Inspection page is not part of the Search Console API, so no tool can perform this action. The URL Inspection API is read-only.
  • Hourly data is returned for at most 10 days.
  • webMultimodal cannot be grouped by query.

Releases use npm trusted publishing; the repository does not store an npm token. To update the version, modify package.json, package-lock.json, manifest.json, and src/server.ts, add CHANGELOG.md, and push a tag such as v0.4.0; the Release workflow will test, publish to npm, and create a GitHub release.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools