# Connect Codex

Add Tyton to Codex and sign in to set up one website.



## What you need [#what-you-need]

Use a Codex version that can connect to a remote MCP server over HTTP. For paid setup you also need a Tyton account and plan. If you don’t have them yet, Tyton walks you through both when you sign in.

## Add the server [#add-the-server]

These steps follow [OpenAI’s Codex MCP guide](https://learn.chatgpt.com/docs/extend/mcp?surface=cli).

1. Add Tyton and check it’s listed:

```sh
codex mcp add tyton --url https://mcp.usetyton.com/mcp
codex mcp list
```

2. Ask Codex to audit your website. The free audit works without signing in.
3. When you’re ready for paid setup, sign in:

```sh
codex mcp login tyton
```

4. Tyton opens in your browser. The sign-in page shows the app as chatgpt.com, because Codex signs in through OpenAI. Sign in, pick your website under **Website it can use** (or **Add a website**), then select **Allow access**.
5. Go back to Codex and ask it to continue setup.

If Codex calls a paid setup tool before you’ve signed in, it may start the same sign-in for you.

## Success check [#success-check]

Codex can read setup progress for the website you picked and tells you its name or address. Seeing Tyton in `codex mcp list` shows only that you added its URL.

## Use a connection key instead (for CI or apps without sign-in) [#use-a-connection-key-instead-for-ci-or-apps-without-sign-in]

If Codex runs where it can’t open a browser, connect with a Tyton server key. On the **Integrations** page in Tyton, use **Can’t sign in from your app? Use a pairing code** to get a code for your site, ask Codex to call `connect` with it and `client: "other"`, and have it store the returned key privately.

Then point Codex at the key in `~/.codex/config.toml`. `TYTON_SECRET_KEY` names an environment variable you supply privately:

```toml
[mcp_servers.tyton]
url = "https://mcp.usetyton.com/mcp"
bearer_token_env_var = "TYTON_SECRET_KEY"
```

Make `TYTON_SECRET_KEY` available to the Codex process when it starts. Putting it in your website’s `.env` doesn’t configure Codex.

## If you get stuck [#if-you-get-stuck]

* **The sign-in page says the request has ended:** the request timed out or was already used. Run `codex mcp login tyton` again.
* **Your site slots are all in use:** review your plan in Tyton, or remove a website you no longer need, then run the login again.
* **Codex connected to the wrong website:** select **Disconnect** for it on the **Integrations** page in Tyton, then run `codex mcp login tyton` and pick the right one.
* **The browser doesn’t open:** use the connection key steps above.

For audit only, you can add `https://mcp.usetyton.com/audit`, which never asks you to sign in. Read [connection permissions](/docs/connect/permissions) before you start setup.
