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

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.5
File Size Uploaded Provenance Actions
codex_mcp_eraser-0.0.5.tar.gz 8.3 kB Without provenance Details for codex_mcp_eraser-0.0.5.tar.gz

Built distribution (wheel)

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

Total release size: 14.6 kB

Release files / codex_mcp_eraser-0.0.5.tar.gz

Download URL codex_mcp_eraser-0.0.5.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
53faaa3c039b8e3bdcae4d63adc1ebd5f0a406160fd74e861b997869c3025c00
BLAKE2b-256 checksum
How to use checksums
2751822c70449c969588c7f4e3cd1fcba3446cb5a896b21e904b7ccd3575b4b7
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.5-py3-none-any.whl

Download URL codex_mcp_eraser-0.0.5-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd0a6026973a3869ed77faef9156e569a5c72be6a4d9023ece2ebdf023820bc2
BLAKE2b-256 checksum
How to use checksums
1718656886e8bc083d2b6950dc7cd3092311f8d2334fd84649923eb46940617d
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.5

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