For AI agents: the complete documentation index is at https://docs.routebase.dev/llms.txt. Every page is also available as Markdown by appending index.md to its URL or by sending Accept: text/markdown.

Connect your agent

Your AI agent can search and read these docs over MCP. The endpoint is read-only and needs no key.

MCP endpoint

https://docs.routebase.dev/mcp

Claude Code Run in a terminal

claude mcp add --transport http routebase-documentation https://docs.routebase.dev/mcp

Cursor Add to .cursor/mcp.json

{
  "mcpServers": {
    "routebase-documentation": {
      "url": "https://docs.routebase.dev/mcp"
    }
  }
}

VS Code Add to .vscode/mcp.json

{
  "servers": {
    "routebase-documentation": {
      "type": "http",
      "url": "https://docs.routebase.dev/mcp"
    }
  }
}

Codex Add to ~/.codex/config.toml

[mcp_servers.routebase-documentation]
url = "https://docs.routebase.dev/mcp"
Documentation

Publishing the Portal

Publishing has two layers. First a documentation version goes live inside Routebase, moving from Draft to Review to Published. Then the portal build turns that version into a static site your readers can reach. This guide covers taking a version live and everything around it, which means enabling the portal, controlling visibility, deploying and sharing.

The forward path runs from the Publish button in the documentation header, and it moves a version through review, publishes it, and deploys it to the portal. The guided publish flow below describes it. Everything else lives in Documentation Settings → Public Portal, which covers the portal address, portal features, retracting a version and taking the portal offline.

The video shows the whole path for a documentation set imported from an OpenAPI spec, from the first publish to the live portal.

Publish API documentation from an OpenAPI spec
Plays from YouTube when you click it.

Those settings are split across six tabs, and it is worth knowing which is which before hunting for a card:

Tab What lives there
Publish Portal Status, Portal Subdomain, Custom Domain, Publication (retract / unpublish), Deployed Versions, Build History
Appearance Theming through the theme editor, and Custom CSS. See Branding.
Features The reader-facing feature toggles and the Page actions menu
Advanced SEO and custom head/body scripts
Discovery The API index, its links, content signals, security.txt and governance files. See Telling catalogs and agents about your APIs.
Insights Agent Readiness, Portal Analytics and the Feedback Dashboard

Every tab except Publish stays hidden until the portal is enabled, showing "The portal is disabled. Enable it in the Publish panel to configure these settings." instead. One Save Changes button at the top of the page saves all of them together, and an amber hint appears while anything is unsaved.

The documentation header Publish button next to the version switcher, with the unpublished-changes dot

Enabling the portal

On the Publish tab, the Portal Status card has a Portal Enabled switch. It is described as "When enabled, your documentation is publicly accessible." Once enabled and published, the card shows your portal URL with an open-in-new-tab link and a copy button. It also shows the last build status as Completed, Failed or In Progress, with its page count and date.

The Public Portal settings on the Publish tab with the portal status, the subdomain and the custom domain

If the portal is built but has no public address yet, the card tells you to set a portal subdomain or connect a custom domain first.

Portal subdomain

The Portal Subdomain card, also on Publish, sets your portal's default public address:

  • The allowed characters are lowercase letters, numbers and single hyphens, in a name of 3 to 63 characters.
  • The name must be globally unique across Routebase.
  • Saving the subdomain requires the docs:manage-portal permission, which Admins and Owners have.

Once saved and published, your portal is reachable at that subdomain, and the resulting URL appears in the Portal Status card.

You can also serve the portal on a domain you own. The Custom Domain card directly below the subdomain walks you through DNS records, verification and SSL, then monitors DNS and SSL health once the domain is active. Custom domains are a Pro and Enterprise feature, and Custom Domains covers the full setup.

Version visibility

Only published versions that are marked Public can be built for the portal:

  • Internal keeps the version visible to your team inside Routebase only.
  • Public allows the version to be deployed to the public portal.

Making a version public is part of the guided publish flow's Deploy to portal step. Retracting a public version is the reverse, and it lives in the Publication card on Public Portal → Publish. Pick a published version and click Make Internal, which requires docs:manage-portal and removes the version from the portal. The confirmation warns "Visitors will no longer be able to access this version. You can make it public again at any time."

