Google Search Console MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add gsc-mcp -- npx -y @mikusnuz/gsc-mcp
README.md

MCP server for Google Search Console API and Google Indexing API

gsc-mcp

English | 한국어

MCP server for Google Search Console API and Google Indexing API — full API coverage.

When to Use

Task Tool
"Check which queries my site ranks for" search_analytics_query
"Submit a URL for indexing" indexing_publish
"Find pages with indexing errors" url_inspection_inspect
"Get search performance data for the last 30 days" search_analytics_query
"Compare click-through rates between mobile and desktop" search_analytics_query (group by device)
"Submit my sitemap to Google" sitemaps_submit
"Batch submit URLs for indexing" indexing_batch_publish

For AI agents: See `llms.txt` for a machine-readable summary. Copy `templates/CLAUDE.md` or `templates/AGENTS.md` into your project to teach your agent about this MCP.

Unlike other GSC MCP servers that only wrap searchAnalytics.query, this server exposes every endpoint available in the Google Search Console and Indexing APIs.

Tools (13)

Sites

Tool Description
sites_list List all sites (properties) in your Search Console
sites_get Get details of a specific site
sites_add Add a new site (property)
sites_delete Remove a site

Sitemaps

Tool Description
sitemaps_list List all submitted sitemaps for a site
sitemaps_get Get details of a specific sitemap
sitemaps_submit Submit a sitemap
sitemaps_delete Delete a sitemap

Search Analytics

Tool Description
search_analytics_query Query search performance data (clicks, impressions, CTR, position) with filtering and grouping. Supports hourly data with the hour dimension.

URL Inspection

Tool Description
url_inspection_inspect Inspect a URL's index status, crawl info, rich results, AMP, and mobile usability

Indexing API

Tool Description
indexing_publish Notify Google about URL updates or removals
indexing_get_metadata Get latest notification status for a URL
indexing_batch_publish Batch notify Google about up to 100 URL updates/removals in a single request

Authentication

Two authentication methods are supported:

Option 1: OAuth2 Refresh Token

{
  "mcpServers": {
    "gsc-mcp": {
      "command": "npx",
      "args": ["-y", "@mikusnuz/gsc-mcp"],
      "env": {
        "GSC_CLIENT_ID": "your-client-id",
        "GSC_CLIENT_SECRET": "your-client-secret",
        "GSC_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

Required OAuth2 scopes:

  • https://www.googleapis.com/auth/webmasters
  • https://www.googleapis.com/auth/indexing

Option 2: Service Account

{
  "mcpServers": {
    "gsc-mcp": {
      "command": "npx",
      "args": ["-y", "@mikusnuz/gsc-mcp"],
      "env": {
        "GSC_SERVICE_ACCOUNT_KEY_PATH": "/path/to/service-account-key.json"
      }
    }
  }
}

The service account must be added as an owner or user in Google Search Console for each site.

Setup Guide

OAuth2 Setup

  1. Go to Google Cloud Console
  2. Create a project (or select existing)
  3. Enable Search Console API and Indexing API
  4. Create OAuth 2.0 credentials (Desktop app type)
  5. Use the OAuth Playground to generate a refresh token with scopes:
    • https://www.googleapis.com/auth/webmasters
    • https://www.googleapis.com/auth/indexing

Service Account Setup

  1. Go to Google Cloud Console
  2. Create a service account
  3. Download the JSON key file
  4. Enable Search Console API and Indexing API
  5. In Search Console, add the service account email as an owner for your sites

License

MIT

Tools (13)

sites_listList all sites (properties) in your Search Console
sites_getGet details of a specific site
sites_addAdd a new site (property)
sites_deleteRemove a site
sitemaps_listList all submitted sitemaps for a site
sitemaps_getGet details of a specific sitemap
sitemaps_submitSubmit a sitemap
sitemaps_deleteDelete a sitemap
search_analytics_queryQuery search performance data (clicks, impressions, CTR, position) with filtering and grouping
url_inspection_inspectInspect a URL's index status, crawl info, rich results, AMP, and mobile usability
indexing_publishNotify Google about URL updates or removals
indexing_get_metadataGet latest notification status for a URL
indexing_batch_publishBatch notify Google about up to 100 URL updates/removals in a single request

Environment Variables

GSC_CLIENT_IDOAuth2 Client ID
GSC_CLIENT_SECRETOAuth2 Client Secret
GSC_REFRESH_TOKENOAuth2 Refresh Token
GSC_SERVICE_ACCOUNT_KEY_PATHPath to service account JSON key file

Configuration

claude_desktop_config.json
{"mcpServers": {"gsc-mcp": {"command": "npx", "args": ["-y", "@mikusnuz/gsc-mcp"], "env": {"GSC_CLIENT_ID": "your-client-id", "GSC_CLIENT_SECRET": "your-client-secret", "GSC_REFRESH_TOKEN": "your-refresh-token"}}}}

Try it

Check which queries my site ranks for in the last 30 days.
Inspect the indexing status of https://example.com/my-page.
Submit my new sitemap at https://example.com/sitemap.xml to Google.
Compare the click-through rates between mobile and desktop devices for my site.
Batch submit 50 URLs for indexing.

Frequently Asked Questions

What are the key features of Google Search Console?

Full API coverage for Google Search Console and Indexing APIs. Query search performance data including clicks, impressions, CTR, and position. Inspect URL index status, crawl info, and mobile usability. Manage sitemaps and site properties. Support for batch URL indexing notifications.

What can I use Google Search Console for?

Automating SEO performance reporting for multiple websites. Quickly identifying and debugging indexing errors for specific pages. Streamlining the sitemap submission process for large sites. Monitoring search performance trends directly within an AI chat interface.

How do I install Google Search Console?

Install Google Search Console by running: npx -y @mikusnuz/gsc-mcp

What MCP clients work with Google Search Console?

Google Search Console works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Google Search Console docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare