Skip to Content
API DocumentAI Agents

Use a Published API Document with AI Agents

Published versions expose OpenAPI specs, AsyncAPI documents, GraphQL schemas and Markdown guides in formats coding agents can read directly. They use the same version, commit and access rules as the documentation site.

OpenAPI has individual operation and schema pages. AsyncAPI and GraphQL each have one generated Markdown page per file, included in the version’s index and document MCP search. See AsyncAPI and GraphQL pages for that page-level scope.

What an agent can read

OutputWhat it is
llms.txtGuides, generated AsyncAPI/GraphQL pages and one line per OpenAPI operation with a link
llms-full.txtEvery page and operation in one file (up to 2 MB)
Markdown pagesGuides, a generated page per AsyncAPI/GraphQL file, and separate OpenAPI operation/schema pages
Bundled OpenAPI fileOne JSON or YAML file per spec, with references to other files resolved
SkillA SKILL.md describing the API: servers, authentication and where the rest is
MCP serverA 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:

ToolReturns
searchOperations, schemas and pages matching keywords
get_outlineDocument pages, plus OpenAPI operations and schema names, without bodies
get_operationOne OpenAPI operation: parameters, request body, responses, examples
get_schemaOne OpenAPI schema with its fields
get_specA whole bundled OpenAPI file (up to 200 KB)

Find the addresses

Open a guide or an OpenAPI, AsyncAPI or GraphQL reference in the published document and click the arrow beside Copy page near the title:

  • Copy MCP server URL for any MCP client
  • Copy Claude Code command for a ready claude mcp add line
  • View as Markdown: the page as an agent reads it
  • Open llms.txt

The Copy page menu of a published API reference

The same menu has the actions for a person: Copy page copies a guide as Markdown, or an API reference in its own format. OpenAPI and AsyncAPI copies have references resolved; GraphQL stays SDL. Open in ChatGPT and Open in Claude start a chat about the page. The download item names the format of the original 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/mcp

Other 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.

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 Publish Center → API documents → Site Settings, then the Access panel, 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 document also answers at short addresses:

AddressWhat
https://your-domain/llms.txt and /llms-full.txtThe index and the full text of the default version
https://your-domain/{version}/llms.txtThe same for one version
https://your-domain/skill.md and /{version}/skill.mdThe Skill
https://your-domain/mcpThe MCP server
Any page, requested with Accept: text/markdownThat page as Markdown

llms.txt on your domain lists these addresses. The longer https://your-domain/api/v1/published/… addresses from the Copy page menu keep working.

AsyncAPI and GraphQL pages

Each AsyncAPI document and GraphQL schema has one generated Markdown page per file, available from the same published version as the browser reference.

FormatWhat the generated page contains
AsyncAPI 2.x and 3.xAPI information, servers, channels, operations, messages and payload fields, with local references followed
GraphQL SDLRoot queries, mutations and subscriptions, type and field summaries, descriptions and the schema source

These files appear under Pages in llms.txt with their format indicated. Their generated content is included in llms-full.txt and document MCP search; get_outline lists them as pages. They are also listed as pages by the account MCP list_spec_files tool.

Use Copy page → View as Markdown on either format to open its generated page. On a public document, Open in ChatGPT and Open in Claude can pass that address to the assistant. The same access rules apply as for the rest of the published version.

This page-level support does not add separate channel, message, GraphQL operation or GraphQL type endpoints. get_operation, get_schema, bundled-spec downloads through the agent API and the Skill’s operation list remain OpenAPI-only. A GraphQL source-file download remains SDL; it is not an introspection or OpenAPI bundle.

See the format comparison and the release article.

Last updated on