Previewing before you publish

The preview shows what publishing would ship, so it leaves out draft pages. To see a draft page in the portal layout, use View in portal in its page header.

The eye icon in the documentation header generates a real portal preview of the current version and opens it in a new tab, so you can sign off on content before publishing. If a fresh preview already exists it opens straight away, under the tooltip "Open portal preview". Otherwise clicking it renders one and shows the progress in a popover, under the tooltip "Generate portal preview". The preview trigger requires the docs:manage-portal permission.

Every preview gets a link of its own, so a new preview leaves the links you already shared working. A link stops working once its lifetime ends, and the preview's files are deleted along with it. You set the lifetime in the Preview links card on Public Portal → Advanced, where Links expire after offers 1 hour, 24 hours, 3 days or 7 days, with 24 hours as the default. A new lifetime applies to previews you create after saving. Search engines are told not to index a preview, because every page and file of it carries a noindex directive.

The guided publish flow

The Publish button in the documentation header opens a guided dialog titled "Publish v{N} to your portal", which walks the version through the whole pipeline in one place. A small pulsing dot on the button tells you at a glance whether the live portal is behind your latest edits. Its tooltip reads "Edited since last deploy", "Not deployed yet" or "Up to date".

The dialog lists the remaining steps as rows and runs the permitted ones in order when you click the action button:

Stage What it does
Submit for review Moves the version from draft into review.
Publish version / Approve and publish Locks the content (read-only) and archives the currently published version. The row is labelled Approve and publish when an approval workflow is required.
Deploy to portal Makes the version public and publishes your portal, enabling the portal first if needed. It takes one to two minutes.

Steps you lack permission for are shown but skipped, with a note saying why. Deploying needs the portal-management permission, for instance, and publishing needs the publisher permission. When an approval workflow applies, the dialog names the designated approvers. Once everything is live the dialog says "Everything is live and up to date." and offers an Open portal button.

When the version contains draft pages, the dialog names them, because publishing leaves them out of the portal, its search, its sitemap and the files described under Docs your readers' agents can read. A folder that holds nothing but draft pages stays out as well. If a page that will be published links to a draft page, the dialog lists that link too, because readers get a "not found" page there. The warning doesn't block the publish. It recognizes links written as a page slug and doesn't check absolute URLs.

A page that was already public disappears from the portal root with the next deploy after you mark it as a draft. Older versions keep their own /v{n}/ copy until you click Make Internal on them.

The guided publish dialog with the review, publish, and deploy stage rows

Deployed versions

Multiple versions can be live on the portal at once, such as v1 and v2 of your API docs. The Deployed Versions card lists each deployed version with its deploy date and page count:

  • Default marks the version readers land on. Use Set Default to switch.
  • Rebuild builds the default version again with the saved settings, so changed portal settings go live without a new version. It appears when the default version is published.
  • Undeploy removes a version from the portal. The last remaining default version cannot be undeployed.

Whether readers can switch between deployed versions is controlled by the Version History feature toggle described below. It carries a "Versions to show" limit, and older versions beyond that limit redirect to the current one.

Retracting and taking the portal offline

The Publication card on Public Portal → Publish handles the retract side. It describes itself as "Retract a published version, or take the whole portal offline." Alongside Make Internal above, its Unpublish button disables the public portal and removes all published files. The warning reads "Visitors will no longer be able to access your documentation. You can re-publish at any time."

Portal features

On the Features tab, the Features card toggles reader-facing functionality. Remember to click Save Changes at the top of the page afterwards.

