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

# AI 工具与 MCP

> 将 Osmosis 文档接入 Codex、Claude Code 及其他 AI coding agent

Rollout 通常是在 AI coding agent 的协助下构建的。本文档站点提供了机器可读的接口，让您的 agent 可以直接查询最新的 Osmosis 文档——CLI 语法、SDK 抽象、配置格式——而不是依赖其训练数据。

## 文档 MCP Server

本站点托管了一个 MCP server，提供覆盖所有页面的搜索和检索工具，无需认证：

```text theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
https://docs.osmosis.ai/mcp
```

<CodeGroup>
  ```bash Codex theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
  codex mcp add osmosis-docs --url https://docs.osmosis.ai/mcp
  ```

  ```bash Claude Code theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
  claude mcp add --transport http osmosis-docs https://docs.osmosis.ai/mcp
  ```

  ```json Cursor theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
  {
    "mcpServers": {
      "osmosis-docs": {
        "url": "https://docs.osmosis.ai/mcp"
      }
    }
  }
  ```

  ```json OpenCode theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
  {
    "$schema": "https://opencode.ai/config.json",
    "mcp": {
      "osmosis-docs": {
        "type": "remote",
        "url": "https://docs.osmosis.ai/mcp",
        "enabled": true
      }
    }
  }
  ```

  ```json VS Code theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
  {
    "servers": {
      "osmosis-docs": {
        "type": "http",
        "url": "https://docs.osmosis.ai/mcp"
      }
    }
  }
  ```
</CodeGroup>

Cursor 用户请将 JSON 添加到 `~/.cursor/mcp.json`（全局）或 `.cursor/mcp.json`（按项目）。OpenCode 用户请添加到项目根目录的 `opencode.json` 或全局的 `~/.config/opencode/opencode.json`。VS Code 用户请添加到 `.vscode/mcp.json`。

<Tip>
  每个页面还带有 contextual menu（复制按钮旁的下拉菜单），可以一键将此 MCP server 接入 Cursor 或 VS Code，或在 ChatGPT、Claude 中打开当前页面。
</Tip>

## Mintlify Index

本站点已被收录进 [Mintlify Index](https://www.mintlify.com/docs/search-index)——一个公开的 MCP server，可搜索整个技术生态中由发布方直接提供的最新文档。当您的 agent 需要通过单个 server 同时查询 Osmosis 文档和第三方文档（e.g. Strands Agents、OpenAI Agents SDK）时，可以使用它：

<CodeGroup>
  ```bash Codex theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
  codex mcp add mintlify-index --url https://index.mintlify.com
  ```

  ```bash Claude Code theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/cli.json"]}}
  claude mcp add --transport http mintlify-index https://index.mintlify.com
  ```
</CodeGroup>

其他客户端沿用上文文档 MCP Server 一节的配置格式，将 URL 换成 `https://index.mintlify.com` 即可。

<Note>
  Index server 无需 API key。速率限制按 IP 地址计：每秒 10 次请求，每天 1,000 次请求。
</Note>

## Markdown 导出

每个页面也提供纯 Markdown 版本，可直接抓取：

| 资源                | URL                                                                                        |
| ----------------- | ------------------------------------------------------------------------------------------ |
| 面向 LLM 的页面索引      | [https://docs.osmosis.ai/llms.txt](https://docs.osmosis.ai/llms.txt)                       |
| 全站内容单文件           | [https://docs.osmosis.ai/llms-full.txt](https://docs.osmosis.ai/llms-full.txt)             |
| 任意单页的 Markdown 版本 | 在页面 URL 后追加 `.md`，e.g. [/cli/installation.md](https://docs.osmosis.ai/cli/installation.md) |

## 示例 Prompt

接入之后，您的 agent 就能基于实时文档回答这类问题：

* "Search the Osmosis docs: how do I define a `Grader` with LLM-as-judge scoring?"
* "Using the Osmosis docs MCP server, write an eval config for my rollout and explain each field."
* "What does `osmosis train submit` validate during preflight?"

## 后续步骤

<CardGroup cols={2}>
  <Card title="创建自己的 Rollout" icon="wand-magic-sparkles" href="/zh/platform/create-your-own-rollout">
    使用 AI coding agent 将任务或数据集转成已验证的 rollout。
  </Card>

  <Card title="命令参考" icon="rectangle-list" href="/zh/cli/command-reference">
    所有 CLI 命令及其选项的完整参考。
  </Card>
</CardGroup>
