> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duraton.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI coding tools

> Have your AI coding agent set up Duraton for you - the docs MCP, the product MCP, and Duraton's agent rules - from a single prompt.

If you build with an AI coding agent (Claude Code, Codex, Cursor, Windsurf, VS Code, and others),
you can have it wire up Duraton for you instead of doing it by hand. Duraton publishes a
machine-readable setup file that your agent reads and acts on directly.

## Give your agent this prompt

Paste this into your agent:

```text theme={null}
Fetch https://docs.duraton.ai/agent-setup.md and follow it to set up Duraton in this project: add the Duraton MCP servers, install the project rules, and sign me in.
```

Your agent fetches [`/agent-setup.md`](https://docs.duraton.ai/agent-setup.md) and runs the steps
itself - you do not run the commands.

## What your agent will do

Following the setup file, the agent:

1. **Detects which agent it is** (Claude Code, Codex, Cursor, Windsurf, VS Code, or a generic
   `mcpServers` config), so it uses the right commands and config paths.
2. **Adds the Duraton docs MCP** (`https://docs.duraton.ai/mcp`) so it can search and fetch the
   documentation on demand.
3. **Adds the Duraton product MCP** (`https://mcp.duraton.dev`) so it can drive your runs, events,
   and approvals. It defaults to the bare URL - your whole workspace, where the agent can
   switch between and create projects when you sign in - and can pin a single project with a
   [single-project URL](/integrations/mcp-server) instead.
4. **Installs Duraton's agent rules** by fetching
   [`/agent-rules.md`](https://docs.duraton.ai/agent-rules.md) and saving it to the agent's rules
   file (for example `CLAUDE.md`, `AGENTS.md`, or `.cursor/rules/`), so it knows Duraton's core
   concepts.
5. **Authenticates** - OAuth opens in your browser the first time a Duraton product tool is used,
   and you complete sign-in and the project pick there.

<Note>
  The setup file is instructions for an agent, but it is plain and readable - open
  [`/agent-setup.md`](https://docs.duraton.ai/agent-setup.md) yourself to see exactly what your
  agent will do before you run it.
</Note>

## Guardrails

The setup file tells your agent to keep secrets out of the flow:

* It will **never ask you for, or store, a Duraton secret key**. Secret keys (`dtn_live_...`) are
  issued by you in the console under **API Keys** and set as `DURATON_API_KEY` only when
  [wiring a runner](/start/quickstart) - never for MCP setup, which uses OAuth.
* It grants the **least privilege** a task needs: read-only access to inspect runs, write access
  only to trigger events or control runs.

## Point an assistant at the docs

The docs are published in a machine-readable form so an AI assistant can pull them in as context: an
`llms.txt` index at [`/llms.txt`](https://docs.duraton.ai/llms.txt), a full single-file dump at
[`/llms-full.txt`](https://docs.duraton.ai/llms-full.txt), and clean markdown for every page (add
`/content.md` to a doc's markdown path, e.g. `/llms.mdx/docs/guides/quickstart/content.md`).

### Point a tool at llms.txt

Any tool that understands `llms.txt` - Cursor's **@Docs**, for example - can index the docs directly.
Give it this URL:

```
https://docs.duraton.ai/llms.txt
```

The index links to the clean markdown for each page, so the tool fetches documentation, not rendered
HTML.

### Connect over MCP

The docs run as a hosted MCP server over Streamable HTTP, so an assistant can search and fetch them on
demand with nothing to install. It exposes two tools, `list_doc_sources` and `fetch_docs`, and is at:

```
https://docs.duraton.ai/mcp
```

Add it to your client:

<Tabs>
  <Tab title="Claude Code">
    ```sh theme={null}
    claude mcp add --transport http duraton-docs https://docs.duraton.ai/mcp
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (one project):

    ```json title="~/.cursor/mcp.json" theme={null}
    {
      "mcpServers": {
        "duraton-docs": {
          "url": "https://docs.duraton.ai/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    Add to `.vscode/mcp.json`. VS Code nests servers under a `servers` key:

    ```json title=".vscode/mcp.json" theme={null}
    {
      "servers": {
        "duraton-docs": {
          "type": "http",
          "url": "https://docs.duraton.ai/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Windsurf">
    Add to `~/.codeium/windsurf/mcp_config.json`. Windsurf names the field `serverUrl`:

    ```json title="~/.codeium/windsurf/mcp_config.json" theme={null}
    {
      "mcpServers": {
        "duraton-docs": {
          "serverUrl": "https://docs.duraton.ai/mcp"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Config file">
    Most other MCP clients read a `mcpServers` map with an `http` server:

    ```json title=".mcp.json" theme={null}
    {
      "mcpServers": {
        "duraton-docs": {
          "type": "http",
          "url": "https://docs.duraton.ai/mcp"
        }
      }
    }
    ```
  </Tab>
</Tabs>

**Use a stdio server instead**

If your client speaks stdio rather than HTTP, [mcpdoc](https://github.com/langchain-ai/mcpdoc) serves
the same two tools from the `llms.txt`.

<Note>
  mcpdoc runs via [`uvx`](https://docs.astral.sh/uv/), so you need `uv` installed. The command
  downloads mcpdoc on first run.
</Note>

<Tabs>
  <Tab title="Claude Code">
    ```sh theme={null}
    claude mcp add duraton-docs -- uvx --from mcpdoc mcpdoc --urls Duraton:https://docs.duraton.ai/llms.txt --transport stdio
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (one project):

    ```json title="~/.cursor/mcp.json" theme={null}
    {
      "mcpServers": {
        "duraton-docs": {
          "command": "uvx",
          "args": ["--from", "mcpdoc", "mcpdoc", "--urls", "Duraton:https://docs.duraton.ai/llms.txt", "--transport", "stdio"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="VS Code">
    Add to `.vscode/mcp.json`. VS Code nests servers under a `servers` key:

    ```json title=".vscode/mcp.json" theme={null}
    {
      "servers": {
        "duraton-docs": {
          "command": "uvx",
          "args": ["--from", "mcpdoc", "mcpdoc", "--urls", "Duraton:https://docs.duraton.ai/llms.txt", "--transport", "stdio"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="Codex">
    Add to `~/.codex/config.toml`:

    ```toml title="~/.codex/config.toml" theme={null}
    [mcp_servers.duraton-docs]
    command = "uvx"
    args = ["--from", "mcpdoc", "mcpdoc", "--urls", "Duraton:https://docs.duraton.ai/llms.txt", "--transport", "stdio"]
    ```
  </Tab>

  <Tab title="Windsurf">
    Add to `~/.codeium/windsurf/mcp_config.json`:

    ```json title="~/.codeium/windsurf/mcp_config.json" theme={null}
    {
      "mcpServers": {
        "duraton-docs": {
          "command": "uvx",
          "args": ["--from", "mcpdoc", "mcpdoc", "--urls", "Duraton:https://docs.duraton.ai/llms.txt", "--transport", "stdio"]
        }
      }
    }
    ```
  </Tab>

  <Tab title="Claude Desktop">
    Add to `claude_desktop_config.json`:

    ```json title="claude_desktop_config.json" theme={null}
    {
      "mcpServers": {
        "duraton-docs": {
          "command": "uvx",
          "args": ["--from", "mcpdoc", "mcpdoc", "--urls", "Duraton:https://docs.duraton.ai/llms.txt", "--transport", "stdio"]
        }
      }
    }
    ```
  </Tab>
</Tabs>

Restart the client, and the assistant can list the docs source and fetch any page on demand.

<Note>
  See the **AI** examples running end to end in [Examples](/start/recipes#make-a-model-call-durable).
</Note>

## Related

* [MCP server](/integrations/mcp-server) - the full reference for connecting and the tool list.
