Codex MCP Server
Enables Talon agents to delegate autonomous coding tasks to OpenAI Codex, supporting multi-step code operations with configurable sandboxing and approval policies.
README
talon.plugins.codex
A Talon plugin that runs the OpenAI Codex CLI as an MCP server, turning Codex into a delegatable autonomous coding agent your Talon bot can hand tasks to.
It wraps codex mcp-server (Codex as an MCP server) — not to be confused with codex mcp, which manages Codex's own external servers.
What you get
Two MCP tools, surfaced to the agent as mcp__codex-tools__*:
| Tool | Purpose | Required | Notable optional params |
|---|---|---|---|
codex |
Start a new Codex session | prompt |
cwd, model, sandbox, approval-policy |
codex-reply |
Continue an existing session | prompt, threadId |
— |
codex returns a threadId plus the agent's final content. Feed that threadId back into codex-reply to keep the conversation going.
Defaults
For non-interactive, agent-to-agent use (there is no human on the MCP channel to click "approve"), the plugin launches Codex with:
codex mcp-server -c approval_policy="never" -c sandbox_mode="danger-full-access"
approval_policy="never"— Codex never blocks waiting for shell-command approval.sandbox_mode="danger-full-access"— Codex runs shell commands without its bubblewrap sandbox.
Both are overridable: per call via the tool's approval-policy / sandbox arguments, or globally via the TALON_CODEX_SANDBOX / TALON_CODEX_APPROVAL env vars.
Why full-access by default?
Codex's workspace-write and read-only sandboxes wrap every shell command in bubblewrap, which must create a user namespace. On hardened hosts — notably Ubuntu 24.04+, which ships kernel.apparmor_restrict_unprivileged_userns=1 — bwrap fails with:
bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted
When that happens, Codex can't run the sandboxed shell at all, so under approval_policy=never every command (including writing a file) is auto-denied — the agent looks broken. danger-full-access skips bubblewrap and works. Since this plugin is meant for a trusted host (where the parent agent typically already runs with elevated permissions), full-access is the pragmatic default.
If your host's bwrap sandbox works and you want it enforced, set TALON_CODEX_SANDBOX=workspace-write (or pass sandbox: "read-only" per call for analysis-only tasks).
Requirements
codexCLI installed and onPATH(or setTALON_CODEX_BIN). Tested withcodex-cli 0.132.0.- Codex authenticated — either a ChatGPT login (
codex login) or an API key. Auth lives in~/.codex/auth.json. - The default model comes from
~/.codex/config.toml. Override per call with themodelparam (e.g."gpt-5.5","gpt-5.2-codex") for heavier work.
Install
Clone next to your other Talon plugins:
git clone https://github.com/talon-agent/talon.plugins.codex.git
Register it in ~/.talon/config.json:
{
"plugins": [
// ...
{ "path": "/absolute/path/to/talon.plugins.codex" }
]
}
Then hot-reload plugins (or restart Talon). The plugin is a single self-contained module — no npm install required.
Optional env
TALON_CODEX_BIN— absolute path to thecodexbinary. Defaults to/home/dylan/.npm-global/bin/codex; set this if yours lives elsewhere.TALON_CODEX_SANDBOX— default sandbox mode (read-only/workspace-write/danger-full-access). Defaults todanger-full-access(see Why full-access by default?).TALON_CODEX_APPROVAL— default approval policy. Defaults tonever.
Usage notes
- Always set
cwdto the repo you want Codex to work in. If relative, it resolves against the MCP server process's working directory. - Use Codex for self-contained, multi-step coding tasks (refactors, writing a feature, debugging in a repo) — anything you'd want a separate agent to grind on independently.
- Override
modelper call for non-trivial work; the config default may be a small/cheap model.
How it works
A Talon plugin is just a module exporting { name, description, version, mcpServer: { command, args }, getSystemPromptAddition() }. Talon launches command/args as a stdio MCP server and exposes its tools to the agent. This plugin's command is the codex binary and its args are ["mcp-server", ...defaults].
License
MIT — see LICENSE.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.