Skip to content
MCP server
Registry

google-gsc MCP Server

Google Search Console MCP: search analytics, URL inspection, site management.

google-gsc scores 32 (Limited), licensed MIT and written in TypeScript. It installs as a local process. It declares 4 tools. Filed under Data and analytics, Search. GitHub shows 2 stars. Package registries report about 136 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.

by mharnettMITTypeScript2 stars
Trust score
32Limited
Trust score 32 of 100, Limited

Limited trust

32 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 32 comes from

0 + 6 + 5 + 10 + 4 + 7 = 32. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance6 / 20

How recently the repository saw a commit or release.

Maintenance: 6 of 20 points.
Popularity5 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 5 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs7 / 10

A real summary, a README with depth, listed tools.

Docs: 7 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "mharnett-mcp-search-console": {      "command": "npx",      "args": [        "-y",        "mcp-google-gsc@1.2.2"      ],      "env": {        "GOOGLE_APPLICATION_CREDENTIALS": "",        "GOOGLE_GSC_CLIENT_ID": "",        "GOOGLE_GSC_CLIENT_SECRET": "YOUR_GOOGLE_GSC_CLIENT_SECRET",        "GOOGLE_GSC_REFRESH_TOKEN": "YOUR_GOOGLE_GSC_REFRESH_TOKEN"      }    }  }}

Environment variables

NameRequiredNotes
GOOGLE_APPLICATION_CREDENTIALSOptionalService-account mode: path to a service account JSON key file. Optional -- provide this OR the OAuth variables below.
GOOGLE_GSC_CLIENT_IDOptionalUser-OAuth mode: OAuth 2.0 Desktop-app client ID from your own Google Cloud project.
GOOGLE_GSC_CLIENT_SECRETSecretOptionalUser-OAuth mode: OAuth 2.0 client secret paired with GOOGLE_GSC_CLIENT_ID.
GOOGLE_GSC_REFRESH_TOKENSecretOptionalUser-OAuth mode: refresh token minted by the OAuth helper (get-refresh-token.cjs / mcp-gsc-auth).

Tools4Tool docs quality grade B

All capabilities
  • Detect the GSC property from your working directory based on config mapping

  • Inspect a URL for indexing status, mobile usability, and rich results

  • List all verified Search Console properties accessible to the authenticated account

  • Query search performance data (clicks, impressions, CTR, position) with dimension and filter support

About

mcp-google-gsc

MCP server for Google Search Console -- search analytics, URL inspection, and site management via Claude.

Quick install

Claude Code, one line (replace the placeholder values with your own; see Configuration for how to get them):

claude mcp add --env GOOGLE_GSC_CLIENT_ID=YOUR_CLIENT_ID --env GOOGLE_GSC_CLIENT_SECRET=YOUR_CLIENT_SECRET --env GOOGLE_GSC_REFRESH_TOKEN=YOUR_REFRESH_TOKEN --transport stdio mcp-google-gsc -- npx -y mcp-google-gsc

The server is read-only: all four tools are reads and it only asks for the webmasters.readonly scope. For unattended use, set GOOGLE_APPLICATION_CREDENTIALS to a service-account key file instead (see Mode B).

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), then fully quit and restart Claude Desktop:

{
  "mcpServers": {
    "mcp-google-gsc": {
      "command": "npx",
      "args": ["-y", "mcp-google-gsc"],
      "env": {
        "GOOGLE_GSC_CLIENT_ID": "YOUR_CLIENT_ID",
        "GOOGLE_GSC_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
        "GOOGLE_GSC_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN"
      }
    }
  }
}

Add this to ~/.codex/config.toml:

[mcp_servers.mcp-google-gsc]
command = "npx"
args = ["-y", "mcp-google-gsc"]

[mcp_servers.mcp-google-gsc.env]
GOOGLE_GSC_CLIENT_ID = "YOUR_CLIENT_ID"
GOOGLE_GSC_CLIENT_SECRET = "YOUR_CLIENT_SECRET"
GOOGLE_GSC_REFRESH_TOKEN = "YOUR_REFRESH_TOKEN"

Features

  • Search Analytics -- Query clicks, impressions, CTR, and position with flexible dimension filters (query, page, device, country, date)
  • URL Inspection -- Check indexing status, mobile usability, and rich results for any URL
  • Site Listing -- List all verified Search Console properties accessible to your authenticated account (OAuth user or service account)
  • Multi-Client Support -- Manage multiple GSC properties with per-directory config mapping

Installation

From npm

npm install mcp-google-gsc

From source

git clone https://github.com/mharnett/mcp-search-console.git
cd mcp-google-gsc
npm install
npm run build

Configuration

Security: Never share your .mcp.json file or commit it to git -- it may contain API credentials. Add .mcp.json to your .gitignore.

mcp-gsc supports two authentication modes. Pick whichever fits your setup. Neither requires any file living at a hardcoded machine-local path -- credentials come from environment variables (or a config.json you create).

