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 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.4

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.4
File Size Uploaded Provenance Actions
codex_mcp_eraser-0.0.4.tar.gz 7.7 kB Without provenance Details for codex_mcp_eraser-0.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 13.8 kB

Release files / codex_mcp_eraser-0.0.4.tar.gz

Download URL codex_mcp_eraser-0.0.4.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6a5a884e130ab5402e59235d3b02b1f1bd333b07087899901c03f1ba58c86941
BLAKE2b-256 checksum
How to use checksums
484cbc70239ab5ab959bceb5e414b27b15c60cb8d85b06547bd47031f4658009
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.4-py3-none-any.whl

Download URL codex_mcp_eraser-0.0.4-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
418c1250b92ff26b81a1753972619a9e63aaca073e8cda5a45eaf1540a3feaa5
BLAKE2b-256 checksum
How to use checksums
cad2055b9f356630ecf964205af6d409c47b289707540bf448553ad6b46703cd
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.4

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