Connect Codex
This registers an app as an MCP server in Codex. As with Claude Code, the app gives you the command rather than editing Codex’s TOML config behind your back.
You need:
- Agent Access turned on in the app you are connecting.
- The
codexCLI installed.
- Open the app’s Agent Access settings and copy the Codex command. In Cask Film that is Settings > General > Agent Access, then Connect Agent and Codex. In Cask Flow it is Settings > Agent access, then Copy command on the Codex row.
- Paste it into a terminal and run it.
For Cask Film:
codex mcp add cask-studio -- "/Applications/Cask Studio.app/Contents/MacOS/cask-mcp"For Cask Flow:
codex mcp add cask-motion -- "/Applications/Cask Flow.app/Contents/MacOS/cask-mcp"The -- separates the server name from the launch command, and Codex requires it.
Copy the command from Settings rather than from here, so it names the copy of the app you are actually running.
Use the stdio entry, not a URL
Section titled “Use the stdio entry, not a URL”Codex can describe either a command server or a url server. Only the first works:
[mcp_servers.cask-studio]command = "/Applications/Cask Studio.app/Contents/MacOS/cask-mcp"A url = "http://127.0.0.1:<port>" entry cannot work, for two independent reasons.
The port is assigned by the OS and is different on every launch, so any number you write into a config is dead as soon as you quit the app.
And the server checks its bearer token before it checks the path or the method, deliberately, so an unauthenticated caller cannot map the endpoint by probing it. A URL entry carries no token, so it gets a 401 even in the moment its port happens to be right.
There is no fixed-port mode. The fix for a stale URL entry is to delete it and use the command form.
Result
Section titled “Result”Codex lists the server among its MCP servers, and the app shows Codex as connected in its client list.
If it doesn’t work
Section titled “If it doesn’t work”| Symptom | Cause | Fix |
|---|---|---|
| Codex reports a 401, or the server never responds | The config uses a url entry |
Delete it and add the command entry instead |
| The connection worked yesterday and fails today | A url entry naming last session’s port |
Same fix. The command form has nothing that can go stale |
| The command errors on the path | The -- is missing, so Codex read the path as its own argument |
Run the command with -- before the path |
| Tool list is empty | The app is closed, or Agent Access is off | Open the app and check the switch |