The Features tab with the reader-facing toggles and the playground environment selection
Feature Description
Search Full-text search across documentation.
API Playground Interactive API request builder. When on, you can pick which project environments are exposed as selectable servers in the playground, and only those with a base URL qualify. See Where the base URLs come from.
Code Examples Auto-generated code snippets for endpoints.
Feedback Allow visitors to rate documentation pages.
Table of Contents Show a table of contents sidebar on pages.
Version History Show a version switcher and keep older versions browsable on the portal.
Keep API Reference in Sync Embedded specs follow every newly published spec version, also in a published documentation version. The portal shows the new version after its next build. The switch appears once the documentation embeds a spec.
Deprecation Info Show deprecation banners and migration guides for deprecated endpoints.
Show fully qualified schema names Show full schema names (including namespaces) on the portal instead of shortened ones.
Hide Routebase Branding Removes the "Built with routebase" link from the portal, and it requires the Pro plan.

A separate Page actions card on the same tab chooses which entries appear in the portal's "Copy page" menu. The entries are Copy page as Markdown, Download API files, Open in ChatGPT and Open in Claude. Download API files adds two downloads to API reference pages, the OpenAPI file and a Postman collection.

Which languages appear as tabs in the code examples is configured under Documentation Settings → General → Code Languages, which offers cURL, HTTPie, JavaScript, Python, C#, Go, Java, Ruby and PHP. The portal renders exactly the languages you select, or all of them if you select none. Changing the selection needs a new portal build to take effect.

Where the base URLs come from

The host your readers see in the code samples, and pick from in the playground's server dropdown, is resolved once at publish time, in this order:

  1. The environments you opted in. With the API Playground on, the environments you ticked under the toggle are exposed, in the order you selected them. Only their name and base URL ever leave Routebase, never their variables or auth configuration. An environment that was deleted, or that has no base URL, drops out silently.
  2. The environment that feeds the public docs. With no opt-in list, Routebase falls back to the project environment carrying the Feeds the public docs role, if it has a base URL. That role is docs-facing by definition, which is what makes it a safe default.
  3. The spec's own servers[]. If neither applies, the samples use the servers declared in the OpenAPI document.

Where a spec declares a base path, it is appended to the environment URL, unless the URL already ends in that path, so https://api.example.com/v3 does not become …/v3/v3.

Two consequences are worth planning around. The server dropdown lives inside the playground widget, so with the API Playground switched off there is no switcher at all and the code samples silently take the first entry of the resolved list. And if nothing resolves at all, meaning no opted-in environment, no docs-source environment and no servers[] in the spec, the samples render a literal {baseUrl} placeholder instead of a host.

Docs your readers' agents can read

Every portal build emits three machine-readable outputs alongside the HTML. They are not a feature you switch on, and a build that fails to produce them fails outright.

Path What it is
/llms.txt An index of the portal in the llms.txt convention. It carries the site title, the meta description as a blockquote, then two lists. Docs holds every content page with a link and a one-line description derived from its own text, while API Reference holds every generated endpoint, folder and spec page in navigation order.
/llms-full.txt The entire portal as one Markdown document, with every content page in reading order, snippets resolved, separated by rules. It suits an agent that would otherwise crawl page by page.
{slug}/index.md A Markdown twin of every page, served next to its HTML. Content pages emit the Markdown you wrote. API reference pages get generated Markdown for the endpoint, covering path, method, parameters, and request and response bodies with $refs resolved, so an endpoint page is readable as text too. Stacked folder and single-page references emit the concatenation of everything they show.

Image paths in llms-full.txt and in the .md twins are rewritten to absolute URLs, because those files get read far away from the page they belong to.

An agent doesn't need to know the index.md path. When it requests a page address such as /getting-started/ with the header Accept: text/markdown, the portal answers with the Markdown twin instead of the HTML:

curl -H "Accept: text/markdown" https://docs.example.com/getting-started/

Both answers carry Vary: Accept, so caches keep the two versions apart. A page without a twin answers with its HTML.

robots.txt points at both the sitemap and /llms.txt, so an agent that starts at the root finds them without being told. The Copy page as Markdown page action on the Features tab is a convenience link to the .md twin for human readers, so switching it off removes the menu entry rather than the file.

Connecting an agent over MCP

A published portal also answers at /mcp as an MCP server, so a reader can connect an AI agent to your docs without an account. The server reads the default version as the portal serves it, which keeps drafts and internal versions out of reach. It offers two read-only tools:

