Google Search Console MCP: Search Data for AI Agents

Why I built a Go MCP server for Search Console: four read-only tools, Docker setup, indexing reports, and the limits of search analytics.

12.09.2026 · 4 min read

When I investigate search traffic, the question is rarely just how many clicks a site received. I need to know which pages are gaining impressions, which queries lead to them, and what Google knows about a particular URL. Working with an AI assistant used to mean copying those reports out of Search Console. I built Google Search Console MCP so an agent can request the relevant slice directly.

It is an independent, open-source Go server. It calls the Google Search Console API and exposes results through Streamable HTTP. The server retrieves evidence. The agent interprets it. This is a community project, not an official Google product.

Four tools with a clear boundary

list_sites returns accessible properties and permissions. query_analytics retrieves clicks, impressions, CTR, and average position with dates, dimensions, filters, and paging. inspect_url exposes Google’s stored indexing information, including canonicals and crawl status. list_sitemaps returns sitemap processing information, errors, and warnings. All four tools are read-only.

An agent can discover the correct property, investigate a page, and inspect its indexing state without receiving broad control over the account. URL inspection reports what Google has recorded. It does not run a new live crawl when the tool is called.

Try the protocol before configuring Google

git clone https://github.com/tenqz/google-search-console-mcp.git
cd google-search-console-mcp
docker compose -f compose.demo.yml up -d --build
docker compose -f compose.demo.yml exec mcp /mcp-server --smoke http://127.0.0.1:8080/mcp

This demo uses clearly labelled synthetic data and makes no Google requests. Connect an MCP client to http://localhost:8080/mcp with Authorization: Bearer demo-token. The demo token is for this local configuration only. The smoke command discovers and calls all four tools, which checks more than whether an HTTP process is alive.

Connect a real Search Console property

Enable the Search Console API, create a service account, and grant its email access to the intended property. Store the JSON key at credentials/service-account.json with mode 600. Copy .env.example to .env and set a separate random MCP_AUTH_TOKEN. The repository contains the detailed Google setup procedure.

Stop the demo with docker compose -f compose.demo.yml down before starting the live service on the same port. On Linux, passing the operator’s UID and GID lets the container read the private key without making it world-readable:

export LOCAL_UID=$(id -u) LOCAL_GID=$(id -g)
docker compose up -d --build
docker compose exec mcp /mcp-server --smoke http://127.0.0.1:8080/mcp

The client uses the same /mcp path with your own bearer token. Use HTTPS for access from another machine. The Google key stays on the server. The MCP client needs access to the MCP endpoint, not the service-account JSON.

A useful question becomes a small workflow

For example: “Compare two completed seven-day periods. Find pages with impressions but few clicks, then show their queries and average positions. State the exact date ranges and do not calculate a change when coverage is incomplete.” This becomes a sequence of bounded tool calls rather than one large export pasted into a prompt.

The siteUrl argument identifies the property, such as sc-domain:example.com for a domain property. The page and query dimensions connect a URL to search terms. Include date when daily observations are needed. Response size and pagination should follow the question being investigated.

Data limitations remain part of the answer

Analytics dates use Pacific Time. Final data can lag behind the calendar. Google returns top rows and may omit anonymized queries, so completing pagination does not guarantee an exhaustive export. An empty response is not proof of zero demand. Average position is an aggregate, not a permanent ranking.

I preserve effective dates and freshness metadata with the response. A rise in clicks after editing a page is an observation, not proof that the edit caused it. Persistent history and scheduled collection belong in a separate application: this MCP server is an interface to a source, not a historical database.

Keep the sources distinct

I use it alongside Yandex Webmaster MCP and the ahref crawler. Google supplies search visibility, Yandex supplies its own reports, and ahref describes observed links. They become more useful together when every value retains its source and collection time.

Google Search Console MCP source code · How Model Context Protocol works

Oleg Patsay

Engineering Leader — AI, Architecture & Complex Systems

I design and evolve complex software systems, from architecture and engineering practice to AI-enabled development.

GitHub LinkedIn Telegram Contact

Let's make the complex understandable.

Architecture, engineering leadership, and AI in development — when the system is too important to simplify, and too expensive not to own.

LinkedIn Telegram Email