# Connect Codex

Last checked 16 October 2026.

The same page on the web: https://dev.fline.sh/docs/connect-codex

This page connects Codex, OpenAI's AI coding app, to your fline account, so it can put your app online for you. You add two lines to a settings file, then type one line in Terminal to approve fline in your browser.

**Setup steps, not yet tested from start to finish.** Claude Code is the only AI coding app we've used with fline all the way to a live app. These steps match what your fline dashboard shows for Codex, but we haven't followed them through to a live app ourselves. If you get stuck, [Claude Code](https://dev.fline.sh/docs/connect-claude-code) is the tested way.

## Before you start

- **Your fline account is open,** and you've opened [your fline dashboard](https://app.dev.fline.sh) once. If not, see [Getting your account](https://dev.fline.sh/docs/get-access). Connect after your account is open, or Codex may keep asking you to sign in.
- **Codex is installed** and you can start it in Terminal, the app on your computer where you type commands. [Connect Claude Code](https://dev.fline.sh/docs/connect-claude-code) explains how to open Terminal on a Mac or on Windows.

## 1. Add fline to Codex's settings file

Codex keeps its settings in a file called `config.toml`, in a folder named `.codex` inside your home folder: `~/.codex/config.toml` on a Mac, `%USERPROFILE%\.codex\config.toml` on Windows.

Open that file in a plain text editor, or create it if it doesn't exist. Add these two lines at the end. Your dashboard shows the same lines under **Codex**, with a button to copy them:

```copy
[mcp_servers.fline]
url = "https://mcp.dev.fline.sh/mcp"
```

Save the file. Some text editors change straight quote marks into curly ones. Codex can't read curly quotes, so check that the quote marks around the address are straight.

## 2. Sign in to fline from Terminal

In Terminal, paste this line and press Return:

```copy
codex mcp login fline
```

Your browser opens.

## 3. Approve fline in your browser

**If you're not signed in to fline in that browser,** you see the fline sign-in page first. Sign in with your fline email address and password.

**Then you see a page that asks you to approve the connection.** It looks plainer than the rest of fline, and that's expected. At the top is the name the app gave itself when it connected. Only approve if you started this from Codex a moment ago.

Make sure every permission box is ticked, then press **Allow**. Codex gets only the permissions you tick, and it needs all of them to put your app online.

| Code on the page | What it lets Codex do |
|---|---|
| `openid` | Confirm which fline account you signed in with. |
| `offline_access` | Stay connected, so you don't have to approve fline again every time you use it. |
| `project:read` | See your projects: their progress, their link, what went wrong, what your app printed, what it uses, and the names of the passwords and keys your app uses (never their values). |
| `project:write` | Create and delete projects, send your project folder to fline, answer fline's questions about your app, give you the link to the private page where you type keys, save a key it already has, and create, pause, resume or delete a database. |
| `deploy` | Put your app online, restart it, and put an earlier version back. |
| `domain:write` | Attach a web address you own to your project, check it, and remove it. |

No permission lets Codex read a saved password or key back.

## 4. Check that it worked

In Terminal, paste this line and press Return:

```copy
codex mcp list
```

fline should be in the list. Then start Codex in your project folder and ask:

```prompt Paste this into Codex
List my projects on fline.
```

If it says you have none, the connection works. [Put your app online](https://dev.fline.sh/docs/first-launch) walks through what happens next. It's written for Claude Code, and the steps are the same.

## If something goes wrong

- **`codex mcp login fline` says it doesn't know fline.** Check the file is named `config.toml`, sits in the `.codex` folder in your home folder, and has both lines with straight quote marks.
- **Login doesn't start.** Your dashboard suggests adding this line under the other two, then trying step 2 again:

```copy
auth = "oauth"
```

- **Codex keeps asking you to sign in to fline.** Open [your fline dashboard](https://app.dev.fline.sh). If it says "You're on the list", your account isn't open yet.

## Disconnect Codex

On your fline dashboard, open **Agents**. Each connected AI app is listed with a button to disconnect it. Your app keeps running.

Next: [Put your app online](https://dev.fline.sh/docs/first-launch)
