npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-server-google-search-console

v1.0.1

Published

Community-built MCP server for Google Search Console API

Readme

mcp-server-google-search-console

CI Node.js >= 22 MCP compatible License: MIT npm version npm downloads

Community-built MCP server for the Google Search Console API. Provides search analytics, performance summaries, URL inspection, sitemap management, and property listing through the Model Context Protocol.

Features

  • 9 tools covering search analytics, performance summaries, URL inspection, sitemap management, and property listing
  • 3 prompts for guided multi-step SEO workflows
  • 2 resources for automatic property and sitemap discovery
  • Service Account & OAuth — choose headless or interactive authentication
  • Read-only by default — write tools are only registered when write scope is configured
  • Safety gatesdelete_sitemap requires explicit confirm: true
  • Minimal dependencies — only @modelcontextprotocol/sdk and zod

Quick Start

1. Set Up Credentials

Service Account (recommended for servers & CI):

  1. Go to Google Cloud Console
  2. Create or select a project
  3. Enable the Google Search Console API
  4. Create a Service Account and download the JSON key file
  5. In Google Search Console, add the service account email as a user to your properties

OAuth (recommended for personal use):

  1. In Google Cloud Console, create OAuth 2.0 Client ID (type: Desktop app)
  2. Download the client credentials JSON
  3. Set GSC_OAUTH_CLIENT_FILE — the server will open a browser for consent on first run
  4. Tokens are cached at ~/.config/gsc-mcp/oauth-token.json (or GSC_OAUTH_TOKEN_FILE)

2. Configure Your Client

claude mcp add google-search-console \
  -e GSC_SERVICE_ACCOUNT_KEY_FILE=/path/to/service-account-key.json \
  -- npx -y mcp-server-google-search-console

Or add to .mcp.json manually:

{
  "mcpServers": {
    "google-search-console": {
      "command": "npx",
      "args": ["-y", "mcp-server-google-search-console"],
      "env": {
        "GSC_SERVICE_ACCOUNT_KEY_FILE": "/path/to/service-account-key.json"
      }
    }
  }
}

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "google-search-console": {
      "command": "npx",
      "args": ["-y", "mcp-server-google-search-console"],
      "env": {
        "GSC_SERVICE_ACCOUNT_KEY_FILE": "/path/to/service-account-key.json"
      }
    }
  }
}

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "google-search-console": {
      "command": "npx",
      "args": ["-y", "mcp-server-google-search-console"],
      "env": {
        "GSC_SERVICE_ACCOUNT_KEY_FILE": "/path/to/service-account-key.json"
      }
    }
  }
}

Add to .vscode/mcp.json:

{
  "servers": {
    "google-search-console": {
      "command": "npx",
      "args": ["-y", "mcp-server-google-search-console"],
      "env": {
        "GSC_SERVICE_ACCOUNT_KEY_FILE": "/path/to/service-account-key.json"
      }
    }
  }
}
docker build -t gsc-mcp .
{
  "mcpServers": {
    "google-search-console": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "GSC_SERVICE_ACCOUNT_KEY_FILE=/key.json",
        "-v", "/path/to/service-account-key.json:/key.json:ro",
        "gsc-mcp"
      ]
    }
  }
}

Tools

Always available (read-only scope)

| Tool | Description | |------|-------------| | list_sites | List all GSC properties accessible by the current credentials | | get_site | Get details for a specific property (permission level, verification) | | get_search_analytics | Query search performance data with dimensions, filters, date ranges, and comparison mode | | get_performance_summary | Quick performance overview: current vs previous period metrics, deltas, and top 10 queries in a single call | | inspect_url | Check a URL's indexing status, mobile usability, and rich results | | batch_inspect_urls | Inspect multiple URLs concurrently (up to 20) with a single call | | list_sitemaps | List all sitemaps for a property with aggregated health summary |

Write scope required

These tools are only registered when GSC_SCOPES includes the full write scope. They do not appear in the tool list otherwise.

| Tool | Description | |------|-------------| | submit_sitemap | Submit a sitemap to Google | | delete_sitemap | Delete a sitemap (requires confirm: true safety gate) |

Prompts

Guided multi-step SEO workflows that guide LLMs through structured analysis.

| Prompt | Parameters | Description | |--------|------------|-------------| | seo_performance_analysis | site_url, period (7d/28d/90d) | 5-step analysis: Top Queries → Top Pages → Device Split → Country Split → Trends. Produces a structured report with actionable insights. | | index_coverage_check | site_url, urls (comma-separated) | Batch URL inspection with structured coverage report — flags indexing issues, canonical mismatches, and mobile problems. | | content_opportunity_analysis | site_url | Full-funnel analysis: Low-Hanging Fruit (positions 5–20), Keyword Cannibalization detection, and Trending queries via comparison mode. |

Resources

| URI | Description | |-----|-------------| | sites://list | Auto-discovery of all GSC properties accessible with current credentials. Enables LLMs to discover available sites without calling list_sites first. | | sitemaps://{site_url} | Sitemaps for a specific property (e.g. sitemaps://sc-domain:example.com) with health summary, errors, warnings, and index rates. |

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | GSC_SERVICE_ACCOUNT_KEY_FILE | * | Path to service account JSON key file | | GSC_SERVICE_ACCOUNT_KEY | * | Inline service account JSON (alternative to file) | | GSC_OAUTH_CLIENT_FILE | * | Path to OAuth client credentials JSON (Desktop app type) | | GSC_OAUTH_TOKEN_FILE | No | Custom path for cached OAuth tokens (default: ~/.config/gsc-mcp/oauth-token.json) | | GSC_SCOPES | No | OAuth scope. Default: webmasters.readonly. Set to https://www.googleapis.com/auth/webmasters for write access |

* Auth priority: OAuth (GSC_OAUTH_CLIENT_FILE) > Service Account (GSC_SERVICE_ACCOUNT_KEY_FILE or GSC_SERVICE_ACCOUNT_KEY). At least one must be configured.

Development

npm install      # Install dependencies
npm run build    # Build
npm run dev      # Watch mode
npm test         # Run tests

License

MIT

Note: This is an unofficial community project. It is not affiliated with or endorsed by Google.


Built by Tobias Hein at artaxo — a digital marketing agency specializing in AI Search Optimization.