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

# Flowstep MCP — Codex

> 使用 Streamable HTTP MCP 传输将 Flowstep 连接到 OpenAI Codex。

## 配置

使用 Codex CLI 添加服务器：

```bash
codex mcp add flowstep --url https://api.flowstep.ai/mcp
```

或者直接编辑配置文件。使用全局文件可在所有地方启用，使用项目文件（仅限受信任的项目）则可将其限定在项目范围内。

> [tab] 全局 (~/.codex/config.toml)
>
> ```toml
> [mcp_servers.flowstep]
> url = "https://api.flowstep.ai/mcp"
> ```

> [tab] 项目 (.codex/config.toml)
>
> ```toml
> [mcp_servers.flowstep]
> url = "https://api.flowstep.ai/mcp"
> ```

只要设置了 `url`，Codex 就会自动选择 Streamable HTTP 传输，无需额外的传输字段。

## 身份验证

运行：

```bash
codex mcp login flowstep
```

Codex 会在浏览器中打开 `https://api.flowstep.ai/oauth/authorize`。使用您的 Flowstep 凭据登录（邮箱/密码或 Google SSO），然后在授权页面上点击 **Allow**。Codex 会捕获回调并存储令牌。

> [!NOTE]
>
> 连接前您需要一个 Flowstep 账户。请在 [app.flowstep.ai](https://app.flowstep.ai) 创建。

## 验证连接

```bash
codex mcp list
```

该服务器应会以其 OAuth 状态显示在列表中。在 Codex 会话中，输入 `/mcp` 查看已连接的服务器，然后输入：

```
List my Flowstep files
```

如果工具调用成功，说明连接正常。

## 用法示例

```
Generate a mobile payment screen in Flowstep with a card form and an order summary,
then show me the rendered image.
```

Codex 会调用 `ai-design-screens` → `get-screen-image` 并显示结果。
