# Docs MCP

> Give your agent the Chord documentation as tools — search, read a page, look up an endpoint with its real example — hosted at getchord.xyz/docs/mcp or run locally over stdio.

Source: https://getchord.xyz/docs/agents/docs-mcp/

The Chord Docs MCP is this documentation as a Model Context Protocol server: an agent searches the docs, reads a page, or pulls an endpoint's exact parameters, response shape and a real example — instead of guessing from training data. It is read-only and never calls the Chord API; when the agent also needs live numbers, pair it with the hosted [MCP server](/docs/agents/mcp/), the [Agent skill](/docs/agents/skill/) or direct API calls.

## Hosted

One URL, no install, Streamable HTTP:

```
https://getchord.xyz/docs/mcp
```

**Claude Code**

```bash
claude mcp add --transport http chord-docs https://getchord.xyz/docs/mcp
```

**Claude Desktop, Cursor, Windsurf, any client with an `mcpServers` config**

```json
{ "mcpServers": { "chord-docs": { "type": "http", "url": "https://getchord.xyz/docs/mcp" } } }
```

**Codex, OpenAI Agents SDK and other clients that take a URL**: point them at the same address. The server is stateless (no session ids), answers JSON to a `POST`, and allows any origin.

Its server card ([MCP SEP-2127](https://modelcontextprotocol.io/seps/2127-mcp-server-cards)) is at [`https://getchord.xyz/docs/mcp/server-card`](https://getchord.xyz/docs/mcp/server-card), and the site's AI catalog ([`/.well-known/ai-catalog.json`](https://getchord.xyz/.well-known/ai-catalog.json)) lists it.

## Local (stdio)

The same server also runs over stdio, for an offline client or one that only speaks stdio, but only from a checkout of the Chord repository (`packages/docs-mcp`), which is not public yet. Outside it, use the hosted URL above: same server, same index.

```bash
# from a checkout of the Chord repository
pnpm install --filter @nullterminal/docs-mcp
claude mcp add chord-docs -- node $PWD/packages/docs-mcp/stdio.mjs
```

It fetches the docs index from getchord.xyz on start and refreshes it every 30 minutes. `DOCS_INDEX_URL` points it elsewhere; `DOCS_INDEX_FILE` uses a local build of the docs.

## Tools

| Tool | What it does |
| --- | --- |
| `search_chord_docs` | Full-text search over every page and every endpoint; returns matching sections and operations with a snippet and URL. `kind` narrows to pages or operations. |
| `read_chord_docs_page` | The full Markdown of one page (or one section with `#anchor`) by path, e.g. `/docs/concepts/streaming/`. |
| `chord_api_reference` | An endpoint's method, path, every parameter with type / enum / default, the request body, the response shape and a real example captured from the live API. Look up by operationId (`getQuote`), path (`/v1/arc/tokens`) or words. |
| `list_chord_docs_pages` | Every page with its description, grouped by section, plus the API tags — for orientation. |

The server also sends `instructions` on connect (base URL, the amounts rule, the Arc USDC alias), so a model that only calls one tool still gets the facts it most often gets wrong.

## What the index is

A JSON built with the site — every page's Markdown split into sections, every OpenAPI operation with its parameters, response outline and example — published at [`/docs/docs-index.json`](/docs/docs-index.json) and rebuilt on every deploy. Search is a small in-memory scorer; a query answers in a few milliseconds.

## Tested with Claude

Both transports were verified with Claude Code in headless mode: the model was told to answer only from the MCP, and it called `search_chord_docs` then `read_chord_docs_page` / `chord_api_reference` and returned the exact WebSocket subscribe frame and the holders endpoint with the doc URLs. Run the same check yourself:

```bash
claude -p "Using only the chord-docs MCP, how do I subscribe to live Arc prices over WebSocket?" \
  --allowedTools "mcp__chord-docs__*"
```
