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

# Claude

> 将 Claude Code 或 Claude Desktop 连接到 PoYo MCP

# 连接 Claude

Claude Code 可以直接连接托管的 PoYo MCP。Claude Desktop 可以使用本地 stdio 桥接。

## Claude Code

设置 `POYO_API_KEY`，然后运行：

```bash theme={"dark"}
claude mcp add --transport http poyo \
  https://api.poyo.ai/mcp \
  --header "Authorization: Bearer $POYO_API_KEY"
```

> [!NOTE]
>
> 运行该命令时 shell 会展开 `$POYO_API_KEY`，因此实际的 Key 会写入 Claude Code 的 MCP 配置。在默认的 local 作用域下，它保存在你的用户级 Claude 配置中，而不是项目中。不要分享该配置文件。

如果想在不使用 MCP 的情况下使用 Claude Code，请按照[快速开始](https://docs.poyo.ai/zh/integrations/quickstart.md)操作。

## Claude Desktop

需要 Node.js 20 或更高版本。将此服务器添加到 Claude Desktop 的开发者配置中，然后重启 Claude：

```json theme={"dark"}
{
  "mcpServers": {
    "poyo": {
      "command": "npx",
      "args": ["-y", "@poyoapi/mcp"],
      "env": { "POYO_API_KEY": "YOUR_API_KEY" }
    }
  }
}
```

> [!WARNING]
>
> 这份本地配置包含凭据。不要提交或分享它。

在原生 Windows 上，Claude Code 也可以使用 stdio 桥接：

```powershell theme={"dark"}
$env:POYO_API_KEY="YOUR_API_KEY"
claude mcp add poyo --scope user -- cmd /c npx -y @poyoapi/mcp
```

## 验证

向 Claude 提问：`Use PoYo to check my account and list image-generation models.`

类型化模型工具和使用示例见 [PoYo MCP](https://docs.poyo.ai/zh/integrations/mcp.md)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.