<!-- Source: https://docs.biosimulant.com/agents/connect/codex-cli -->

# Codex CLI

Connect Biosimulant from a terminal on your computer. This guide is separate from the [Codex desktop](/agents/connect/codex) app guide.

## Open your terminal

Open **Terminal** on Mac or your terminal app on Windows. First check the CLI that your terminal actually runs:

```bash
codex --version
codex mcp --help
```

The help must include **add** and **login**. If either is missing, follow [OpenAI’s CLI installation guidance](https://learn.chatgpt.com/docs/cli) to update the CLI, reopen your terminal and check again. An up-to-date desktop app does not guarantee that a separately installed terminal CLI is current.

Add the server, then authenticate that same server name:

```bash
codex mcp add biosimulant --url https://api.biosimulant.com/mcp
codex mcp login biosimulant --scopes hub:read,biology:read,workspaces:read,workspaces:write,runs:read,runs:write,passports:read,packages:publish,offline_access
```

Using staging? Replace the server address with the address from staging Studio. See [OpenAI’s CLI reference](https://learn.chatgpt.com/docs/cli/reference) for the available MCP commands.

If the server already exists, skip `add` and use `login` only if authentication is needed. Desktop and CLI share MCP configuration on the same Codex host; a different computer or remote host may need its own setup.

Run `codex` to start a new terminal chat, then type `/mcp` to inspect the available tools.

## Check the connection

Ask your agent:

```text
Check my Biosimulant account and tell me whether this connection is personal
or for a team. Do not start a session or run anything.
```

Confirm the account and context, then [create a session in Studio](/studio/quickstart)
and paste its session prompt into this agent. Setup alone does not join a Studio session.

[Setup help](/agents/connect/help) · [Choose another app](/agents/connect)

Using ordinary ChatGPT chat? Follow [ChatGPT desktop](/agents/connect/chatgpt-desktop).
