Agents

Codex (OpenAI)

Connect OpenAI Codex to Ink

Install the Ink CLI and Codex can use it directly from its sandbox terminal.

1. Install the CLI:

npm install -g @mldotink/cli

2. Log in:

ink login

3. Deploy — ask Codex to deploy using the CLI:

Prompt

Deploy this app to Ink using the ink CLI

Setup with OAuth

Point Codex at the MCP endpoint — it handles authentication automatically:

codex mcp add ink --url https://mcp.ml.ink/

Codex will open a browser window for you to sign in. After approving, the connection is ready.

Setup with API Key

If you already have an agent key, set it as an environment variable and pass it to Codex:

export INK_API_KEY="YOUR_API_KEY"
codex mcp add ink --url https://mcp.ml.ink/ --bearer-token-env-var INK_API_KEY

Replace YOUR_API_KEY with your agent key from the Ink dashboard.

Verify

Start a new Codex session and ask:

Prompt

What MCP tools do you have from ink?

Codex should list the Ink deployment tools.

On this page