Published · 7 min read
Documentation analytics for developer docs
Docs analytics show traffic, searches, and AI visits, but not which pages broke when a release merged. Learn why developer docs teams need both views.
Published · 13 min read
Compare llms.txt and MCP for documentation discovery, retrieval, freshness, and access. Choose one or both, then test the published content clients receive.
A developer asks an assistant how to call your API. The assistant finds a page, copies an example, and uses a parameter you removed last month. A discovery file alone cannot repair an outdated example. First check which version the assistant read and whether the example still works.
Agent-readable documentation gives a client a way to find the right pages, read their content, and check the source behind an answer. When choosing llms.txt vs MCP, start with the client your readers actually use. A file offers a curated path into the docs. Model Context Protocol (MCP) offers a negotiated interface through which a compatible client can request information. You can provide both from the same published source.
If your immediate problem is stale examples, start with our guide to outdated API answers from coding assistants.
Use llms.txt when a client can fetch web content and benefits from a small, curated index. Add a documentation MCP server when your readers use compatible clients and need tools such as search and page reading. Neither option guarantees that a client will use it, retrieve the right version, cite your page, or answer correctly.
| Question | llms.txt | Documentation MCP server |
|---|---|---|
| What do you publish? | A Markdown overview with guidance and links | A server interface with advertised capabilities, such as search and read tools |
| What does the reader's client need? | A way to fetch and interpret the file and linked pages | MCP support, a server connection, and permission to use its tools |
| How does it find an answer? | The client selects and follows relevant links | The client discovers tool schemas, then makes supported calls |
| What stays current? | The served file and its linked content need updating | The server's backing pages, search index, and any caches need updating |
| What controls private content? | Access checks on the file and every linked format | Authorization enforced by the server and its backing sources |
| What must your team operate? | Generation or editorial upkeep, hosting, and link checks | A service, tool contracts, compatibility, access controls, and retrieval checks |
| What does success prove? | The client can find and read the intended pages | The client can obtain the intended content through the advertised operations |
The file side follows the llms.txt proposal. The tool side follows MCP's tool discovery and invocation contract. Search and page reading are examples of a documentation server's design, rather than tool names required by MCP.

Imagine a reader upgrading from API v1 to v2. The index can point them to the migration guide. A search tool can locate the section about a removed parameter. Either can still select a v1 example unless the version and applicability are clear. This is a suggested evaluation task, not a measured product result.
An MCP call happens when the client requests it, but the server may search an index built earlier. Likewise, fetching llms.txt now can return a cached file or a link to an old release. Check the source version and the returned passage through both routes. Treat missing source or revision information as unknown rather than assuming it is current.
The architecture below illustrates one possible implementation. The published source feeds both page output and a search index. Those generation steps can finish at different times. Other servers may read pages directly or use a different backend.

