better/compute

Use the docs with AI

Connect AI coding assistants to these docs through their MCP endpoint, or hand them the site as Markdown with llms.txt and per-page Markdown.

AI coding assistants write better Better Compute code when they can read the real reference instead of guessing method names, IAM actions or CLI flags. This site offers the same content to tools as it does to people, in three forms: an MCP server an assistant can query while it works, plain-text indexes for one-shot context, and a Markdown version of every page.

Two different MCP servers

This page is about the documentation's MCP endpoint, which answers questions about Better Compute. To let an agent act on a deployment (list pools, reserve GPUs, create instances), use the @better-compute/mcp package instead; see MCP.

Connect an assistant with MCP

The Model Context Protocol lets an assistant call tools while it works. The docs serve an MCP endpoint at /api/mcp over Streamable HTTP. It needs no sign-in and only reads. The server introduces itself as better-compute-docs and offers six tools:

ToolInputWhat it returns
searchquery, optional localeFull-text search over every page, the same index as the search dialog, as JSON.
list_pagesnoneEvery page with its URL and one-line description (the body of /llms.txt).
get_pageurlOne page as Markdown, by its path, for example /docs/guides/capacity/reservations.
lookup_api_methodmethodOne API method: its HTTP route, the server call compute.api.{group}.{method}(credential, input), the browser client call, its kind, the IAM action and resource it is decided on, its module, and whether this release serves it or it is planned for a later phase.
lookup_error_codecodeWhat a ComputeError code means and its HTTP status, for example CAPACITY_UNAVAILABLE or ACCESS_DENIED.
lookup_cli_commandcommandUsage, flags (with defaults and environment variables) and examples of one better-compute command, for example dev or fleet apply.

The lookup tools are forgiving about how you name things. lookup_api_method accepts reservations.create, compute.api.reservations.create(...), client.joinTokens.create, a route such as /api/compute/reservations/create, or a reference URL such as /docs/reference/api/reservations#create; an unknown group or method answers with the list of valid ones. lookup_cli_command drops a leading better-compute and any flags, and matches the longest command name the query starts with, so fleet plan fleet.json finds fleet plan. Error codes are matched case-insensitively.

claude mcp add --transport http better-compute-docs https://better-compute.com/api/mcp

These docs are served at https://better-compute.com. When you run them locally with pnpm --filter @better-compute/docs dev, use http://localhost:4100 instead. The links the lookup tools print use the site's canonical origin, DOCS_SITE_URL, which defaults to https://better-compute.com in a production build and to the local address under next dev.

A session might look like this: the assistant searches for "extend a reservation", reads /docs/guides/capacity/reservations with get_page, then calls lookup_api_method with reservations.extend to get the exact route and IAM action before it writes the call.

Give a model the whole site

When a tool cannot call MCP, paste or fetch the site as plain text:

URLContentUse it for
/llms.txtAn index: every page's title, URL and description, under a one-paragraph summary of Better ComputeLetting a model pick which pages to read
/llms-full.txtEvery page as Markdown in one fileLoading everything into a long context window
/docs/<page>.mdOne page as MarkdownQuoting a single page precisely

Any docs URL also returns Markdown when the request asks for it with Accept: text/markdown, so agents that fetch pages get Markdown without special URLs:

curl -H 'Accept: text/markdown' https://better-compute.com/docs/guides/quickstart
curl https://better-compute.com/docs/guides/quickstart.md          # the same answer

Both are rewritten to /llms.mdx/docs/<page>/content.md, which answers with a Link: rel="canonical" header that points at the HTML page. Each page's Copy Markdown button and its view-options menu use the same Markdown.

The Markdown is not the raw MDX source. Each page starts with its title, URL and description, comments are dropped, visual-only components are removed, the API endpoint boxes become a line of text with the route, authorization and calls, and the glossary becomes every term as a heading with its definition. /llms.txt and /llms-full.txt carry X-Robots-Tag: noindex, so search engines index the pages themselves.

Keep answers accurate

The reference pages, and the MCP lookup tools, come from the code: the generator builds a control plane with every module and reads its method registry, command kinds, error codes and CLI manifest (see reference). They match the version of Better Compute these docs were built from, including which methods that version serves and which PLAN.md lists for a later phase.

Two things to tell an assistant:

  • Planned is not served. lookup_api_method says Status: planned for <phase> for methods this release does not route; the HTTP endpoint answers NOT_FOUND for them. Check the status before generating code against a method.
  • The daemon is not released. bcd is a Go binary whose v0.1 node agent (with tunnels) is built and tested end to end, and whose site and ramdisk modes are written with Go unit tests, but no binary is published. Its VPS host runs instances on libvirt-kvm or cloud-hypervisor (both tested only against fake tools, never on real hardware) or, on fake-hardware builds, a file-backed runtime; its sim mode (many node agents in one process) runs only on fake-hardware builds; self-update and the WebSocket fallback are written, and GPUs are read through nvidia-smi rather than the NVML library (cb987e5). The TypeScript FakeDaemon in @better-compute/testing runs those paths. See what bcd does today.

When an answer disagrees with your installed version, trust the TypeScript types in your editor: every server method is typed end to end from the betterCompute() instance and the @better-compute/client client.

Was this page helpful?

Better Compute is created by Sean Filimon

Last updated

On this page