Skip to main content

Prerequisites

Setup

1

Add MCP server

Option A: CLI command (recommended)
codex mcp add leeroopedia --env LEEROOPEDIA_API_KEY=kpsk_your_key_here -- uvx leeroopedia-mcp
Option B: Edit ~/.codex/config.toml directly
[mcp_servers.leeroopedia]
command = "uvx"
args = ["leeroopedia-mcp"]

[mcp_servers.leeroopedia.env]
LEEROOPEDIA_API_KEY = "kpsk_your_key_here"
uvx auto-downloads and runs the package. No pip install needed. It also auto-updates to the latest version.
Getting spawn uvx ENOENT? Codex can’t find uvx in its PATH. Run which uvx (or where uvx on Windows) in your terminal to get the full path, then replace "uvx" with it in your config (e.g. command = "/home/username/.local/bin/uvx").
If you don’t have uv, install manually first:
pip install leeroopedia-mcp
Then use leeroopedia-mcp as the command:
[mcp_servers.leeroopedia]
command = "leeroopedia-mcp"

[mcp_servers.leeroopedia.env]
LEEROOPEDIA_API_KEY = "kpsk_your_key_here"
2

Verify the connection

Run codex mcp list or type /mcp in the Codex TUI. You should see the leeroopedia server listed and connected.

Try It Out

Ask Codex something like:
“Use leeroopedia to search for best practices for QLoRA fine-tuning.”
The agent will call search_knowledge and return a synthesized answer with [PageID] citations. You can then follow up with:
“Get the full page for [PageID] that was cited.”

Optional: Add the Agent Skill File

You can add an optional skill file that teaches Codex when and how to pick the right Leeroopedia tool. This improves tool selection, encourages parallel searches, and provides canonical workflows for common tasks. Download SKILL.md and paste its contents into your project’s AGENTS.md file (create one if it doesn’t exist). Codex reads this file automatically at the start of every session.
This step is optional. The MCP tools work without the skill file. The skill file just helps the agent make better tool choices automatically.

Next Steps