The llms.txt proposal describes a curated Markdown overview with links to useful resources. It helps clients that choose to read it understand your documentation. It is discovery and context guidance. It does not grant access, express crawler permissions, or replace authentication.
Put the file at /llms.txt, or use a scoped location such as /docs/llms.txt when appropriate. Link to real pages and explain which version they cover. This fictional example uses absolute URLs so the destinations remain clear when a client copies the text elsewhere.
# Acme API documentation
> Documentation for Acme API v2. Start with the quickstart.
> Use the migration guide when upgrading from v1.
## Guides
- [Quickstart](https://docs.example.com/v2/quickstart): A first request.
- [API reference](https://docs.example.com/v2/api): Parameters and responses.
- [Migration guide](https://docs.example.com/migrate-v1-v2): Breaking changes.
Keep the map short enough to review. Check that its links resolve and that the descriptions match the destination pages. Generate it from maintained sources when possible. Publishing it does not establish that a particular crawler uses it.
The proposal's August 2026 revision adds explicit discovery guidance: a page can advertise its Markdown alternative with rel="alternate" and its covering llms.txt with rel="describedby", through HTML links or HTTP headers. A file under a subpath covers that path, and the most specific file applies. Check your publishing system's actual output before assuming it provides these relations.
For Google Search, Google says it ignores llms.txt. Special AI files and Markdown are not required for its generative Search features. A page still needs to be indexed and eligible for a snippet. Meeting those requirements does not guarantee indexing or inclusion.
Use robots.txt for the preferences each provider documents. Training crawlers, search crawlers, and user-requested retrieval have different purposes.
| Provider | Training | Search | User-requested retrieval |
|---|---|---|---|
| OpenAI | GPTBot collects material that may be used for training | OAI-SearchBot supports ChatGPT search | ChatGPT-User handles certain user requests |
| Anthropic | ClaudeBot collects material that may contribute to training | Claude-SearchBot indexes content for search | Claude-User retrieves content for users |
| Perplexity | PerplexityBot is not a training crawler | PerplexityBot finds pages for search | Perplexity-User retrieves pages at a user's request |
These distinctions come from OpenAI, Anthropic, and Perplexity. Check their current documentation before changing policy.
For public documentation, this example allows the named search crawlers and declines the named training crawlers. Merge it with your existing rules and review the paths you intend to expose.
User-agent: OAI-SearchBot
Allow: /
User-agent: Claude-SearchBot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: GPTBot
Disallow: /
User-agent: ClaudeBot
Disallow: /
Allowing search crawling does not promise inclusion in an answer. OpenAI treats search and training settings independently. Anthropic says its three named bots honor robots.txt. OpenAI says robots.txt may not apply to ChatGPT-User requests, and Perplexity says Perplexity-User generally ignores it for user-requested fetches. Do not assume one rule controls every retrieval path.
Crawler preferences are not a security boundary. Protect private pages with authentication and enforce the same permissions on alternate formats and MCP tools. Check your CDN and firewall too. A robots rule cannot make a blocked request succeed, and a user agent string alone does not verify a crawler's identity. Use each provider's published verification guidance.
Start with HTML that contains the documentation people need. Add Markdown or JSON where your readers' tools support those formats. An Accept header only works when the server implements content negotiation. A ?format=md parameter is an application convention, not a universal capability.
Use this read-only check against the public Thally website, or replace the URLs with your own.
curl --fail --silent --show-error --location \
https://thally.io/llms.txt -o llms.txt
head -n 8 llms.txt
curl --fail --silent --show-error --location \
https://thally.io/blog/agent-ready-docs-llms-txt-mcp \
-o guide.html
The first response should be a readable index with a heading and links. The second should contain the guide's text. A successful status code alone is insufficient. A login page, error document, or empty application shell can also arrive with status 200. These two requests were rechecked on October 25, 2026.
If your server advertises Markdown, request the documented route or media type and inspect both the content type and body. Compare the API version, parameter names, response examples, warnings, and source links against the HTML page. Navigation and formatting can differ while the technical meaning stays the same.
Generate formats from one source where possible. Shared generation reduces opportunities for drift, but the source itself can still be wrong. Structured data should describe visible content accurately. JSON-LD does not establish that an assistant will retrieve or cite a page.
MCP lets compatible clients call a server's advertised tools. Tool names and argument shapes depend on the server. Discover them instead of assuming every docs endpoint implements the same contract.
The public Thally website exposes /api/mcp. The following read-only probe is specific to that endpoint: it returns JSON and does not require authentication or a session ID. Other servers can require authentication, sessions, or streaming response handling. Use a compatible client for those servers.
The MCP lifecycle starts with initialization, followed by an initialized notification. HTTP requests then carry the negotiated protocol version. The transport specification explains the response formats and session behavior a general client must support.
Save this as check_docs.py in a scratch directory and run python3 check_docs.py. It requires Python 3 and internet access, uses only the standard library, and writes its result to the terminal. It checks this website's tool list, searches for the article, and reads every returned chunk. It does not install an MCP server or connect an assistant.
import json
import urllib.request
endpoint = "https://thally.io/api/mcp"
version = None
request_id = 0
def rpc(method, params=None, notify=False):
global request_id
request_id += 1
payload = {"jsonrpc": "2.0", "method": method}
if not notify:
payload["id"] = request_id
if params is not None:
payload["params"] = params
headers = {"Content-Type": "application/json",
"Accept": "application/json, text/event-stream"}
if version:
headers["MCP-Protocol-Version"] = version
request = urllib.request.Request(
endpoint, json.dumps(payload).encode(), headers
)
with urllib.request.urlopen(request, timeout=30) as response:
if notify:
assert response.status == 202
return None
assert response.headers.get_content_type() == "application/json"
body = json.load(response)
if "error" in body:
raise RuntimeError(body["error"])
result = body["result"]
if result.get("isError"):
raise RuntimeError(result)
return result
init = rpc("initialize", {
"protocolVersion": "2025-11-25", "capabilities": {},
"clientInfo": {"name": "thally-docs-check", "version": "1.0.0"}
})
version = init["protocolVersion"]
assert version == "2025-11-25"
assert "tools" in init["capabilities"]
rpc("notifications/initialized", notify=True)
tools = rpc("tools/list", {})
required = {"search_pages", "read_page", "get_page_guide"}
assert required <= {tool["name"] for tool in tools["tools"]}
print("Tools:", ", ".join(tool["name"] for tool in tools["tools"]))
def call(name, arguments):
result = rpc("tools/call", {"name": name, "arguments": arguments})
return result["structuredContent"]
path = "/blog/agent-ready-docs-llms-txt-mcp"
search = call("search_pages", {"query": "agent-readable", "limit": 20})
assert any(page["path"] == path for page in search["results"])
call("get_page_guide", {"path": path})
offset = 0
chunks = []
while True:
page = call("read_page", {"path": path, "offset": offset, "limit": 4000})
chunks.append(page["content"])
next_offset = page["nextOffset"]
if next_offset is None:
break
assert next_offset > offset
offset = next_offset
print("Read", len(chunks), "chunks and", len("".join(chunks)), "characters")
print("Source:", page["url"])
On October 25, 2026, this probe negotiated 2025-11-25, listed list_pages, search_pages, read_page, and get_page_guide, found this article, and read it through nextOffset: null. The character count can change when the site changes. This checks retrieval of a published page, not the accuracy of an assistant's answer or a private documentation deployment.
If the request times out or returns an HTTP error, check connectivity and the endpoint before retrying. A protocol error, missing tool, different schema, or non-JSON response means this endpoint-specific probe no longer fits. Inspect discovery and the server's current documentation rather than treating the run as a pass. For your own Thally documentation site, follow the separate remote MCP setup guide. The marketing website and documentation sites expose different tool contracts.
Compare the retrieved passage with the HTML page and the version your reader needs. Our WebMCP guide explains the separate browser tool interface available on Thally documentation sites.
Choose a real reader task, such as upgrading a request after an API change. Save the prompt, product version, documentation revision, client, and date. Then check each layer independently.
| Check | Expected evidence | If it fails |
|---|---|---|
| Discovery | Index links point to the intended version | Repair missing or misleading links |
| Crawler policy | Named agents receive the intended rules | Review robots, CDN, and firewall behavior |
| Page content | HTML and advertised formats agree on API behavior | Fix the source or generation step |
| Retrieval | The client receives the relevant passage in full | Check search, pagination, and version selection |
| Example | The documented request and response assertions pass | Update the example and rerun it |
| Permissions | Restricted content remains restricted through every interface | Fix authorization before release |
A local contract test can catch a renamed parameter or changed response field. It does not prove that an AI assistant will answer correctly. To test an assistant, run the task in that client and save its answer, source passages, and executable result separately. Report failures as well as successes.
If both routes return the wrong behavior, use our documentation automation guide to evaluate maintenance separately from retrieval.
Start with one page your readers already use. Correct its example, make its version explicit, and test the retrieval path they use. If you are moving documentation between systems, use our migration checklist to check links, versions, and access before launch.
This guide follows the Thally editorial policy. The comparison, llms.txt revision, MCP contracts, and public endpoint examples were checked October 25, 2026. The crawler-policy section retains its October 18 verification boundary.
On October 26, 2026, we rechecked the public MCP example and clarified that WebMCP browser tools apply to Thally documentation sites.
Published under the Thally editorial policy. Technical conformance is defined in the agent-readiness methodology.
Create a managed site, or use the open-source engine to run Thally yourself.