home / mcp / gsc mcp server

GSC MCP Server

Provides access to Google Search Console data with enhanced analytics and filtering capabilities.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ahonn-mcp-server-gsc": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-gsc"
      ],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/credentials.json"
      }
    }
  }
}

This MCP server exposes Google Search Console data through a programmable interface, enabling you to retrieve performance metrics, apply advanced filters, and discover optimization opportunities for your site. It centralizes Search Console analytics, supports flexible date ranges, and provides rich dimensions to analyze how your site appears in search results across queries, pages, countries, devices, and appearances.

How to use

To use this MCP server with your client, start by running the local, standard input (stdio) MCP process and then connect your client to the running server. You will provide a service account credential file to authorize access to Google Search Console data. Once the server is running, your client can request search analytics data, apply filters, and enable quick wins detection to uncover optimization opportunities.

How to install

Prerequisites you need before installation:

  • Node.js 18 or later

You also require a Google Cloud project with the Search Console API enabled and a service account with access to the property data.

Install the MCP server package for Google Search Console using the package manager of your choice.

npm install mcp-server-gsc

Configuration and running the server

Prepare your Google Cloud credentials by creating a service account and downloading the JSON key file, which will be referenced by the server via an environment variable.

Run the MCP server locally using the explicit command shown in the usage example. The server runs as a standard input process and reads its configuration from an JSON structure you provide to your MCP client.

{
  "mcpServers": {
    "gsc": {
      "command": "npx",
      "args": ["-y", "mcp-server-gsc"],
      "env": {
        "GOOGLE_APPLICATION_CREDENTIALS": "/path/to/credentials.json"
      }
    }
  }
}

Examples of how to query data

Basic query example demonstrates retrieving performance data for a site over a defined date range with basic dimensions.

{
  "siteUrl": "https://example.com",
  "startDate": "2024-01-01",
  "endDate": "2024-01-31",
  "dimensions": "query,page",
  "rowLimit": 5000
}

Advanced filtering and quick wins

You can apply regex-based filters, specify devices and other criteria, and enable quick wins detection to surface optimization opportunities.

{
  "siteUrl": "https://example.com",
  "startDate": "2024-01-01",
  "endDate": "2024-01-31",
  "dimensions": "page,query",
  "queryFilter": "regex:(AI|machine learning|ML)",
  "filterOperator": "includingRegex",
  "deviceFilter": "MOBILE",
  "rowLimit": 10000
}

Quick Wins Detection configuration

Enable automatic detection of optimization opportunities and customize thresholds to fit your site’s data.

{
  "siteUrl": "https://example.com",
  "startDate": "2024-01-01",
  "endDate": "2024-01-31",
  "dimensions": "query,page",
  "detectQuickWins": true,
  "quickWinsConfig": {
    "positionRange": [4, 15],
    "minImpressions": 500,
    "minCtr": 2
  }
}

Available tools

search_analytics

Fetch comprehensive search performance data from Google Search Console with support for multiple dimensions, filters, and data state options.