Google Search Console MCP server

Integrates with Google Search Console API to provide website search performance analytics, indexing status monitoring, and sitemap management for SEO professionals
Back to servers
Setup instructions
Provider
Amin Foroutan
Release date
Mar 14, 2025
Language
Python
Stats
90 stars

This MCP server connects Google Search Console (GSC) with Claude AI, allowing you to analyze SEO data through natural language conversations. You can access property information, search analytics, URL inspection, and sitemap management by simply chatting with Claude.

Installation Requirements

Before getting started, you'll need to install:

Setting Up Google Search Console API Access

The tool supports two authentication methods:

OAuth Authentication (Recommended)

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Search Console API for your project
  4. Add scope https://www.googleapis.com/auth/webmasters
  5. Go to the "Credentials" page
  6. Click "Create Credentials" and select "OAuth client ID"
  7. Configure the OAuth consent screen
  8. For application type, select "Desktop app"
  9. Give your OAuth client a name and click "Create"
  10. Download the client secrets JSON file

Service Account Authentication

  1. Go to the Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Search Console API
  4. Go to the "Credentials" page
  5. Click "Create Credentials" and select "Service Account"
  6. Fill in the service account details and click "Create"
  7. Click on the newly created service account
  8. Go to the "Keys" tab and click "Add Key" > "Create new key"
  9. Select JSON format and click "Create"
  10. Download the key file and save it as service_account_credentials.json
  11. Add your service account email address to appropriate Search Console properties

Installing the MCP Server

  1. Download the tool:

    git clone https://github.com/AminForou/mcp-gsc.git
    

    Or download the ZIP file from the GitHub repository and unzip it.

  2. Navigate to the folder in terminal:

    cd path/to/mcp-gsc-main
    
  3. Create a virtual environment:

    # Using uv (recommended):
    pip install uv
    uv venv .venv
    
    # OR using standard Python:
    python -m venv .venv
    
  4. Activate the virtual environment:

    # On Mac/Linux:
    source .venv/bin/activate
    
    # On Windows:
    .venv\Scripts\activate
    
  5. Install dependencies:

    # Using uv:
    uv pip install -r requirements.txt
    
    # OR using standard pip:
    pip install -r requirements.txt
    

Connecting Claude to Google Search Console

  1. Open your Claude Desktop configuration file:

    # For Mac users:
    nano ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
    # For Windows users:
    notepad %APPDATA%\Claude\claude_desktop_config.json
    
  2. Add the appropriate configuration:

    For OAuth authentication:

    {
      "mcpServers": {
        "gscServer": {
          "command": "/FULL/PATH/TO/.venv/bin/python",
          "args": ["/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"],
          "env": {
            "GSC_OAUTH_CLIENT_SECRETS_FILE": "/FULL/PATH/TO/client_secrets.json"
          }
        }
      }
    }
    

    For service account authentication:

    {
      "mcpServers": {
        "gscServer": {
          "command": "/FULL/PATH/TO/.venv/bin/python",
          "args": ["/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"],
          "env": {
            "GSC_CREDENTIALS_PATH": "/FULL/PATH/TO/service_account_credentials.json",
            "GSC_SKIP_OAUTH": "true"
          }
        }
      }
    }
    

    Replace all paths with the actual locations on your computer.

  3. Save the file and restart Claude Desktop

Using the GSC Tools with Claude

Once connected, you can use the following tools by asking Claude:

Property Management

  • list_properties - Shows all your GSC properties
  • get_site_details - Shows details about a specific site
  • add_site - Adds a new site to your GSC properties
  • delete_site - Removes a site from your GSC properties

Search Analytics

  • get_search_analytics - Shows top queries and pages with metrics
  • get_performance_overview - Gives a summary of site performance
  • get_search_by_page_query - Analyzes search terms driving traffic to specific pages
  • compare_search_periods - Compares performance between different time periods
  • get_advanced_search_analytics - Provides detailed analytics with filtering options

URL Inspection

  • check_indexing_issues - Checks if pages have indexing problems
  • inspect_url_enhanced - Detailed inspection of a specific URL
  • batch_url_inspection - Inspects multiple URLs at once

Sitemap Management

  • get_sitemaps - Lists all sitemaps for your site
  • list_sitemaps_enhanced - Provides enhanced sitemap information
  • submit_sitemap - Submits a new sitemap to Google
  • get_sitemap_details - Checks the status of a specific sitemap

Example Prompts

Here are some effective prompts you can use:

  • "List all my GSC properties and tell me which ones have the most pages indexed."
  • "Show me the top 20 search queries for mywebsite.com in the last 30 days, highlight any with CTR below 2%."
  • "Check these important pages for indexing issues: mywebsite.com/product, mywebsite.com/services"
  • "Compare my site's performance between January and February. What queries improved the most?"
  • "Analyze my mobile search performance for queries with high impressions but positions below 10."

Troubleshooting

Python Command Not Found

On macOS, create a Python alias:

sudo ln -s $(which python3) /usr/local/bin/python

Configuration Issues

  • Ensure all file paths in your configuration are correct and use full paths
  • Check that your service account has access to your GSC properties
  • Restart Claude Desktop after making configuration changes
  • Look for error messages in Claude's response

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "gscServer" '{"command":"/FULL/PATH/TO/-main/.venv/bin/python","args":["/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"],"env":{"GSC_OAUTH_CLIENT_SECRETS_FILE":"/FULL/PATH/TO/client_secrets.json"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "gscServer": {
            "command": "/FULL/PATH/TO/-main/.venv/bin/python",
            "args": [
                "/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"
            ],
            "env": {
                "GSC_OAUTH_CLIENT_SECRETS_FILE": "/FULL/PATH/TO/client_secrets.json"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "gscServer": {
            "command": "/FULL/PATH/TO/-main/.venv/bin/python",
            "args": [
                "/FULL/PATH/TO/mcp-gsc-main/gsc_server.py"
            ],
            "env": {
                "GSC_OAUTH_CLIENT_SECRETS_FILE": "/FULL/PATH/TO/client_secrets.json"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later