Codex
Connect GuruSup Brain to the Codex CLI with one terminal command, and make Codex use it.
Use this page to connect GuruSup Brain to the Codex CLI. It takes one command. The steps on the Brain MCP page cover the CLI only.
If you would rather paste a prompt and let Codex do it, see Setup and authentication. The steps below are the manual route.
Before you start
- You have an account in a Brain organization.
- The Codex CLI is installed. Run
codex --versionin a terminal to check. If it fails, install Codex first. - Open Brain MCP in the Brain sidebar and pick Codex under Need help setting it up?. The Terminal box shows the command, ready to copy.
Connect
Open a terminal
Any terminal works.
Run the command
Run the command exactly as shown. In production it looks like this. If the Brain MCP page shows a different URL, use that one:
codex mcp add gurusup-brain --url https://mcp.brain.gurusup.com/mcp
Keep the name gurusup-brain. It is the name Codex uses for this connection. The command writes the connection into your ~/.codex/config.toml file for you. You do not need to edit that file by hand.
Restart and check
Start or restart Codex, then run /mcp. gurusup-brain should show as connected.
If a sign-in page opens in your browser, sign in with the account you use for Brain. If you belong to more than one organization, you choose the organization at this step. OpenAI's guide also gives codex mcp login gurusup-brain to run the sign-in from your shell.
For more detail, see the Codex MCP guide.
Scope
The command writes to ~/.codex/config.toml, which is your user-wide Codex configuration, so Brain is available in every project you open with Codex. OpenAI's guide says you can also scope a server to one project with a .codex/config.toml file, but the command on the Brain MCP page does not do that.
The same guide says the ChatGPT desktop app, the Codex CLI and the Codex IDE extension share this configuration. A server you add here can therefore show up in the others. See ChatGPT.
Make Codex check Brain
Adding the server gives Codex access to Brain. To have it use Brain for company questions, open AGENTS.md at the root of your project, or create it. Paste this instruction and save: "For anything about this company, use the GuruSup Brain tools before answering. Call init first, then ask_company_memory. Answer only from what those tools return, and if they find nothing, say so instead of guessing." Codex picks it up on its next run.
An AGENTS.md at the root of a project applies to that project. The server is available everywhere, but the instruction only reaches Codex in projects that have it.
Check that it works
Check the server
Run /mcp in Codex and look for gurusup-brain as connected. Outside Codex, codex mcp list lists configured servers.
Check the tools
Ask Codex: "Which tools do you have from gurusup-brain?" A full list has 13, starting with init and ask_company_memory. See the Tools reference.
Ask a question
Ask something your organization's sources can answer.
What success looks like: Codex asks Brain and answers from what Brain returns. See Ask questions.
If it doesn't work
- Run
/mcpagain and look forgurusup-brain. - Check that you kept the name
gurusup-brainand used the URL from the Brain MCP page. - If the server is listed but not signed in, run
codex mcp login gurusup-brain. - See MCP troubleshooting.