Index of every page on this site: llms.txt

RFC 9727 defines a standard API discovery endpoint and api-catalog link relation. Use it to list your API endpoints and their documentation.

When MCP Toolkit runs on the server and site.url is set, Nuxt AI Ready adds its endpoint automatically. The entry also links its server card when enabled. Set apiCatalog: false to disable the catalog.

nuxt.config.ts
export default defineNuxtConfig({
  site: {
    url: 'https://example.com',
  },
  aiReady: {
    apiCatalog: {
      entries: [
        {
          anchor: '/api/v1',
          serviceDesc: {
            href: '/openapi.json',
            type: 'application/vnd.oai.openapi+json;version=3.1',
          },
          serviceDoc: {
            href: '/docs/api',
            type: 'text/html',
          },
          status: {
            href: '/api/health',
            type: 'application/json',
          },
        },
      ],
    },
  },
})

With this configuration, the module:

  • Serves GET /.well-known/api-catalog as application/linkset+json with the RFC 9727 profile
  • Serves the same discovery headers for HEAD /.well-known/api-catalog, without a response body
  • Adds Link: <...>; rel="api-catalog" to page responses
  • Prerenders the catalog when the deployment prerenders routes

Relative anchor and href values resolve against the deployed site URL. With app.baseURL: '/docs/', /api resolves to https://example.com/docs/api. Nuxt redirects origin-root discovery requests to the handler under that base path. Absolute URLs stay unchanged, including URLs on other origins.

Entries and Relations

Use anchor for the API endpoint or link context. Add at least one relation target. Each relation accepts one target object or an array of targets.

OptionLinkset relationUse
itemitemAPI endpoint belonging to the catalog
serviceDescservice-descMachine-readable description, commonly OpenAPI
serviceDocservice-docHuman-readable documentation
serviceMetaservice-metaPolicies, licensing, or other metadata
statusstatusHealth or service status
apiCatalogapi-catalogNested catalog

Targets support href, type, title, hreflang, and media. Add registered relation tokens or absolute extension relation URIs through relations. anchor is reserved for the link context.

export default defineNuxtConfig({
  aiReady: {
    apiCatalog: {
      entries: [{
        anchor: '/api',
        relations: {
          license: { href: '/legal/api-license', type: 'text/html' },
        },
      }],
    },
  },
})

Publish only APIs you intend clients to discover. Check endpoint access controls before adding them to the catalog.

Was this page helpful?