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

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. Add --project PATH to also check that project's .codex/ directory:

codex-mcp-eraser --codex-home ~/.codex --project /path/to/project

The tool removes only the MCP server named sheriff from config.toml and removes hooks.json in the checked directories. Other configured MCP servers 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.3

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.3
File Size Uploaded Provenance Actions
codex_mcp_eraser-0.0.3.tar.gz 6.9 kB Without provenance Details for codex_mcp_eraser-0.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 12.6 kB

Release files / codex_mcp_eraser-0.0.3.tar.gz

Download URL codex_mcp_eraser-0.0.3.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2bb6f407b677d13761bc282404a618db72832e320e7948c4034701d35e0bfb86
BLAKE2b-256 checksum
How to use checksums
2716337651c18e408bc72ccec347eb267c7ea4466c14f7b3ab8c81bc087cdbb3
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.3-py3-none-any.whl

Download URL codex_mcp_eraser-0.0.3-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efe437a305588ee2dd7a7d97568b4d457e300649c4d4a517414402804939c36f
BLAKE2b-256 checksum
How to use checksums
20a50f2210a26444612433d044e64397e792b3b4c2121a776f48c90822308de2
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.3

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