# FLONE with Codex

> Docs index: https://flone.ai/llms.txt · Edition: test period · Updated 2026-11-26
> Follow https://flone.ai/agents.md and the steps on https://api.flone.app/agents.md. This page lists what is
> specific to Codex.

## Commands the user approves

Codex connects with the `flone` tool (path A). `FLONE` below is the path printed by `python3 flone.py install`.

Codex's default sandbox has no network access and only writes inside the workspace. These commands need the user's
approval to run with network access, outside the sandbox:

| Step | Command | Why |
| --- | --- | --- |
| Read the steps | `curl -fsSL https://api.flone.app/agents.md` | Network access |
| Get the tool | Download `flone.py` from the address on that page, check its SHA-256, `python3 flone.py install` | Network access; `install` writes to `~/.config/flone`, outside the workspace |
| Connect | `python3 FLONE connect --code ... --name "Codex"`, then `python3 FLONE wait` | Network access to `api.flone.app`; `wait` saves the token in the FLONE home |
| Use FLONE | `python3 FLONE call <tool> '<JSON>'` | Network access to `api.flone.app` |

If the user keeps the sandbox, `install` falls back to `./.flone` in the workspace and keeps it out of git; run
later commands from the same directory, or set `FLONE_HOME` to the printed `home`.

`wait` returns within 45 seconds, inside Codex's 60-second tool timeout. Run it again while it prints `pending`.

## Using FLONE in this session: `call`

An MCP server added to the configuration only appears in a new session. Call the tools through the shell instead:

```sh
python3 FLONE call phone_context
python3 FLONE call phone_observe '{"screenshot": true}'
python3 FLONE tools
```

The tool reads the token from its home and never prints it. Screenshots are saved as files; the path is in
`screenshot_file`. Open them with your image tool if you have one.

## As an MCP server: `flone.py mcp` (optional)

`flone.py mcp` is a local stdio MCP server that forwards to FLONE. Its configuration holds no token: it reads the
token file on every request.

- **One session only** (also works for `codex exec`):

```sh
codex -c 'mcp_servers.flone.command="python3"' -c 'mcp_servers.flone.args=["FLONE", "mcp"]'
```

- **Every session:** the same two keys under `[mcp_servers.flone]` in `~/.codex/config.toml`, only if the user
  wants it. Until the user restarts Codex, keep using `call`.

Replace `FLONE` with the absolute path printed by `install`. Never write the token into `config.toml`.
Connections made with the earlier steps (`mcp-call.py`,
`bearer_token_env_var`) keep working until they expire.

## Notes

- Actions that wait for the user's approval return within about 45 seconds, inside Codex's default 60-second tool
  timeout. On `pending_confirmation`, follow the result's `next` field.
- Never copy `~/.config/flone/` into the workspace, and never commit anything from it.

Tested in the test period: Codex connected from a cold start with the `flone` tool, read the screen and finished,
without changing `~/.codex/config.toml`.
