Google Search Console is notoriously hard to analyse. It’s always full of false positives and it’s easy to miss an actually important issue. So I was genuinely excited to be able to connect it to my Claude Code. But there was no official MCP and the community MCPs I could find were either lacking functionality or I did not trust them enough to install them on my machine. So this is what I did instead to connect GSC to Claude Code and let it build its own small MCP.
The same method should work with Codex or any other AI agent:
Step 1: Enable the Search Console API
Open the Google Cloud Console and create a project using the selector in the top bar. Name it something you will recognise in a year, like “search-console-mcp”.
Then go to APIs and services → Library, search for Google Search Console API, and click Enable.

Step 2: Create a service account
A service account is a robot user with its own email address and a permanent key file. We pick this form of authentication because it works without a browser window and without a token that expires every week.
In APIs and services → Credentials, choose Create credentials → Service account.

Give it a name like “gsc-reader”. Google generates an email address from it, ending in .iam.gserviceaccount.com. Copy that address.

The wizard then offers to grant the account a role on the project. Skip it. Those roles control other Google Cloud resources, which does not apply to GSC.
Finishing the wizard drops you back on the Credentials page. Scroll to the Service accounts table at the bottom and click the account’s email address to open the account settings. You should see a page with tabs along the top: Details, Permissions, Keys, Metrics, Logs. Open Keys and choose Add key → Create new key → JSON → Create.

If Add key is greyed out, your account is on a Google Workspace organisation that blocks service account keys by policy, and you will need whoever administers it to allow them for this project.
The JSON file downloads. Move it out of your Downloads folder to somewhere safe; for use with Claude Code, that would be ~/.config/gsc/gsc-key.json. Keep this file private, because anyone holding it could read your Search Console data.
Step 3: Add the email to your property
Now you will need to switch to Search Console, navigate to Settings → Users and permissions, which offers an Add user button. Click that button, then pick Full in the permissions dropdown.

Step 4: Let Claude Code build the connection
Claude Code talks to outside systems through MCP servers, which are small programs that expose a set of tools it can call. For Search Console, that is around a hundred lines of Node.js.
You do not have to write them, nor download them from anywhere. Just give Claude Code this prompt, with your own property address substituted:
Build an MCP server for the Google Search Console API and register it with Claude Code.
- Auth: service account key at ~/.config/gsc/gsc-key.json
- Scope: https://www.googleapis.com/auth/webmasters.readonly
- My property is https://example.com/ (URL prefix)
- Tools: list the properties the account can see; clicks, impressions, CTR and
average position per page over the last N days; index coverage status for a
list of URLs via the URL Inspection API
- Pace the inspection calls to stay under 600 per minute
- Turn 401, 403 and 404 errors into a sentence naming the likely fix rather
than a stack trace
- Install it in ~/.local/share/gsc-mcp/ and register it at user scope with
claude mcp add
Two important details:
- The
.readonlyscope produces a connection that physically cannot change anything on your property, which is what most people want. - And the property address has to match Google exactly, including the trailing slash, or
sc-domain:example.comif you have a domain property rather than a URL prefix.
When it finishes, restart Claude Code and run /mcp. The server should be listed as connected.

Keep in mind that data runs two or three days behind, both in the API and in the regular interface. URL inspection is capped at 2,000 URLs per day, which is plenty for a normal site and easy to burn through by looping over a large sitemap.
Sources:
- Search Console API prerequisites and authorising requests (Google for Developers)
- The URL Inspection API announcement (Google Search Central)
- Managing owners, users and permissions (Search Console Help)





