---
title: "Your agent can't read docs. Give it an API."
url: "https://alex.zappa.dev/blog/your-agent-cant-read-docs"
description: "I shipped an MCP server for Zest after my own agent kept inventing config keys for my product. Docs are written for human eyes. Agents need a tool they can call."
---

This sat in my drafts folder since late August. I wrote the first version the week the MCP server shipped, then got buried in other projects and other ideas, and the half-finished draft kept sliding down the list. I finished it now. The argument is the same as the one I started making then, only better supported.

My AI agent has invented Zest features that don’t exist. Several of them. The awkward part is that if they did exist, I would be the one building them.

It goes like this. I ask the agent to add a cookie banner to a new project. It does not open my docs. It half-remembers the config schema from training data, writes a key nobody ever shipped, and hands it back with total confidence. I paste it. It breaks. Now I’m reading documentation. My own documentation.

The agent is not lazy. It is doing what it was built to do, and pages of prose are not the thing it was built to read.

## Why pasting docs doesn’t work

The options when your agent gets your product wrong are all bad.

You can hope the next model remembers better. It will, and then you will ship an update and it will be wrong again, in a new way. Models trail releases by months.

You can paste the docs into the chat yourself. Now you are the integration layer. You are reading the pages you hired the agent to read, and the agent still squints at them, because a docs page is built for eyes: prose, examples, quick-start callouts, links to other pages. An LLM does not skim any of that the way a person does. It guesses at what matters and fills the rest from memory.

Or you can give it a thing it is actually good at reading.

## The protocol

MCP is the Model Context Protocol, an open standard Anthropic released in late 2024. It gives AI agents a standard way to call external tools and data sources, the same way HTTP gave browsers a standard way to talk to servers.

Instead of text, you expose tools. A tool has a name, structured inputs, structured outputs. The agent discovers what is available, calls it, gets JSON back. No scraping pages, no guessing parameter names. One plug, and any MCP compatible client can use it.

Cursor, VS Code, and Windsurf picked the protocol up within months. It works wherever Claude works, and outside that world too, because the spec is open.

For anyone shipping a product with a config file, here is the interesting part: an MCP server is documentation an agent cannot misread.

## Four tools, one URL

Zest now has one, at [https://cookiezest.com/mcp](https://cookiezest.com/mcp). A small worker on Cloudflare running Hono. Four tools, read-only, stateless, no auth, no account.

`get_config_schema` returns the full JSON Schema for the Zest config. Every option, type, allowed value, default. The question “can I put the banner in the top right?” stops being a guess. It is a query with a definitive answer.

`get_api_reference` returns every public method on the Zest object with signatures and return types, plus the full event list. An agent wiring consent-gated analytics can look up `Zest.hasConsent('analytics')` and `Zest.on('zest:consent', callback)` instead of hoping it remembers the event names.

`generate_config` is the fun one. Tell it what you want in a sentence and you get a config object back. Only the options that differ from defaults, plus a script tag pinned to the current Zest version. Ready to paste.

`get_install_guide` is the one that kills the worst page on any product site: “how do I actually install this”. WordPress, Wix, Webflow, Shopify, Squarespace, Framer, GoDaddy. Each answer comes back with the method, the plan it needs, the ordered steps, and the snippet where the platform takes one. Ask without a platform and it lists what it covers.

The tools are not the only door. The same schema ships as plain JSON Schema inside the npm package, so an editor, a linter, or an agent that already understands JSON Schema can validate a Zest config without calling anything:

```
{ "$schema": "https://cdn.jsdelivr.net/npm/@freshjuice/zest/zest.config.schema.json" }
```

That is the file `get_config_schema` returns. An agent does not need prose, it needs a shape it can check itself against. JSON Schema and OpenAPI are that shape. Zest ships the first.

Because the server serves the schema for the current release, the version drift problem stops existing. A docs page can go stale the week after you publish it. The endpoint is the release.

## The model was never the variable

[In August I wrote](/blog/models-were-never-the-magic/) that the models were never the magic. The harness was. MCP is that thesis applied to products.

A great model in a bare harness loses to a decent model that can reach real tools, every time. My agent inventing Zest config keys was never a model problem. Point any of them at the schema endpoint and they all generate a correct config, because the correctness never had to live in the model. It lives in the product.

That is the shift. For years, integrating a product with an agent meant teaching the model about your API in prose and hoping the knowledge survives context. With MCP you ship the API itself as the interface and the model just calls it.

If your product has a config file, some agent somewhere is hallucinating it right now. Give it the endpoint.

## Try it

Connect your client and ask for what you need:

> I need a cookie banner for a German site. Dark theme, bottom right. Geo gating on, marketing category hidden.

The agent calls `generate_config` and hands you a working snippet. No pasting docs. No reading them. Any MCP client works: Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Hermes, anything that speaks the protocol.

```
claude mcp add --transport http zest https://cookiezest.com/mcp
```

Setup for every client is in the [full release post](https://cookiezest.com/blog/zest-mcp-server/), with [the docs](https://cookiezest.com/docs/mcp/) if you want the long version.

Docs are the interface for people. MCP is the interface for agents. Zest now has both.

May the 4th be with you,  
Alex

-   [PreviousThe models were never the magic](/blog/models-were-never-the-magic/)
-   [NextClaude got the gold beans. I'm still on bronze.](/blog/claude-got-the-gold-beans/)