Codex
Connect the Codex CLI or IDE extension to HeyBrain with a workspace key or browser sign-in, then ask your first question.
You need Codex and Node.js installed. Choose a key or browser sign-in.
Generate a key
Open HeyBrain MCP in the workspace Codex should use, choose Codex and your operating system, then choose Generate key and name the connection.
Warning: The full key is shown once. Copy it straight away and keep any command or file that contains it private.
Run the setup command
Run the Connect your agent to the brain command from the HeyBrain MCP page. It adds HeyBrain to
~/.codex/config.toml. To add it by hand, paste this block into that file:~/.codex/config.toml [mcp_servers.HeyBrain] url = "https://mcp.heybrain.io/mcp" http_headers = { Authorization = "Bearer REPLACE_WITH_YOUR_KEY" }Restart Codex
Fully quit and restart Codex so it reads the new configuration. The HeyBrain MCP page shows the connection as detected after the first call.
Add the server without a key
~/.codex/config.toml [mcp_servers.HeyBrain] url = "https://mcp.heybrain.io/mcp"Sign in
Terminal codex mcp login HeyBrainSign in to HeyBrain in the browser that opens, choose the workspace and approve Codex.
Ask your first question#
Ask your first question: “Use HeyBrain to find what we know about <the subject of your note>.” Codex searches HeyBrain and answers from your note. The agent can only see what your HeyBrain identity can access in this workspace.
Tip: If Codex does not connect, run the compatibility command shown on the HeyBrain MCP page. Keep config.toml private while it contains a key.
Last checked against the product on November 25, 2026.