Skip to main content

Codex MCP eraser

A Python command-line tool that removes user-configured MCP server tables and hooks from Codex CLI configuration. It does not modify plugin settings or managed policies. Requires Python 3.11 or later.

Install

Create and activate a virtual environment:

python3 -m venv .venv
source .venv/bin/activate

Install the package inside it:

python -m pip install codex-mcp-eraser

Use

The default is a dry run. Review the reported files before applying changes:

codex-mcp-eraser
codex-mcp-eraser --apply

Dry runs print complete current and planned file contents. Use --summary-only to show the affected paths and actions without printing file contents:

codex-mcp-eraser --summary-only

Applying changes prompts for confirmation. Add --yes to skip that prompt:

codex-mcp-eraser --apply --yes

By default, the tool checks CODEX_HOME or ~/.codex. Use --codex-home PATH to select another Codex configuration directory. Repeat --project PATH to also check multiple projects' .codex/ directories:

codex-mcp-eraser --codex-home ~/.codex \
  --project /path/to/project-one --project /path/to/project-two

The tool removes only the MCP server named sheriff from config.toml, removes hooks.json in the checked directories, and removes the Sheriff-managed instruction block from the user Codex home's AGENTS.md when present. Other configured MCP servers and surrounding AGENTS.md content are preserved. Before applying changes, it creates a backup under the user Codex home directory with restricted permissions. It does not modify plugin settings or managed policies.

Run from a checkout

After installing the package in the active virtual environment, you can also run it as a module:

python -m codex_mcp_eraser

The source checkout includes codex_mcp_eraser_launcher.py and the legacy eraser.py launcher.

Development

With the virtual environment active, run the unit tests with:

python -m unittest discover -s tests -v

Build and check the package with the repository script (it creates a temporary virtual environment for the build):

./build-package.sh

Metadata

Release files for codex-mcp-eraser 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codex-mcp-eraser 0.0.6
File Size Uploaded Provenance Actions
codex_mcp_eraser-0.0.6.tar.gz 8.3 kB Without provenance Details for codex_mcp_eraser-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for codex-mcp-eraser 0.0.6
File Interpreter ABI Platform Actions
codex_mcp_eraser-0.0.6-py3-none-any.whl Python 3 none any Details for codex_mcp_eraser-0.0.6-py3-none-any.whl

Total release size: 14.6 kB

Release files / codex_mcp_eraser-0.0.6.tar.gz

Download URL codex_mcp_eraser-0.0.6.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9a0f0d9014b76da5c5d8ea172763040b156cef1b5c94109a2299d1c913c4c5e5
BLAKE2b-256 checksum
How to use checksums
453645e1956381176167b2c9b8e74d6813d6022dd6386ebdd01cea2c05c54a46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / codex_mcp_eraser-0.0.6-py3-none-any.whl

Download URL codex_mcp_eraser-0.0.6-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eec605cfee47b7f9d3c420caf7e8c02d22cd7e4cda1b0e5e3cc84bfc0ae32695
BLAKE2b-256 checksum
How to use checksums
cd886d0297e1ae8df13705aa6b68477801bec740afa30007c602cf24772d19ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for codex-mcp-eraser 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page