mcp-codex-allowlist
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-codex-allowlist what codex commands am I allowed to run in this project?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-codex-allowlist
Read-only MCP server that exposes Codex command execution rules so an agent can inspect the user's pre-approved command rules before acting.
Overview
The server reads direct *.rules files from the user Codex home and a project’s
.codex/rules/ directory. It preserves each source file, its path, and scope.
The combined tool returns global and project files in that order without
deduplicating or interpreting rules.
The Python package source is in mcp_codex_allowlist/.
This is a view of the rule files, not effective policy. Codex also applies approval and sandbox settings, managed policy, and project trust. Project rules are only active when Codex trusts the project.
Related MCP server: workflow-guard-mcp
Installation
Requires Python 3.10+ and pipx.
git clone https://github.com/jewzaam/mcp-codex-allowlist.git
cd mcp-codex-allowlist
make install-pipx
codex mcp add allowlist -- mcp-codex-allowlistFor a non-default Codex home, pass it to the server process:
codex mcp add allowlist --env CODEX_HOME=/path/to/codex-home -- mcp-codex-allowlistThe default is ~/.codex.
Usage
Tool | Returns |
| User-level rules from |
| Project rules from |
| Both scopes, with per-file scope and source path. |
The two project tools accept an optional project_dir; if omitted, the server
uses its current working directory. Each result's count fields count rule
files, not individual rules. The files can contain allow, prompt, or
forbidden decisions.
Development
make install-dev
make checkAvailable Tools
3 toolsget_codex_exec_rulesB
Read user and project rule files with their source scope and paths.
Files can contain allow, prompt, and forbidden rules. This tool does not compute effective policy from approval settings, sandbox settings, managed policy, or project trust.
Inputs: project_dir. Returns: object
get_global_exec_rulesA
Read user rules from $CODEX_HOME/rules/*.rules (default ~/.codex).
Inputs: no named parameters. Returns: object
get_local_exec_rulesB
Read rules from the project .codex/rules directory for trusted projects.
Inputs: project_dir. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
get_global_exec_rules and get_local_exec_rules are distinct scopes, but get_codex_exec_rules is effectively a superset that reads both, so an agent can often just call the aggregate and the other two become redundant. Descriptions help clarify scope differences, but the boundary between 'both scoped reads' and 'combined read' invites miselection.
All three follow the same snake_case get_<scope>_exec_rules pattern, with only the scope token varying (global/local/codex). Fully predictable.
Three focused read tools are reasonable for an inspection-only rules surface, though the combined tool makes the set feel slightly redundant. Nothing extraneous, but arguably two tools would suffice.
The surface is read-only: no tools to add, modify, or remove allow/prompt/forbidden rules, and effective policy computation is explicitly disclaimed. For an allowlist server, the absence of any write or policy-resolution operation is a significant gap that will block manage-allowlist workflows.
Maintenance
Related MCP Connectors
Deterministic allow/require_approval/deny verdicts for agent actions, before they happen.
Git-native policy layer for AI agents: check_action verdicts against rules approved via PR.
The system of record for AI agent authority: playbooks, routed policy questions, reusable rules.
Read-only catalog of prompt packs and rule files: Cursor, CLAUDE.md, AGENTS.md, SKILL.md.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI agents with queryable, version-controlled project rules and coding standards. Enables validation, rule-based guidance, and task summaries to keep AI work aligned with your project's conventions without repeating context.2MIT
- AlicenseAqualityFmaintenanceEnables agentic coding clients to enforce portable policy guardrails by evaluating proposed shell, file write, git, and network actions and returning allow, deny, or ask decisions.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables autonomous coding agents to just-in-time retrieve scoped architecture contracts and task-specific P0/P1 rules before reading or writing files, record troubleshooting findings from test failures, revoke or downgrade stale short-term rules, propose long-term contract changes for human approval, and list active rules per project and task. Supports multi-project and multi-worktree workflows over MCP with SQLite-backed storage.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to read only explicitly allowlisted Linux project files and selected Codex conversation turns. It supports listing projects and files, reading UTF-8 files, bounded text search, and paged reading of authorized conversations.MIT