SS

shin-sibainu/google-search-console-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

29 stars 4 forks Качество 65 Тренд 11MIT

Model Context Protocol server for Google Search Console API - integrate with Claude Code and Claude Desktop

Обзор

A Model Context Protocol (MCP) server that provides programmatic access to Google Search Console API data through Claude Code and Cursor. Jump to Step-by-Step Setup Guide for complete instructions. - 🔍 - Get all Search Console properties you have access to - 📊 - Query search performance data with flexible filtering - 🗺️ - Retrieve sitemap status and indexing statistics - 🔎 - Check detailed indexing status of specific URLs - 📤 - Request Google to index or remove URLs - 📈 - Compare search performance between two time periods - 🛡️ - Detailed error messages with actionable guidance - 🔄 - Handles rate limits and transient failures - ✅ - Validates all parameters before API calls - Site registered in Search Console - Site ownership verified - Access to the Search Console property you want to query - A GCP project (free tier is sufficient) - enabled - credentials (Desktop app type) - (Optional) enabled if you want to use submit_url_for_indexing 💡 : You only need to set up GCP...

README

Показан фрагмент оригинального README. Открыть оригинал.

Google Search Console MCP Server

A Model Context Protocol (MCP) server that provides programmatic access to Google Search Console API data through Claude Code and Cursor.

Quick Start

New to this MCP server? Jump to Step-by-Step Setup Guide for complete instructions.

Features

  • 🔍 List Sites - Get all Search Console properties you have access to
  • 📊 Search Analytics - Query search performance data with flexible filtering
  • 🗺️ Sitemap Information - Retrieve sitemap status and indexing statistics
  • 🔎 URL Inspection - Check detailed indexing status of specific URLs
  • 📤 Submit URL for Indexing - Request Google to index or remove URLs
  • 📈 Compare Periods - Compare search performance between two time periods
  • 🛡️ Robust Error Handling - Detailed error messages with actionable guidance
  • 🔄 Automatic Retry Logic - Handles rate limits and transient failures
  • ✅ Input Validation - Validates all parameters before API calls

Prerequisites

Before using this MCP server, you need:

1. Google Search Console

  • Site registered in Search Console
  • Site ownership verified
  • Access to the Search Console property you want to query

2. Google Cloud Platform (GCP)

  • A GCP project (free tier is sufficient)
  • Google Search Console API enabled
  • OAuth 2.0 Client ID credentials (Desktop app type)
  • (Optional) Indexing API enabled if you want to use submit_url_for_indexing

💡 Note: You only need to set up GCP once. The CLIENT_ID and CLIENT_SECRET are reusable across multiple sites in your Search Console.

Setup

1. Configure Claude Code

Create .mcp.json in your project root:

{
  "mcpServers": {
    "google-search-console": {
      "command": "npx",
      "args": ["-y", "-p", "google-search-console-mcp-server", "google-search-console-mcp"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "GOOGLE_CLIENT_SECRET": "your-client-secret",
        "GOOGLE_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

⚠️ Important: The args must include all three parts:

  1. "-y" - Auto-confirm npx prompt
  2. "-p", "google-search-console-mcp-server" - Package name
  3. "google-search-console-mcp" - Executable name (different from package name!)

💡 Note: GOOGLE_REDIRECT_URI defaults to http://localhost:8080 and doesn’t need to be specified unless you want to use a different port.

2. Get Google OAuth Credentials

💡 Tip: You can use an existing OAuth 2.0 Client ID from other services (Supabase, Firebase, etc.) or create a new one.

  1. Go to Google Cloud Console
  2. Create or select a project
  3. Enable APIs:
    • Navigate to “APIs & Services” → “Enable APIs and Services”
    • Search and enable “Google Search Console API”
    • (Optional) Enable “Indexing API” if you want to use submit_url_for_indexing
Открыть полный README на GitHub

Установка

npx -y -p google-search-console-mcp-server google-search-console-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "google-search-console": { "command": "npx", "args": ["-y", "-p", "google-search-console-mcp-server", "google-search-console-mcp"], "env": { "GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com", "GOOGLE_CLIENT_SECRET": "your-client-secret", "GOOGLE_REFRESH_TOKEN": "your-refresh-token" } } } }