Tool What it does
search_docs Searches the published pages by keyword and returns each match with its slug, title, section, link and a snippet. Every word of the query has to appear in a page.
get_page Returns one page as Markdown, which includes the generated API reference pages. It takes a slug from search_docs, a site path or a page URL.

Readers find the endpoint on every page under Connect your agent in the page actions menu. It opens a dialog with the address and ready-to-copy setup for Claude Code, Cursor, VS Code and Codex. The menu item appears only while the endpoint is on, and it follows the switch below from the next portal build.

A reader adds the endpoint like any remote MCP server. In Claude Code, for example:

claude mcp add --transport http acme-docs https://docs.example.com/mcp

The endpoint is on by default. Switch it off with MCP endpoint in the Agent access card on the Features tab, where the card also shows the address to share once the portal has one. The endpoint goes off as well while the AI input content signal is set to Disallow, so the portal never offers its content to agents after declaring that it shouldn't feed AI answers. Each caller can send 60 requests a minute, and a portal accepts 600 a minute in total.

Telling catalogs and agents about your APIs

Every portal build publishes an index of the APIs in the portal, so API catalogs and agents find your specifications without crawling the pages. The Discovery tab in Documentation Settings → Public Portal decides what the index says beyond the specifications themselves.

Changing these settings requires docs:manage-portal. Click Save Changes at the top of the page, then rebuild or publish the portal, because the files change only with the next build.

What every build publishes

Every build emits these files, even before you fill in anything on the tab:

Path What it is
/apis.json, /apis.yml The API index in the APIs.json 0.24 format, as JSON and as YAML. It lists one API per published specification with its reference page and its OpenAPI file, plus its base URL where one is known.
/.well-known/apis.json The same index at the well-known address.
/.well-known/api-catalog A linkset as RFC 9727 describes it. It points to each API reference page, its OpenAPI file and the index. A HEAD request returns the catalog address in a Link header with the api-catalog relation.

To see what an agent sees, request the catalog of your portal:

curl -s https://docs.example.com/.well-known/api-catalog

API index

The API index card fills in what the index says about the portal as a whole:

Field What it does
Description What your APIs do and who they are for, in up to 2,000 characters. Left empty, the index uses the Meta Description from the Advanced tab.
Tags Keywords for the index. Type a tag and press Enter.
Publisher name The publisher the index and the governance files name. Left empty, it falls back to the site title.
Maintainer email The maintainer contact of the index.

A hint appears under a description shorter than 200 characters and under fewer than five tags, because catalogs rate fuller indexes higher.

The Links card adds pages the index points to, such as your sign-up page, pricing or status page. Click Add link, pick the type from the searchable list and enter the address, which has to be an absolute https:// URL. The portal links its own pages, the API reference and the OpenAPI files by itself, so they need no entry here.

Content signals

The Content signals card declares in robots.txt how automated systems may use the content of the portal. Each signal can be Not declared, Allow or Disallow:

  • Search covers building a search index and showing links with short excerpts.
  • AI input covers using the content as input to answers generated by AI.
  • AI training covers training or fine-tuning AI models.

Every declared signal goes into one Content-Signal line, and the API index gets a matching entry. A portal that allows search and AI input and leaves training open serves this:

User-agent: *
Content-Signal: search=yes, ai-input=yes

Signals left at Not declared stay out of the line, so a portal without a choice declares nothing. Setting AI input to Disallow also switches off the portal's MCP endpoint.

security.txt

The security.txt card tells security researchers how to report a vulnerability, following RFC 9116. The portal serves /.well-known/security.txt once at least one contact and an expiry date are set, and the API index lists it.

Field What it does
Contacts Up to five addresses, each a mailto:, tel: or https:// URL.
Expires on The date after which the file counts as outdated. It can be at most one year ahead.
Preferred languages The languages you accept reports in, such as en, de.
Policy URL The page that describes your disclosure policy.

Admins get a reminder 30 days before the expiry date, and the card shows a warning from that point on. To renew the file, choose a later date and publish the portal again.

Governance files

