> ## 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

> Kết nối Flowstep với OpenAI Codex bằng cách sử dụng giao vận MCP HTTP có thể truyền được.

## Cấu hình

Thêm máy chủ bằng CLI Codex:

```bash theme={"system"}
codex mcp add flowstep --url https://api.flowstep.ai/mcp
```

Hoặc chỉnh sửa tệp cấu hình trực tiếp. Sử dụng tệp toàn cầu để bật tính năng ở mọi nơi, hoặc tệp dự án (chỉ các dự án được tin tưởng) để giữ nó trong phạm vi.

<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>

Codex tự động chọn giao vận Streamable HTTP khi `url` được đặt — không cần trường transport.

## Xác thực

Chạy:

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

Codex mở trình duyệt của bạn đến `https://api.flowstep.ai/oauth/authorize`. Đăng nhập bằng thông tin đăng nhập Flowstep của bạn (email/mật khẩu hoặc Google SSO). Codex nắm bắt lệnh gọi lại và lưu trữ token.

<Note>
  Bạn cần một tài khoản Flowstep trước khi kết nối. Tạo một tài khoản tại [app.flowstep.ai](https://app.flowstep.ai).
</Note>

## Xác minh kết nối

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

Máy chủ sẽ xuất hiện với trạng thái OAuth của nó. Bên trong phiên Codex, hãy nhập `/mcp` để xem các máy chủ được kết nối, sau đó hỏi:

```
List my Flowstep files
```

Nếu lệnh gọi công cụ thành công, kết nối hoạt động.

## Ví dụ sử dụng

```
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 sẽ gọi `create-new-design` → `get-screen-image` và hiển thị kết quả.
