Why connect them at all
Day-to-day work in Search Console is mostly repeated pulls: open the interface, pick a date range, filter, export, and cross-reference in a spreadsheet against last month's export. The interface is great for one-off digging, and less good for questions that mix several cuts - like "which pages lost clicks this month even though impressions went up".
Connecting Claude Code to Search Console moves those questions into a conversation. You phrase the question in words, Claude pulls the data through the API, cross-references it and returns a table or a conclusion. It isn't magic and it doesn't replace thinking - it cuts the time to pull data from fifteen minutes to thirty seconds, and that's the difference between checking once a month and checking whenever you feel like it.
Who this is especially for
How the connection works under the hood
MCP - short for Model Context Protocol - is an open standard that lets external tools expose their capabilities to a model. An MCP server is just a small program running on your computer that announces a list of actions and knows how to perform them against an external service. Claude Code knows nothing about Search Console in advance; it only sees the list of actions the server exposes, and calls them as needed.
An important point for peace of mind: there's no third-party server in the middle. The credentials file sits on your disk, the server runs on your machine, and the only traffic leaving it goes from your computer to Google.
What to prepare first
- Claude Code installed and working in your terminal.
- Python 3.11 or newer. Version 3.10 and older will fail, sometimes silently - this is trap number one in this setup.
- A Google account with access to the property in Search Console. View access is enough for every pull; owner access is needed only for write actions such as submitting a sitemap.
- A Google Cloud project. You can create a new one for free in a minute; no credit card is needed to use the Search Console API.
Install uv
2 minutesuv is a fast package manager for Python. You need it because it comes with uvx, which runs Python tools in an isolated environment without installing anything globally - so the MCP server doesn't clash with anything else you have installed.
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/envpowershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"Check that the install worked. If the command returns a version number, you're good to go.
uv --versionEnable the API and create credentials
8 minutesTwo things happen here: you enable the Search Console API in your cloud project, then create the credentials that let the server talk to it on your behalf.
First - which kind of credentials
There are two ways, and the choice changes how much work you'll have later. In the vast majority of cases, OAuth is the right answer.
Enable the API
- Go to
console.cloud.google.comand pick an existing project or create a new one. - In the search bar at the top, type
Search Console API, open the result and clickEnable.
Create an OAuth client ID
Go to APIs & Services · Credentials, click Create credentials and choose OAuth client ID. The application type field is the critical one: choose Desktop app, because the code runs on your computer, not on a web server.
This file is a secret
~/.config/gsc/client_secrets.json, and on Windows an equivalent folder under your user profile.Connect the server to Claude Code
3 minutesNow add the server. Notice the structure of the command: everything before the -- is a flag for Claude Code itself, and everything after it is the command that runs the server.
claude mcp add --scope user -e GSC_OAUTH_CLIENT_SECRETS_FILE=/Users/me/.config/gsc/client_secrets.json gsc -- uvx mcp-search-console--scope usermakes the server available in all your projects, not just the current folder. Without this flag the default islocal, meaning this folder only.-esets an environment variable for the server. The path must be full and absolute - a relative path or~will make the server crash on startup.gscis the name you'll see later in/mcp. You can choose any name.
A silent trap in the flag order
-e. The flag swallows multiple values, so it will read the name as another KEY=value pair and return an error. In the command above, the server name comes after the variable's value, which is exactly the right order.If you went with a service account, these two environment variables replace the one above:
claude mcp add --scope user \
-e GSC_CREDENTIALS_PATH=/Users/me/.config/gsc/service_account.json \
-e GSC_SKIP_OAUTH=true \
gsc -- uvx mcp-search-consoleVerify the connection actually works
5 minutesFirst, check that the server loaded. This command shows a health status next to each connected server.
$ claude mcp list Checking MCP server health… gsc: uvx mcp-search-console - ✔ Connected
The first time you ask for data, a browser will open and ask you to approve access to your Google account. This happens once; after you approve, a token is saved and the connection stays active. Now for the real test - open claude and ask:
$ claude > List all the properties I have in Search Console ● gsc - list_properties sc-domain:example.com owner https://shop.example.com/ full
If the list comes back empty
What you can ask now
The server exposes around twenty actions, but you don't need to remember them. Phrase the question in plain language, and Claude picks the right action. The four capability families:
Good questions to start with
- "Compare the last 28 days with the previous period, and show me the ten pages that lost the most clicks."
- "Which queries rank in positions 11 to 20? Those are the closest opportunities for page one."
- "Take these five URLs and check for each one whether it's indexed, and when it was last crawled."
- "Which page got high impressions with an especially low CTR? That's probably a title or description problem."
The trick that doubles the value
Six traps that will cost you an hour
- 01
Python 3.10 or older
The server needs 3.11 at minimum, and the failure isn't always explicit. If the server won't start, this is the first thing to check: uv python list.
- 02
A relative path or ~ for the credentials file
The server runs as a separate process with its own working directory. Always use a full, absolute path, on Windows too.
- 03
A service account that wasn't added to the property
The most common reason for an empty property list. Go to Search Console, Settings, Users and permissions, and add the service account's email address.
- 04
The server name right after -e
The flag swallows multiple values and will read the name as an environment variable. Put the server name after the variable's value.
- 05
Domain property vs URL prefix
Two completely different properties with different numbers. sc-domain:example.com covers every subdomain and protocol; https://example.com/ covers only that exact prefix.
- 06
Comparing against yesterday's data
Google's most recent data isn't final and keeps updating for 2-3 days. For serious comparisons, end your date range three days before today.
FAQ
- Does this connection send my property's data to an outside server?
- No. The MCP server runs on your computer as a local process and talks directly to Google's API. The data that comes back enters your conversation with Claude, exactly like any other text you paste into the chat. There's no third-party server in between.
- Do I need a paid Search Console plan?
- There's no paid plan. Search Console and the Search Console API are free. What does exist are API rate limits, and in a single SEO person's normal work you won't hit them.
- Can I connect Google Analytics 4 too?
- Yes, it's a separate MCP server with its own credentials. The principle is the same: enable the API in the cloud, create credentials, and add the server with claude mcp add. It's worth connecting both only once Search Console is working smoothly.
- Why doesn't the data in the chat match what I see in the interface?
- Two common reasons: Google's freshest data isn't final and keeps updating for 2-3 days, and you need to make sure you're asking about the same kind of property - a Domain property and a URL prefix property are two different properties with different numbers.
- Does this replace SEO tools like Screaming Frog or Ahrefs?
- No. It gives you fast, natural-language access to data you already have in Search Console, and saves manual exports to spreadsheets. Backlink analysis, site crawling and competitor analysis stay in the dedicated tools.