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

# 跨 Agent 兼容性

> 在 40+ AI Agent 中安装 ChainStream Skill 的兼容性表格和配置详情。

## 概述

ChainStream Skill 包（`chainstream-io/skills`）通过 [Vercel Skills CLI](https://skills.dev) 分发，支持 **40+ AI Agent**。只需一条命令即可为你选择的 Agent 安装和配置 ChainStream MCP 工具。

```bash theme={null}
npx skills add chainstream-io/skills
```

## 兼容性表格

下表列出了最常用的 Agent 及其安装命令和配置文件位置。

| Agent          | 安装命令                                                  | 配置文件位置                            |
| -------------- | ----------------------------------------------------- | --------------------------------- |
| OpenClaw       | `npx skills add chainstream-io/skills -a openclaw`    | `skills/` 或 `~/.openclaw/skills/` |
| Claude Code    | `npx skills add chainstream-io/skills -a claude-code` | `.claude.json`                    |
| Cursor         | `npx skills add chainstream-io/skills -a cursor`      | Cursor MCP 设置                     |
| Cline          | `npx skills add chainstream-io/skills -a cline`       | Cline 配置                          |
| GitHub Copilot | `npx skills add chainstream-io/skills -a copilot`     | `.github/copilot/`                |
| Codex          | `npx skills add chainstream-io/skills -a codex`       | Codex 配置                          |

## Agent 详细配置

### OpenClaw

Skills CLI 将配置写入 OpenClaw 的 Skills 目录：

* **项目级别**：`./skills/chainstream.yaml`
* **用户级别**：`~/.openclaw/skills/chainstream.yaml`

生成的配置：

```yaml theme={null}
skills:
  chainstream:
    type: mcp
    url: https://mcp.chainstream.io/mcp
    env:
      CHAINSTREAM_API_KEY: ${CHAINSTREAM_API_KEY}
```

在运行 Agent 之前设置环境变量：

```bash theme={null}
export CHAINSTREAM_API_KEY=your-key
openclaw run
```

### Claude Code

Skills CLI 将 MCP Server 条目添加到项目根目录的 `.claude.json` 中：

```json theme={null}
{
  "mcpServers": {
    "chainstream": {
      "command": "npx",
      "args": ["@chainstream-io/mcp"],
      "env": {
        "CHAINSTREAM_API_KEY": "your-key"
      }
    }
  }
}
```

另请参阅：[Stdio 传输](/cn/docs/ai-agents/mcp-server/setup)了解手动 Claude Code 设置。

### Cursor

Skills CLI 在 Cursor 的设置中配置 MCP Server。配置显示在 **Settings > Features > MCP Servers** 下：

| 字段      | 值                         |
| ------- | ------------------------- |
| Name    | `chainstream`             |
| Type    | `stdio`                   |
| Command | `npx @chainstream-io/mcp` |

对于项目级别配置，CLI 会写入 `.cursor/mcp.json`：

```json theme={null}
{
  "mcpServers": {
    "chainstream": {
      "command": "npx",
      "args": ["@chainstream-io/mcp"],
      "env": {
        "CHAINSTREAM_API_KEY": "your-key"
      }
    }
  }
}
```

### Cline

Skills CLI 将 Server 添加到 Cline 的 MCP 配置中：

```json theme={null}
{
  "mcpServers": {
    "chainstream": {
      "command": "npx",
      "args": ["@chainstream-io/mcp"],
      "env": {
        "CHAINSTREAM_API_KEY": "your-key"
      }
    }
  }
}
```

### GitHub Copilot

Skills CLI 将配置写入仓库中的 `.github/copilot/mcp.json`：

```json theme={null}
{
  "mcpServers": {
    "chainstream": {
      "command": "npx",
      "args": ["@chainstream-io/mcp"],
      "env": {
        "CHAINSTREAM_API_KEY": "your-key"
      }
    }
  }
}
```

### Codex

Skills CLI 将 MCP Server 添加到 Codex Agent 配置中：

```json theme={null}
{
  "mcpServers": {
    "chainstream": {
      "command": "npx",
      "args": ["@chainstream-io/mcp"],
      "env": {
        "CHAINSTREAM_API_KEY": "your-key"
      }
    }
  }
}
```

## 自动检测

当你运行 `npx skills add chainstream-io/skills` 而不带 `-a` 参数时，CLI 会通过以下方式自动检测你的环境：

1. 检查当前目录中的 Agent 特定配置文件
2. 检查全局安装的 Agent CLI 工具
3. 检查 IDE 特定的目录和设置

如果检测到多个 Agent，CLI 会提示你选择。

## 更新

要将 ChainStream Skill 更新到最新版本：

```bash theme={null}
npx skills update chainstream-io/skills
```

## 卸载

要移除 ChainStream Skill：

```bash theme={null}
npx skills remove chainstream-io/skills
```

这会从 Agent 的配置文件中移除配置条目，但不会删除你的 API Key。

## 下一步

<CardGroup cols={2}>
  <Card title="工具参考" icon="wrench" href="/cn/docs/ai-agents/mcp-server/introduction">
    浏览安装后可用的全部 15 个 MCP 工具。
  </Card>

  <Card title="安全注意事项" icon="shield" href="/cn/docs/ecosystem/openclaw/security">
    ChainStream 集成的安全注意事项。
  </Card>
</CardGroup>
