Use a Published API Document with AI Agents
A published document is a web page for people. For coding agents such as Claude Code or Cursor, every published version also answers in formats they read directly. Nothing extra has to be published: the same version, the same commit, the same access rules.
What an agent can read
| Output | What it is |
|---|---|
llms.txt | An index of the version: its pages and, for each API spec, one line per operation with a link |
llms-full.txt | Every page and operation in one file (up to 2 MB) |
| Markdown pages | Each page, each operation and each schema as plain Markdown |
| Bundled OpenAPI file | One JSON or YAML file per spec, with references to other files resolved |
| Skill | A SKILL.md describing the API: servers, authentication and where the rest is |
| MCP server | A read-only Model Context Protocol endpoint with five tools |
The MCP server gives an agent the document in small pieces instead of one large file:
| Tool | Returns |
|---|---|
search | Operations, schemas and pages matching keywords |
get_outline | Files, operations and schema names, without bodies |
get_operation | One operation: parameters, request body, responses, examples |
get_schema | One schema with its fields |
get_spec | A whole bundled OpenAPI file (up to 200 KB) |
Find the addresses
Open the published document and click the arrow beside Copy page, at the top right of a page (next to the title of a Markdown page or of an API reference):
- Copy MCP server URL for any MCP client
- Copy Claude Code command for a ready
claude mcp addline - View as Markdown: the page as an agent reads it
- Open llms.txt

The same menu has the actions for a person: Copy page copies the page as Markdown (or, on an API reference, the OpenAPI document with its references resolved), Open in ChatGPT and Open in Claude start a chat about the page, and on an API reference Download OpenAPI file saves the file.
From the command line, apigit doc view <version> prints the same addresses under agent.
Connect an agent
Claude Code
Paste the copied command into a terminal:
claude mcp add --transport http petstore https://app.apigit.com/api/v1/published/acme/petstore/mcpOther MCP clients
Add the copied URL as a remote (HTTP) MCP server. No extra configuration is needed for a public document.
Without MCP
Give the agent the llms.txt address. It lists every page and operation with a link to its Markdown.
Who can read what
An agent sees exactly what the caller could open in the viewer:
- A public version is readable by anyone, with no sign-in.
- A member-only or external viewer version needs a personal access token of someone who can open it, sent as
Authorization: token <your token>. - A version reached through a share link is not served to agents. Share links are for people.
A version the caller cannot open looks the same as one that does not exist.
See how much agents read
The list of published versions under Publishes → API Document shows Agent requests (30 days) with a count per version, once agents have read one.
For an agent that should work with your whole account (repositories, pull requests, mock servers), connect the APIGit MCP server instead.
Turn it off
Agent access is on for every repository. To turn it off, open the repository’s Publishes → API Document → Setting and switch off Readable by AI agents. The published pages keep working for people; the agent addresses then answer “not found”.
Limits
- 600 requests a minute and 20,000 a day per client address, across the published document and its agent addresses.
- MCP results are sized for agents: a result is at most about 10,000 tokens, and long ones end with a line saying they were cut.
- An OpenAPI file over 10 MB is not rendered.
On a custom domain
On your custom domain the same addresses work under https://your-domain/api/v1/published/…, and the Copy page menu shows them with your domain.
Short addresses such as https://your-domain/llms.txt and https://your-domain/mcp are being rolled out. Use the addresses from the Copy page menu until then.