The Governance files card publishes the rules and conventions your API follows, so catalogs, tools and agents can read them. Every file stays off until you turn it on or add it, and it becomes public with the next build. The card needs a published API reference, because the files describe published APIs.

File Served at What it contains
API ruleset /governance/ruleset.yaml The project's Style Guide with its severities, in Spectral format. Include custom rules adds the custom rules of your organization that the format can express.
Vocabulary /governance/vocabulary.yaml The naming conventions from the active Style Guide rules, plus those you write under Edit conventions.
Conformance /governance/conformance.yaml The standards the portal backs with a published file. There is nothing to fill in.
OpenAPI overlays /api/{spec}/overlay.yaml Additions to one published specification that don't belong in the contract itself, such as hints for agents. The card shows how many of the overlay's targets match the specification.
Rate limits, Plans /governance/rate-limits.yaml, /governance/plans.json Files you write with Add file. Saving checks that every limit and every plan has its required fields.

The API index lists every file you publish, so a catalog that reads the index finds them too.

Checking agent readiness

The Agent Readiness card on the Insights tab scores how well AI agents can find and read your published portal. The score follows the Agent-Friendly Docs Spec, an open specification, and Routebase measures it with afdocs, the spec's reference checker.

Running a check requires docs:manage-portal. Agents with docs:read can read the latest result over MCP.

  1. Open Documentation Settings → Public Portal → Insights.
  2. Click Run check. The card names the address it is checking, and the run takes a few minutes, so you can leave the page in the meantime.
  3. Read the result once the score appears. The card shows the overall score out of 100 with its grade, the score of each category and every check that did not pass.

The check reads the portal at its public address, the same way an agent does, and samples up to 50 of its pages. Only a portal with a deployed default version and a public address can be checked. Each portal can be checked five times per day, and the card shows how many checks are left today. If a run does not finish, the card says why and keeps the previous result.

The Insights tab with the Agent Readiness card, its category scores and one content hint, above portal analytics

Reading the result

Every check that did not pass appears in one of two groups:

Group What it means
Fix in your content or settings The check depends on what you publish, and the card says what to change.
Handled by Routebase The portal build produces what the check reads. Publishing the portal again regenerates those files.

The checks your content or settings decide are these:

Check What to change
llms-txt-valid Set a Meta Description in the SEO card on the Advanced tab and publish again. It becomes the summary line of /llms.txt, and Open SEO settings on the card takes you to the field.
page-size-markdown, page-size-html Split long guides into several pages, and group large API specifications by tags so each tag gets its own page.
markdown-content-parity Write content that exists only as raw HTML or an embed as text, so the Markdown twin of the page carries it too.
markdown-link-portability Fix links that point to a page the portal does not serve, then publish again. Link other pages by their slug, for example /authentication/, because pages inside folders are served at that address too.
auth-gate-detection, auth-alternative-access Publish the versions agents should read as Public.

From an agent, manage_portal with the action check_agent_readiness starts a run, and get_portal_agent_readiness returns the latest result with the checks that did not pass.

SEO and custom scripts

On the Advanced tab:

  • SEO sets the Site Title, the Meta Description and an OG Image URL for search engines and social previews. The OG image has to be an absolute http or https URL, and it replaces the generated preview images described below.
  • Redirects sends old addresses to their new place, as described below.
  • Custom Scripts injects Head Scripts and Body Scripts into the portal HTML, which suits analytics or chat widgets.

Every published page gets its own preview image, which shows up when someone shares the page in a chat or on a social network. The image shows the page title, the section or parent page above it and the site title at the bottom, in your portal's colors and heading font. A long title wraps over up to three lines and is cut after that.

When you set an OG Image under Branding or an OG Image URL under SEO, that image replaces the generated ones on every page. A page whose title contains characters the heading font cannot draw uses the site image instead of a generated one. The images are created with each portal build, so a renamed page shows its new title after the next build.

Redirects

The Redirects card keeps old URLs working after you move your docs from another tool or restructure them. Each rule answers a path with a permanent redirect (301). A rule applies only to paths the portal doesn't serve, so it can never hide a page. Rules take effect within a minute of saving and need no new build.

  1. Click Add redirect.
  2. Enter the old path in the first field, such as /getting-started.html.
  3. Enter the target in the second field, either a site path such as /guides/getting-started/ or an absolute https:// URL.
  4. Click Save Changes.

