Configure the Gitopia MCP Server for use with OpenAI Codex CLI.
codex mcp add gitopia -- docker run --rm -i --platform linux/amd64 \
-v "${HOME}/.mcp/gitopia:/home/mcp/.mcp/gitopia" \
-e MCP_WORKSPACE_PATH=/home/mcp/.mcp/gitopia/workspace \
ghcr.io/gitopia/gitopia-mcp-server:latest stdioUse the full path to the server binary (relative paths won't work outside the install directory). Requires git-remote-gitopia for git clone/push (curl https://get.gitopia.com | bash):
codex mcp add gitopia -- /path/to/gitopia-mcp-server stdioOr with environment variables:
codex mcp add gitopia \
--env TRUST_LEVEL=chainwrite \
--env MCP_WORKSPACE_PATH=/tmp/gitopia-workspace \
-- /path/to/gitopia-mcp-server stdioEdit ~/.codex/config.toml (global) or .codex/config.toml (project-scoped):
[mcp_servers.gitopia]
command = "docker"
args = [
"run", "--rm", "-i", "--platform", "linux/amd64",
"-v", "${HOME}/.mcp/gitopia:/home/mcp/.mcp/gitopia",
"-e", "MCP_WORKSPACE_PATH=/home/mcp/.mcp/gitopia/workspace",
"ghcr.io/gitopia/gitopia-mcp-server:latest", "stdio"
][mcp_servers.gitopia]
command = "/path/to/gitopia-mcp-server"
args = ["stdio"]
[mcp_servers.gitopia.env]
TRUST_LEVEL = "chainwrite"
MCP_WORKSPACE_PATH = "/tmp/gitopia-workspace"
MCP_LOG_LEVEL = "info"After adding the server:
- Run
/mcpin the Codex TUI to confirmgitopiashows tools - Test with: "List all repositories for the gitopia organization"
- Codex should call
list_reposand return results
To use an existing Gitopia wallet, add the mnemonic as an environment variable:
codex mcp add gitopia \
--env GITOPIA_MNEMONIC="your 24 word mnemonic here" \
--env TRUST_LEVEL=chainwrite \
-- ./server stdioOr in config.toml:
[mcp_servers.gitopia.env]
GITOPIA_MNEMONIC = "your 24 word mnemonic here"If no mnemonic is provided, a new wallet is auto-generated on first use.
| Level | Access |
|---|---|
readonly |
Query operations only (list repos, issues, PRs, tags, commits, releases, labels) |
localwrite |
Readonly + local file/git operations (write, add, commit, clone) |
chainwrite |
Full access including on-chain transactions (default) |