← All posts
August 13, 2026 · 11 min read · MCP • llms.txt • AI agents • Cursor • Claude Code

Connecting your docs to AI agents: MCP, llms.txt, and Markdown

For most of the web's history, documentation had one reader: a person with a browser. That's changing fast. The fastest-growing consumer of technical docs today is a coding agent — Cursor, Claude Code, ChatGPT — reading your pages mid-task to write code against your product. If your docs aren't built for that reader, you're invisible at the exact moment a developer is integrating you.

The reader changed. Most docs didn't.

When a developer asks their IDE's agent to "add Stripe-style webhooks using library X," the agent needs to know how library X actually works — its function signatures, its config, its error codes. It has three options: rely on whatever it memorized during training (often months stale), scrape your rendered HTML (slow, noisy, full of nav chrome), or query a surface you built for it. Only the third produces reliable code.

This isn't a fringe case anymore. Docs platforms that measure it report that a majority of their traffic now comes from agents rather than humans. The pageview is no longer the unit of documentation consumption; the tool call is. And an agent that can't get clean, current facts about your product will either hallucinate an answer or reach for a competitor whose docs it can read.

The three surfaces that make docs agent-readable

"Docs for agents" sounds abstract, but it comes down to three concrete, increasingly standard surfaces. None of them replaces your human-facing site — they sit alongside it.

1. Markdown content negotiation (the .md trick)

The simplest one: let any documentation URL return clean Markdown instead of HTML. The emerging convention is to append .md to the page URL — so /docs/guides/install has a machine copy at /docs/guides/install.md. Markdown is what language models are trained on and reason over best, and it strips the navigation, scripts, and styling that waste an agent's context window. One page of HTML can cost several times the tokens of the same page in Markdown.

2. llms.txt (the index for language models)

Borrowed from the spirit of robots.txt and sitemap.xml, llms.txt is a plain-text file at a well-known path that gives an LLM a curated map of your documentation: what the product is, and a linked list of its pages with one-line summaries. A companion llms-full.txt concatenates the whole corpus into a single file an agent can pull in one request. Together they answer the agent's first two questions — "what is this?" and "where do I look?" — without a crawl.

3. An MCP server (the queryable interface)

The Model Context Protocol (MCP) is the emerging open standard for connecting AI tools to external systems. An MCP server for your docs turns them into a set of tools an agent can call directly from inside Cursor, Claude Code, or ChatGPT — typically search_docs (find relevant sections), get_page (read one in full), and list_pages (see the table of contents). Instead of guessing or scraping, the agent asks your docs a question and gets a grounded answer, live, while it writes code. Connecting one is usually a single line — a URL added to the client's connector config.

The hard part isn't the plumbing — it's the trust

Here's the uncomfortable truth underneath all three surfaces: an agent cannot tell the difference between a doc that's correct and one that's confidently wrong. A human reading a stale page often senses something is off — the screenshot looks old, the version doesn't match. An agent has no such instinct. It treats whatever your MCP server returns as ground truth and writes code against it.

So the moment you expose your docs to agents, staleness stops being cosmetic and becomes actively dangerous. A renamed endpoint that a human would shrug off becomes a broken integration the agent generates with total confidence. The value of an agent-readable docs surface is capped by how true its contents are — and most documentation, written by hand and updated by memory, drifts from the code the day after it's published.

This is why "add an MCP server to your docs" is necessary but not sufficient. Bolting a machine interface onto hand-maintained prose just serves your drift faster and more authoritatively. The surfaces are only as good as the freshness guarantee behind them.

Docs that stay true by construction

The durable fix is to stop treating documentation as a hand-authored artifact that a person has to remember to update, and start treating it as something derived from the code — regenerated on every release, so it can't drift, and validated against the real system so what ships is what's true. When the source of truth is the code and the docs are a build output of it, an agent surface on top of those docs inherits the freshness for free.

That's the model Git2Docs is built on. It generates your documentation from your repository, keeps it in sync as the code changes, and validation-filters what it serves. Every published product automatically exposes all three agent surfaces — an MCP server, llms.txt, and .md on every page — so the content an agent reads is code-derived and current, not a snapshot someone last touched two releases ago. You don't configure any of it; if your docs are live, your agent surface is too.

The shift is already underway: your documentation is becoming an interface for machines as much as for people. The teams that win the integration are the ones whose docs an agent can both reach and trust.

Start free — 30 days on usSee the MCP launch →