Set up MIMRY for Codex
Connect Codex to MIMRY's local repository index, then install a project skill that makes focused context retrieval the first step of repo work.
Install and connect
Install MIMRY
uv tool install mimry mimry --versionPython 3.11 or newer is required.
pipx install mimryis also supported.Register the MCP server
codex mcp add mimry -- mimry-mcp codex mcp get mimry --jsonMIMRY's integration smoke test uses these Codex CLI commands and checks that the stdio transport is enabled with the expected command.
Install the project workflow
cd /path/to/your/repo mimry install --project --platform codex --always-on --hooks mimry install --project --platform codex --statusThe project install writes the skill and reference files under
.codex/skills/mimry/.--always-onadds the MIMRY rules block toAGENTS.md;--hooksadds a reminder on broad searches to.codex/hooks.json, answers searches for known symbols with their definition and callers, and refreshes the index in the background when a session starts and after each edit. Codex runs project hooks after you trust them with/hooks. Review generated files before committing them.Start with the task, not a directory scan
mimry preflight "trace session expiry from API to database" # Read .mimry/mimry-out/context/latest.mdPreflight initializes an unconfigured repo, refreshes stale data, ranks relevant files, and writes a compact context pack. The current repo source remains the final authority.
Verify and repair
| Check | Command | What it proves |
|---|---|---|
| MCP entry | codex mcp get mimry --json | Codex has an enabled stdio server entry. |
| Project files | mimry install --project --platform codex --status | The skill, references, and version are present and current, and a partly installed hook needs repair. A skill or always-on block written by an older MIMRY is reported as out of date. Exit 0 when healthy, 1 when not installed, 2 when it needs repair. |
| Repo context | mimry preflight "<specific task>" | The index is usable and a task context pack was written. |
Repair: rerun the install command if status reports missing references. To remove the project integration, run mimry uninstall --project --platform codex --always-on --hooks. Remove the MCP entry separately with codex mcp remove mimry.
Use the result safely
- Open files in the pack's suggested reading order.
- Use exact search (
rgorgit grep) when you already know an identifier or error string. - Use MIMRY's relationship tools for exploratory navigation and explain surprising rankings with
mimry why. - Verify every change with source, tests, and build output.
Continue with how MIMRY retrieves and ranks context, or see the Claude Code setup guide.