# Docs MCP

The docs MCP server lets AI tools search and read these docs with no sign-in, every docs page is also clean Markdown at its URL plus .md, and llms.txt lists every page.

The docs MCP is a public Model Context Protocol server over these docs, at `https://provenanceauth.com/docs/mcp`. Anyone reading the docs from an AI client can search them, read a page and get tested code, with no sign-in and no key. Every page is also Markdown at its URL plus `.md`, for pasting into an assistant or fetching from an agent.

## When to use it

- Connect Claude Code, Cursor or VS Code to the docs, so the coding agent looks up the right page while it writes your integration.
- Paste a guide into an AI assistant while you build an integration.
- Index the docs for your own retrieval or search tool.

## How it works

1. **Copy for LLM.** The button beside each page title copies the page's Markdown to your clipboard.
2. **View as Markdown.** The link beside it opens the same Markdown, at the page's URL plus `.md`.
3. **Docs MCP server.** `https://provenanceauth.com/docs/mcp` is a Model Context Protocol server over the same Markdown. An AI tool searches the docs, reads a page and lists the sections, finds an API operation and its schema, explains an error code, and gets tested code and a step plan for its stack, with no API key.
4. **llms.txt.** `/llms.txt` lists every page's `.md` URL, and `/llms-full.txt` holds every page's Markdown in one file. Both are published at public launch.

## Fetch a page

Add `.md` to any docs URL. The response is `text/markdown`.

**curl**

```bash norun
curl https://provenanceauth.com/docs/get-started/choose-your-path.md
```

**Node**

```ts
const res = await fetch("https://provenanceauth.com/docs/get-started/choose-your-path.md");
const markdown = await res.text();
```

**Python**

```python
import urllib.request

markdown = urllib.request.urlopen("https://provenanceauth.com/docs/get-started/choose-your-path.md").read().decode()
```

| Page | Markdown URL |
| --- | --- |
| [Choose your path](https://provenanceauth.com/docs/get-started/choose-your-path.md) | `/docs/get-started/choose-your-path.md` |
| [Intent tokens API](https://provenanceauth.com/docs/api/intent-tokens.md) | `/docs/api/intent-tokens.md` |
| [Docs home](https://provenanceauth.com/docs.md) | `/docs.md` |

## Connect the docs MCP server

The server URL is `https://provenanceauth.com/docs/mcp`. It speaks Streamable HTTP, needs no sign-in and only reads the public docs.

### Claude and ChatGPT

Add a custom connector named Provenance docs with the URL `https://provenanceauth.com/docs/mcp`. It asks for no sign-in.

### Claude Code

```bash norun
claude mcp add --transport http provenance-docs https://provenanceauth.com/docs/mcp
```

### Cursor

Add the server to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` for every project:

```json
{
  "mcpServers": {
    "provenance-docs": {
      "url": "https://provenanceauth.com/docs/mcp"
    }
  }
}
```

### VS Code

Add the server to `.vscode/mcp.json` in your workspace:

```json
{
  "servers": {
    "provenance-docs": {
      "type": "http",
      "url": "https://provenanceauth.com/docs/mcp"
    }
  }
}
```

Any other MCP client that supports remote servers connects with the same URL.

### Tools

| Tool | Input | Returns |
| --- | --- | --- |
| `docs_search` | Optionally `query`, `url`, `section` and `limit` (1 to 20, default 5) | With `query`: the best-matching passages, each with its title, URL, `.md` URL, section and text. With a result's `url`: that page's Markdown, the same as its `.md` URL. With neither: every docs section and its pages. |
| `api_search` | `query` (words or a path such as `POST /v1/verify`), and optionally `product` and `limit` | The matching operations of the public API, each with its method, path, summary, product and reference URL. |
| `api_get_operation` | `operation_id`, or `method` and `path`, and optionally `sdk` (`node`, `python` or `curl`) | One operation's parameters, request and response fields, errors, an example request in curl and your SDK, and its reference URL. |
| `explain_error` | `code`, or `body`: a pasted error response | What an error code or reason code means, how to fix it and its docs URL. |
| `generate_code` | `task` and `stack` (`node`, `next`, `python`, `fastapi`, `django`, `go` or `curl`) | The tested code from these docs for that task: files with paths, packages, environment variables and the next step. |
| `plan_integration` | `goal` and `stack` | The ordered steps for a goal, each with the code task to fetch, the operations it calls and the sandbox check that proves it. |
| `validate_code` | `files` (or `code`) and `language` | Findings in code your AI wrote, checked against the public API: the line, the rule, the fix ([the rules](https://provenanceauth.com/docs/get-started/validate-integration-code.md)). Up to 30 checks a minute per IP. |

The server covers the docs pages, the API reference and the SDK reference. `api_search` and `api_get_operation` cover only the public API; `generate_code` returns only examples these docs publish and test, and lists the supported tasks and stacks when you ask for one it doesn't have. Each client IP can make 60 requests a minute; over that, the server answers `429` with a `Retry-After` header.

## What the Markdown contains

| Part | In the Markdown |
| --- | --- |
| Title and summary | The page's H1, then its one-sentence description. |
| Code | Every code block, fenced with its language. Each curl, Node and Python tab is included in order, under its label. |
| Tables and callouts | Tables are GitHub-flavored Markdown. A callout is a blockquote that starts with a bold label, such as **Note:**. |
| Links | Absolute. A link to another docs page points at that page's `.md` URL. |
| API reference pages | Each endpoint's method and path, authentication, parameters, return value, errors, request examples and response example. |

## Related

- [Choose your path](https://provenanceauth.com/docs/get-started/choose-your-path.md): pick the quickstart for your job.
- [Provenance MCP](https://provenanceauth.com/docs/provenance-mcp.md): the signed-in server, with tools for people, developers and agents.
- [Developer tools](https://provenanceauth.com/docs/provenance-mcp/developer-tools.md): the docs tools plus sandbox keys and integration checks, in one connection.
- [API reference](https://provenanceauth.com/docs/api.md): every endpoint, also as Markdown.
- [SDKs](https://provenanceauth.com/docs/get-started/sdks.md): typed clients for Node and Python.
