Stay up to date with AI tools, model releases, and developer workflows that matter.
In a recent development, weekly. Free. One click to leave.
7 Day Free Trial. Cancel Anytime.
SEO data usually lives in separate places: a crawler, Search Console, analytics, and server logs that only a developer can reach. Answering a question such as "which URLs did Googlebot request last week, and how many returned errors?" means exporting, joining and checking. The Model Context Protocol (MCP) offers another route: expose the data as tools that an AI assistant can call, so it answers from the source instead of from memory.
This tutorial builds a small, read-only MCP server in Python that summarizes Googlebot activity in an access log. It verifies the requests against Google's published IP ranges, returns only aggregates and warns when the numbers could mislead. It then indicates how to connect the server to a client, how to extend it safely, and when a hosted server from an SEO platform may be the better choice. All code was run with Python 3.13 and mcp 2.3.0, and the tests pass.
Sources indicate that developers are already using AI tools, but they do not fully trust them. The Stack Overflow Developer Survey 2025 reports that 84% of respondents use or proposal to use AI tools, and that more developers actively distrust the accuracy of AI tools (46%) than trust it (33%). It also describes AI agents as not yet mainstream: 14.1% of respondents use them daily and 37.9% do not plan to use them.
According to recent reports, that mix suggests a design goal. People want the speed of an assistant without unsupported claims, and connecting it to a data source gives it something concrete to work from and something you can check. It does not make the assistant correct, so the server design below puts as many checks as possible into the tools themselves.
The MCP architecture overview describes three participants. A host is the AI application, a client is the component inside it that holds a connection, and a server is the program that provides context. Servers can expose tools (functions the AI can call), resources (data) and prompts (templates). The two transports are stdio, for local servers that usually serve one client, and Streamable HTTP, for remote servers that can serve many.
This tutorial uses one tool over stdio, which is the simplest setup to build and test. The same server logic can be hosted remotely later.
It has been revealed that google's guide to verifying Googlebot describes two methods: a reverse DNS lookup followed by a forward lookup, or matching the request IP against published JSON range files in CIDR format. The code below uses the second method because it works offline and is easy to test. Download the current range file (for example googlebot.json, which has a prefixes list with ipv4Prefix or ipv6Prefix entries) and refresh it periodically, because the ranges change.
The helper module parses combined-format log lines, builds network objects from the range file and aggregates only the requests that claim to be Googlebot. It reports verified and unverified counts separately and adds a warning when they differ or when lines could not be parsed.
Recent findings suggest that the server file wires the helper into a tool. It is read-only, caps how many rows one call can return, and never returns raw log lines. The type hints and docstring become the tool schema and description that the client reveals to the model, so write them as if a colleague will read them.
Note that mcp 2.x renamed FastMCP to MCPServer. If you use the 1.x SDK, the import and constructor differ, so check the SDK documentation for the version you install.
Industry observers note that the tests cover parsing, IP matching (including IPv6 and an address outside a range), the aggregates, warnings, the absence of raw IPs in the output, and an end-to-end call through the MCP client API. Verified requests exclude a fake Googlebot from a non-Google IP, so its 404 does not appear in the top 404 list.
Save the three files together, install the SDK with pip install mcp, and run the tests with Python 3. In our run, python3 test_seo_logs.py printed all tests passed. We also ran the server over stdio with a real client connection and received the summary.
A local stdio server is started by the client. In Claude Desktop, according to the MCP project's guide to local servers, you open Settings, choose the Developer tab, select Edit Config and add an entry under mcpServers with a command and args, using absolute paths, then restart the app. For this server the entry would look like this, with your own paths:.
Other clients have their own settings screens or commands, and some only connect to remote servers, which means hosting the server over Streamable HTTP with authentication. Check each client's documentation for what it supports and for the approval prompts it shows before tool calls. Once connected, start with a question that exercises the tool, such as "Summarize Googlebot activity in the log and tell me what the 404s have in common," then check the answer against the log.
Building your own server makes sense when the data is yours, such as server logs, or when you need control over what is exposed. Several SEO platforms also host MCP servers so you do not have to build one. For example, JetOctopusβs SEO MCP offers a server that, according to its documentation, connects AI clients to crawl data, server logs, Search Console and Google Analytics 4. Evaluate any hosted server on the same points as your own: which data sources it covers, whether actions with side effects ask for confirmation, what it logs, whether its answers link back to the underlying data and what your blueprint allows. The Stack Overflow figures above are a reminder to check an assistant's output against the source either way.
According to recent reports, no. A local stdio server like the one above works with clients that support local servers. Hosted servers are convenient when a vendor already covers the data sources you need.
Not as written. The only tool reads a log file and returns aggregates. Add write actions only deliberately, as separate tools with confirmation.
Any client can send a Googlebot user agent. Matching the IP against Google's published ranges keeps fake traffic out of the numbers that matter.
Recent findings suggest that treat them as claims to check. Surveys such as Stack Overflow's show that many developers distrust AI accuracy, so keep the source data one click away.
According to recent reports, MCP turns SEO data into something an assistant can query, but the value depends on the design of the server. A small read-only tool that verifies bots, aggregates results and reports its own caveats is more useful than a broad one that returns everything. Start with one tool and tests, connect it to a client, check its answers against the source and expand only when each new tool has its own safeguards.
7 Day Free Trial. Cancel Anytime.
