> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowstep.ai/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 theme={"system"}
codex mcp add flowstep --url https://api.flowstep.ai/mcp
```

或者直接编辑配置文件。使用全局文件在任何地方启用它，或使用项目文件（仅限受信任的项目）将其保持在作用域内。

<Tabs>
  <Tab title="Global (~/.codex/config.toml)">
    ```toml theme={"system"}
    [mcp_servers.flowstep]
    url = "https://api.flowstep.ai/mcp"
    ```
  </Tab>

  <Tab title="Project (.codex/config.toml)">
    ```toml theme={"system"}
    [mcp_servers.flowstep]
    url = "https://api.flowstep.ai/mcp"
    ```
  </Tab>
</Tabs>

当设置了 `url` 时，Codex 会自动选择 Streamable HTTP 传输——不需要传输字段。

## 身份验证

运行：

```bash theme={"system"}
codex mcp login flowstep
```

Codex 会打开你的浏览器访问 `https://api.flowstep.ai/oauth/authorize`。使用你的 Flowstep 凭证（电子邮件/密码或 Google SSO）登录。Codex 会捕获回调并存储令牌。

<Note>
  在连接前，你需要有一个 Flowstep 账户。在 [app.flowstep.ai](https://app.flowstep.ai) 上创建一个。
</Note>

## 验证连接

```bash theme={"system"}
codex mcp list
```

服务器应该出现并显示其 OAuth 状态。在 Codex 会话内，输入 `/mcp` 查看已连接的服务器，然后提问：

```
List my Flowstep files
```

如果工具调用成功，连接就能正常工作。

## 使用示例

```
Create a Flowstep file called "Checkout flow", generate a mobile payment screen
with a card form and an order summary, then show me the rendered image.
```

Codex 将调用 `create-new-design` → `get-screen-image` 并显示结果。
