> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levios.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Codex

> Add levios as a remote MCP server in the OpenAI Codex CLI.

<Note>
  Available tools and activation support depend on your current connection. After
  connecting, ask the agent to check the available operations before creating an
  automation.
</Note>

## Add the server

Run this from your terminal:

```bash theme={null}
codex mcp add levios --url https://levios.app/api/mcp
```

Codex writes the entry to `~/.codex/config.toml`. You can also add it by hand:

```toml theme={null}
[mcp_servers.levios]
url = "https://levios.app/api/mcp"
```

To scope the server to one project instead, put the same block in
`.codex/config.toml` inside that project.

Authentication defaults to OAuth for remote servers, so no `auth` key is
required. Leave `bearer_token_env_var` unset. levios does not accept a bearer
token supplied by the client.

## Authorize the connection

```bash theme={null}
codex mcp login levios
```

Sign in to levios in the browser window that opens, review the permissions and
Instagram accounts, then approve the request. Codex saves the credential for
later sessions.

See [OpenAI's Codex MCP guide](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)
for the current configuration keys and login flow.

## Verify access

Ask Codex to list your levios accounts or automations. The result must contain
only accounts included in the grant. Tools that need permissions you did not
approve will not appear.

If the server has no tools, open **Settings > MCP** in levios and check its
status, permissions, and account access. Revoke the connection and start again
if you need to choose a different permission set.

Never put an API key or bearer token in `config.toml`. The browser
authorization flow supplies the credential.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.