Guide

jCodeMunch with Codex

Two commands to install, plus one setting that keeps background runs working.

Install it with uv, then run init

uv tool install jcodemunch-mcp
jcodemunch-mcp init --policy

init finds Codex, writes the server entry into ~/.codex/config.toml, and with --policy adds the tool policy to AGENTS.md in the current folder, so run it from your project. The policy tells the agent to query the index instead of reading whole files.

Codex wants the binary, not uvx

Most clients run us through uvx without trouble. Codex doesn’t. It expects the server’s first output to be a protocol message, and uvx prints install output on its first run, which can stall the handshake. That’s why init won’t configure Codex until jcodemunch-mcp is installed (not run through uvx).

The manual entry

If you’d rather write it yourself:

# ~/.codex/config.toml
[mcp_servers.jcodemunch]
command = "jcodemunch-mcp"
default_tools_approval_mode = "writes"

On macOS and Linux, use the absolute path to the binary. Codex started from a GUI can have a narrower PATH than your shell.

Keep background runs from declining tool calls

In non-interactive runs such as codex review --background, Codex can decline tool calls to a server it hasn’t approved, without an error on either side. Two settings fix that for reading. First, add default_tools_approval_mode = "writes" to the [mcp_servers.jcodemunch] block yourself: init writes only the command line. Second, set "tool_surface": "full" in ~/.code-index/config.jsonc. A new install starts with a small front door whose dispatch tools are marked as writers, so they still ask. On the full surface every jCodeMunch tool that only reads is marked read-only, so those run without a prompt, and indexing still asks.

Check it’s working

Ask Codex where a function is used. You should see a jCodeMunch tool call, not a file read. If you see neither, the troubleshooting notes are in CLIENTS.md.

Using it at work? Personal and other non-commercial use is free. Work use at a for-profit company, or for client or paid work, needs a license, paid once: see the prices.