xyd 0.1.0-beta - Coming Soon

API Pages
/
APIToolchain

APIToolchainExperimental

Learn how to use the API docs generation tools in library mode

APIToolchain is the set of converters behind xyd's API pages. Each one turns an API source — OpenAPI, GraphQL, TypeScript, an MCP server or an OpenCLI spec — into one unified format called uniform: a list of references (Reference[]), one per operation, type, tool or command. The same packages that build xyd's pages can be used on their own.

The converters, as published on npm:

PackageConvertsEntry point
@xyd-js/openapi
OpenAPI 3 (.yaml, .json)
deferencedOpenAPI(path) + oapSchemaToReferences(document)
@xyd-js/gql
GraphQL SDL (.graphql)
gqlSchemaToReferences(path)
@xyd-js/sources
TypeScript (via TypeDoc)
sourcesToUniformV2(root, entryPoints) from @xyd-js/sources/ts
@xyd-js/mcp-uniform
an MCP server (URL) or a local tools/resources manifest
mcpUrlToReferences(source, { token })
@xyd-js/opencli
an OpenCLI spec
loadOpencliSpec(path) + opencliToReferences(spec)

@xyd-js/uniform holds the format itself (its types), the plugin runner and the emitters that turn references into other things, such as MCP tools and agent skills. @xyd-js/atlas renders references as React components.

The conversions run in a Rust core published as @xyd-js/native (an optional dependency, installed per platform). @xyd-js/openapi keeps a JavaScript fallback; @xyd-js/gql, @xyd-js/mcp-uniform and @xyd-js/uniform's navigation plugins need the native module.

Uniform Overview

uniform is designed to be easy to render on the web and to extend with plugins. A plugin visits every reference, may change it in place, and may hand back extra output:

In a docs site, uniform plugins come from xyd plugins (their uniform array).

Web Usage

After converting into uniform you can render the references with the Atlas component of @xyd-js/atlas:

Usage in Other Libs

You can also use the converters in your own workflow. For example, you can document the settings interface of your library straight from your TypeScript codebase:

AI Agents

The same references feed AI agents:

  • uniformToMcpTools(references) from @xyd-js/uniform builds one MCP tool definition per REST operation (name, description, a JSON Schema input, annotations and the HTTP binding).
  • skillFiles(references, { name, description }) from @xyd-js/uniform/skill writes an agent skill: a SKILL.md and one markdown reference file per group of operations.
  • @xyd-js/mcp registers those tools on an MCP server and calls the API behind them, and @xyd-js/mcp-server serves an API document as an MCP server, over HTTP or stdio.
  • @xyd-js/uniform/markdown renders a reference as markdown.

Docs FrameworksComing Soon

APIToolchain and Atlas can be also used in other docs frameworks:

  • Docusaurus (coming soon)
Built with

Show your support! Star us on GitHub ⭐️