Which mode to use:

  • Service Account (Mode B) -- recommended for unattended / server / headless use. A service account has no interactive login to expire or re-consent, so it is the right fit for always-on deployments. The one setup requirement is that the service account's email must be granted access on each Search Console property you want to query (see Mode B).
  • User OAuth (Mode A) -- for personal / interactive use, where you want to authorize with your own Google login.

Precedence when both are configured: if a service-account keyfile is explicitly set (GOOGLE_APPLICATION_CREDENTIALS, or credentials_file in config.json), it wins over any OAuth refresh token or stored OAuth credentials. If neither is configured, the server fails loudly at startup with an onboarding message rather than silently guessing -- there is no machine-local default and no silent runtime failover between modes.

Mode A: User OAuth (bring your own Google account)

Use this if you want to authorize with your own Google login (the account that has Search Console access). Best for personal / interactive use.

  1. In the Google Cloud Console, create an OAuth 2.0 Client ID of type Desktop app and enable the Search Console API. (For a Desktop-app client, Google accepts any http://localhost loopback redirect -- you do not need to pre-register a port.)
  2. Export your client credentials:
    export GOOGLE_GSC_CLIENT_ID=...apps.googleusercontent.com
    export GOOGLE_GSC_CLIENT_SECRET=...
    
  3. Mint a refresh token (opens your browser, uses PKCE + access_type=offline):
    node get-refresh-token.cjs
    

    Do not redirect this command's stdout to a shared log -- it prints the refresh token to stdout by design.

  4. Copy the printed line into your environment:
    export GOOGLE_GSC_REFRESH_TOKEN=...
    

The server reads GOOGLE_GSC_CLIENT_ID, GOOGLE_GSC_CLIENT_SECRET, and GOOGLE_GSC_REFRESH_TOKEN from the environment at runtime.

Alternatively, run the guided helper npx mcp-gsc-auth, which performs the same PKCE OAuth flow, lets you pick a default Search Console property, and writes the result to a per-user credentials file.

Mode B: Service Account (recommended for unattended / server use)

Use this for server / headless / always-on contexts -- it is the recommended path when no human is present to complete or refresh an interactive login.

  1. Create a Google Cloud service account with Search Console API access and download its JSON key file.
  2. Grant the service account's email access on each Search Console property you want to query (add it as a user in Search Console). Without this grant on the property, the service account can authenticate but will see no sites.
  3. Point the server at the key file via an environment variable (no hardcoded path):
    export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/service-account-key.json
    

OAuth scope

Both modes request a single, read-only scope: https://www.googleapis.com/auth/webmasters.readonly. All four tools are reads -- nothing writes -- so the server never asks for read/write access.

The scope is defined once in config.json under oauth.scope (see config.example.json). The OAuth helper and the runtime read the same value, so they never drift. If config.json is absent (e.g. a fresh install), the committed read-only default is used.

Multi-client config (optional)

To map working directories to Search Console properties, create a config.json in the project root (see config.example.json):

{
  "oauth": {
    "scope": "https://www.googleapis.com/auth/webmasters.readonly"
  },
  "clients": {
    "my-project": {
      "name": "My Project",
      "folder": "/path/to/project",
      "site_url": "https://example.com/"
    }
  }
}

Usage

Add to your Claude Code .mcp.json:

{
  "mcpServers": {
    "gsc": {
      "command": "node",
      "args": ["/path/to/mcp-gsc/dist/index.js"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "gsc": {
      "command": "npx",
      "args": ["mcp-google-gsc"]
    }
  }
}

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

Tools

ToolDescription
gsc_get_client_contextDetect the GSC property from your working directory based on config mapping
gsc_list_sitesList all verified Search Console properties accessible to the authenticated account
gsc_search_analyticsQuery search performance data (clicks, impressions, CTR, position) with dimension and filter support
gsc_inspectionInspect a URL for indexing status, mobile usability, and rich results

gsc_search_analytics

Supports dimensions: query, page, device, country, date. Filter by any dimension with operators like equals, contains, notContains. Date range defaults to the last 28 days.

gsc_inspection

Returns index coverage, crawl status, mobile usability verdict, and rich result details for a specific URL within a property.

Architecture

  • Resilience -- Uses cockatiel for retry with exponential backoff and circuit breaker patterns on all Google API calls
  • Logging -- Structured logging via pino with configurable log levels
  • Response Handling -- Responses truncated at 200KB to stay within MCP transport limits

License

MIT -- see LICENSE.


Built by Mark Harnett / drak-marketing

Frequently asked questions

What is google-gsc MCP Server?

Google Search Console MCP: search analytics, URL inspection, site management.

How do I install google-gsc MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. google-gsc MCP Server runs locally from the npm package mcp-google-gsc with the command npx -y mcp-google-gsc@1.2.2.

Is google-gsc MCP Server free and open source?

Yes. google-gsc MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does google-gsc MCP Server support remote (HTTP) connections?

No remote endpoint is listed for google-gsc MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does google-gsc MCP Server provide?

google-gsc MCP Server provides 4 tools: gsc_get_client_context, gsc_inspection, gsc_list_sites, and gsc_search_analytics. See the full tool list for descriptions and parameters.

How is google-gsc MCP Server's trust score calculated?

google-gsc MCP Server scores 32 out of 100 (Limited). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server