A source that ends in /* is a prefix and covers every path below it. When its target ends in * as well, the rest of the path carries over:

From To /v1/docs/auth/tokens goes to
/v1/docs/* /* /auth/tokens
/v1/docs/* /archive/ /archive/
/v1/docs/* https://legacy.example.com/* https://legacy.example.com/auth/tokens

Paths match without regard to case or a trailing slash, and the query string of the request is kept. Rules apply in the order of the list, so put a specific rule above a prefix that would also cover it. A portal holds up to 200 rules, and a rule that points to its own source is rejected when you save.

Importing a list

When you move from another tool, you usually have the old URLs in a spreadsheet. Click Import CSV and choose a file with the old path in the first column and the target in the second. The file can use commas, semicolons or tabs, and a header row such as from,to is recognized and skipped. A full old URL such as https://old.example.com/guide/start.html is reduced to its path.

from,to
/guide/start.html,/getting-started/
https://old.example.com/v1/docs/*,/*

The imported rows go below your existing rules. A row whose source already has a rule is left out, and so is a row that would break one of the rules above. The card lists every skipped line with its reason. The import fills the form only, so click Save Changes to apply the rules.

Portal look and feel (themes, colors, fonts, logo, custom CSS) is covered in Branding.

Build history, feedback, and analytics

  • Build History on the Publish tab lists every build with its status, version, page count, size, duration and date. The status reads Success, In Progress, Pending or Failed, and View Log opens the full build log and any error message.
  • Portal Analytics on the Insights tab shows page views, unique visitors, search queries, page view trends, top pages, top search terms, and Content Gaps, which are search terms that returned no results.
  • Feedback Dashboard on the Insights tab appears when the Feedback feature is on. It shows total feedback, the positive rate, trends and recent comments from portal visitors. The toggle that switches feedback on stays with the other feature switches.
Build history table with a build log dialog open

Publishing from an AI agent

The publish path is available over the Routebase MCP server as well, which is how you would wire documentation into a release script. The chain is three calls after set_context:

  1. update_doc_page, or create_doc_page, writes the content into a mutable version, meaning Draft or In Review. It needs docs:write.
  2. publish_doc_version takes a version in Review live, archiving the previously published one. It needs docs:publish.
  3. trigger_portal_build renders and uploads the portal, and it returns the build status and its metrics. It needs docs:manage-portal.

get_portal_url returns the public address and the custom-domain setup status, and the portal-admin toolset covers builds, deployments, analytics and feedback if you want an agent to watch the result. The full tool list is in Documentation Overview.

Publishing straight from the API Designer

A spec release can carry the documentation along, so you don't have to publish it separately. Open the Release Version wizard via Publish v{n} in the API Designer's version switcher, which requires specs:publish. Versioning walks through the wizard step by step.

The documentation follows only a promotion into the environment that carries the Feeds the public docs role, which you assign under Environments. Freeze only and a promotion into any other environment leave the documentation untouched. On the wizard's Where to? step, pick Promote to {environment} for that environment, and the This will: panel lists the documentation steps the release runs:

  • Create the documentation portal and publish docs v1 (internal) appears when the project has no documentation yet.
  • Publish documentation v{n} (team-only) or (public) publishes the newest Draft or In Review version with the released spec, or clones the newest version into a new one first.
  • Build the public portal follows when that version is public and the portal is enabled.
  • Sync documentation v{n} — waits for approval before going live replaces the publish step when the documentation requires approval.

A release never changes how public your documentation is. It publishes at the visibility of the last released documentation version, so a new portal starts out internal. To take the documentation public, use the Deploy to portal step of the guided publish flow.

After you click Release to {environment}, the success screen shows a documentation row that turns into Documentation v{n} is live once the background release finishes. Because the documentation finishes in the background, you can close the dialog at any time. Once the spec is embedded, View documentation and Copy link appear, and a public portal adds Open public portal.