How to Set Up Claude Desktop with Google Search Console MCP

How to Set Up Claude Desktop with Google Search Console MCP
Google Search Console MCP Server (https://github.com/ahonn/mcp-server-gsc)

Claude Desktop's ability to support access to API services using Model Context Protocol (MCP) is impressive stuff. You can actually get Claude connected to the Search Console API and query it to answer your questions. I think that's worth a deep dive.

While this solution really isn't appropriate at enterprise scale, it's still very impressive and a massive timesaver for quick queries and health checks.

In this guide, I'll walk you through setting up Claude Desktop with Google Search Console integration, allowing Claude to access your website's search performance data and provide SEO insights from simple prompts.

The outcome, you can ask cool questions like:

I'm interested in the last 28 days of page performance data compared to the previous 28 days. I'd like you to identify any pages that seem to have lost or gained more than 100 clicks in that period.

What is MCP and Why Should You Care?

Model Context Protocol (MCP) is a framework that allows AI models like Claude to interact with external tools and data sources. By connecting Claude to Google Search Console, you can ask questions about your site's search performance.

Prerequisites

Before we begin, make sure you have:

  1. The latest version of Claude Desktop installed
  2. A Google Search Console account with at least one verified property
  3. Access to Google Cloud Platform (here)
  4. Windows (though the process is similar for Mac/Linux)

Step 1: Install Node.js on Windows

Nodejs.org
Nodejs.org

To get this working, we're going to need to install the MCP package with NPM (Node Package Manager), which means installing Node. If you haven't installed it already:

  1. Visit nodejs.org
  2. Download the LTS (Long Term Support) version
  3. Run the installer and follow the prompts
  4. Accept the default options if you're unsure

Once installed, verify by opening Command Prompt and typing:

node --version

You should see the version number displayed.

Node version v22.14.0
Node version v22.14.0

Node.js automatically includes npm (Node Package Manager), which we'll use to install the Search Console integration. Verify npm is installed by typing:

npm --version

Step 2: Enable the Search Console API in Google Cloud

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. In the navigation menu, go to "APIs & Services" > "Library"
  4. Search for "Search Console API" and select it
  5. Click "Enable" to activate the API for your project
Enable Search Console API

Step 3: Create a Service Account

  1. In Google Cloud Console, navigate to "IAM & Admin" > "Service Accounts"
  2. Click "Create Service Account"
  3. Enter a name and description for your service account
  4. Click "Create and Continue"
  5. You can skip assigning roles for now (we'll grant access directly in Search Console)
  6. Click "Done"
Create a service account at IAM and admin > Service accounts

Note the "Service accounts" navigation link in the left-hand nav.

Step 4: Generate Service Account Credentials

  1. From the Service Accounts list, find your newly created account
  2. Click the three dots (⋮) menu and select "Manage keys"
  3. Click "Add Key" > "Create new key"
  4. Select "JSON" as the key type
  5. Click "Create" to download the JSON file
  6. Store this file very securely - it contains sensitive credentials
Create a JSON key
Create a JSON key

Step 5: Grant Access in Google Search Console

  1. Open Google Search Console
  2. Select the property you want Claude to access
  3. Click on "Settings" (gear icon) > "Users and permissions"
  4. Click "Add User"
  5. Enter the service account email address (it looks like name@project-id.iam.gserviceaccount.com)
  6. Set permission level to "Owner" or "Full User" (depending on what access you want Claude to have)
  7. Click "Add"
Add your service account name as a user
Add your service account name as a user (heavily redacted!)

Step 6: Install the Search Console MCP Package

  1. Open Command Prompt
  2. Wait for the installation to complete

Install the package by running:

npm install -g mcp-server-gsc
If you have Node installed run: npm install -g mcp-server-gsc
If you have Node installed, run npm install—g mcp-server-gsc (yes, I updated Node immediately after!).

Step 7: Configure Claude Desktop

  1. Open Claude Desktop
  2. Go File > Settings
  3. Select the Developer tab in the pop-up dialogue
  4. Click "Edit Config"
  5. Open the claude_desktop_config.json file with your text editor of choice
  6. Important: Use forward slashes in the path, even on Windows!
  7. Save the changes
  8. Restart Claude Desktop completely

Here's the JSON for the Search Console MCP - note you'll need the full file path to the JSON access key for the Search Console API:

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

That's it! Don't forget to restart Claude Desktop. It seems to take a tiny bit longer to start when it's loading an MCP config.

Step 8: Test your Integration

Claude should be able to access your Search Console data. Try asking Claude:

Please use the search_analytics tool with the following parameters:
{
  "siteUrl": "https://yourdomain.com", 
  "startDate": "2025-04-18",
  "endDate": "2025-05-18",
  "dimensions": "query",
  "type": "web",
  "rowLimit": 10
}

Show me the top 10 search queries for my website.

If everything is set up correctly, Claude should return a list of your top search queries.

Useful Prompts for Search Console MCP

If you can describe what you want, you can write a prompt, so I'm not sure I need to go particularly far with this section.

Firstly, here's a useful prompt to test that your MCP is set up correctly:

Test with a simple list_sites query before you get started:

Please use the list_sites tool to show me all websites I have access to in Google Search Console.

If that works, it works!

1. Identify Top Performing Queries

Please use the search_analytics tool with the following parameters:
{
  "siteUrl": "https://yourdomain.com", 
  "startDate": "2025-04-18",
  "endDate": "2025-05-18",
  "dimensions": "query",
  "type": "web",
  "rowLimit": 10
}

Show me the top 10 search queries for my website by clicks, and provide insights on what content I should create to capitalise on these trends.

2. Identify Underperforming Pages with High Impressions

Please use the search_analytics tool with the following parameters:
{
  "siteUrl": "https://yourdomain.com", 
  "startDate": "2025-03-18",
  "endDate": "2025-05-18",
  "dimensions": "page",
  "type": "web",
  "rowLimit": 20
}

Identify pages with high impressions but low CTR (under 2%). Suggest ways I could improve these pages to increase their click-through rates.

3. Mobile vs Desktop Performance Analysis

Please use the search_analytics tool twice, once for mobile and once for desktop:

First query:
{
  "siteUrl": "https://yourdomain.com", 
  "startDate": "2025-04-18",
  "endDate": "2025-05-18",
  "dimensions": "device",
  "type": "web",
  "rowLimit": 10
}

Second query (after seeing the first results):
{
  "siteUrl": "https://yourdomain.com", 
  "startDate": "2025-04-18",
  "endDate": "2025-05-18",
  "dimensions": "page,device",
  "type": "web",
  "rowLimit": 20
}

Compare my site's performance on mobile versus desktop. Identify any pages that perform significantly worse on mobile and suggest optimisation strategies.

4. Keyword Cannibalisation Check

Please use the search_analytics tool with the following parameters:
{
  "siteUrl": "https://yourdomain.com", 
  "startDate": "2025-04-01",
  "endDate": "2025-05-18",
  "dimensions": "query,page",
  "type": "web",
  "rowLimit": 50
}

Analyse the results to identify any instances of keyword cannibalisation, where multiple pages on my site are competing for the same search terms. Recommend how I should consolidate or differentiate these pages.

5. Sitemap Health Check

Please use the list_sitemaps tool to check my sitemaps:
{
  "siteUrl": "https://yourdomain.com"
}

Then, analyse the results to tell me if there are any issues with my sitemaps. Are they being properly indexed? When were they last submitted? Do we see any errors I should address?

And that's about it! In my opinion, this is a very small step towards something much bigger. I've been working heavily with automation for stuff like this, reporting, and site monitoring. Working with API services via MCP or on platforms like N8N is the future of where we're headed. But, don't think of it as particularly special - think of this stuff as a prerequisite, much like Excel. That's my opinion at least.

Enjoy!