# Connect Codex (https://lazyfrog.dev/docs/connect-codex)

Codex is OpenAI's coding agent for the command line. Signing in to Codex works with a free ChatGPT account, with limited usage. No LazyFrog account yet? [Start free](https://app.lazyfrog.dev/sign-up).

<Steps>
<Step>

## Add LazyFrog to Codex [#add-lazyfrog-to-codex]

Run this in a terminal:

```text
codex mcp add lazyfrog --url https://mcp.lazyfrog.dev/mcp
```

</Step>
<Step>

## Sign in [#sign-in]

Run this, and a browser opens:

```text
codex mcp login lazyfrog
```

Sign in with your LazyFrog email and password, then allow Codex to work on your projects.

</Step>
<Step>

## Use it [#use-it]

Start Codex and ask for an app. Codex asks before it uses each LazyFrog tool, so choose to approve when asked.

</Step>
</Steps>

## Signing in from another machine [#signing-in-from-another-machine]

If you run Codex on one machine (over SSH, say) and sign in from the browser on another, the browser sends the sign-in back to 127.0.0.1, which is the machine you are sitting at, so it never reaches Codex. Either:

- forward Codex's sign-in port to your machine with SSH (`ssh -L PORT:127.0.0.1:PORT your-server`, using the port in the address your browser ends on), or
- copy the full address the browser ends on (it starts with `http://127.0.0.1`) and open it on the machine running Codex, for example with `curl`.

## Good to know [#good-to-know]

- **Approvals.** Codex asks before each tool unless you have set its approval settings. Choose to approve when asked.
- **Running Codex without a person at the keyboard** (`codex exec`): set its approval settings so LazyFrog's tools can run. Otherwise Codex refuses the ones that change things.
- **Your AI, your plan.** LazyFrog never charges for Codex's work, and your plan's usage limits apply as usual.
- **Taking access away.** In the portal, **Connected AIs** lists every AI with access. Disconnect one and its access ends within half a minute.

Using another AI? [Connect your AI](/connect) has the steps for each one.
