home / mcp / google search console mcp server

Google Search Console MCP Server

Provides access to Google Search Console data via MCP tools for sites, sitemaps, analytics, and URL inspection.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "saurabhsharma2u-search-console-mcp": {
      "command": "npx",
      "args": [
        "search-console-mcp"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/your/service-account-key.json"
      }
    }
  }
}

You can enable an MCP server that provides AI agents with access to Google Search Console data. It exposes management of sites, sitemaps, analytics, URL inspection, and built-in AI documentation to make interactions with GSC data efficient and scalable through MCP-compatible clients.

How to use

You will run a microservice that speaks the MCP interface and connects to Google Search Console using the provided credentials. With an MCP client, you can list sites, add or remove sites, manage sitemaps, query performance data with filters and pagination, compare metrics across date ranges, fetch top queries and pages, and inspect URL indexing status. Use the prebuilt prompts to guide AI agents through common workflows, such as analyzing site performance over a period, finding content opportunities, or identifying pages that lose traffic.

How to install

Prerequisites: you need Node.js and npm installed on your machine. You will also configure Google Cloud credentials to access the Google Search Console API.

Option 1: Use with npx (recommended) — no installation needed.

npx search-console-mcp

Option 2: Global install

npm install -g search-console-mcp
search-console-mcp

Option 3: Clone for development and run from source

git clone https://github.com/saurabhsharma2u/search-console-mcp.git
cd search-console-mcp
npm install
npm run build
node dist/index.js

Google Cloud Setup

Follow these steps to enable API access and create credentials for the MCP server to use Google Search Console data.

Step 1 — Create a Google Cloud Project

- Open Google Cloud Console and create a new project or select an existing one.

- Enable the Google Search Console API: APIs & Services > Library > search for "Google Search Console API" > Enable.

Step 2 — Create a Service Account

- Go to APIs & Services > Credentials

- Click Create Credentials > Service Account and follow the prompts to create the account.

- Open the service account, go to Keys > Add Key > Create new key, choose JSON, and download the key file.

MCP Client Configuration

Configure your MCP client to provide the necessary credentials so the server can authenticate with Google Cloud.

Example credential approach (file-based for local development): set the path to your service account key.

Export the credentials path

export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/service-account-key.json"

Local Development

You can run and test the MCP server locally by cloning the project, installing dependencies, building, and running the server.

# Clone the repository
git clone https://github.com/saurabhsharma2u/search-console-mcp.git
cd search-console-mcp

# Install dependencies
npm install

# Create and edit environment configuration as needed
cp .env.example .env
# Edit .env with your credentials

# Build the project
npm run build

# Run tests
npm test

# Start the server
node dist/index.js

Project structure and key components

This MCP server is organized to separate concerns between API access, error handling, documentation for AI agents, and tool implementations.

Tools reference

The server implements a set of tools that AI agents can call to interact with Google Search Console data.

Resources

Built-in documentation and data resources are available for AI agents to read and use in workflows.

Prompts

Pre-configured analysis workflows help AI agents perform common analyses, such as evaluating site performance over a period, comparing periods, identifying declining pages, and discovering keyword opportunities.

Available tools

sites_list

List all configured sites for Google Search Console within the MCP context.

sites_add

Add a new site to be managed by the MCP server.

sites_delete

Remove a site from the MCP server.

sites_get

Retrieve details for a specific site.

sitemaps_list

List sitemaps for a given site.

sitemaps_get

Get details about a specific sitemap.

sitemaps_submit

Submit a new sitemap for a site.

sitemaps_delete

Delete a sitemap for a site.

analytics_query

Query search analytics with filters, dimensions, and pagination.

analytics_performance_summary

Get aggregate performance metrics for a number of days.

analytics_compare_periods

Compare two date ranges for a site.

analytics_top_queries

Retrieve top performing queries for a site.

analytics_top_pages

Retrieve top performing pages for a site.

inspection_inspect

Inspect indexing status for a specific URL.