Metadata-Version: 2.4
Name: codex-mcp-eraser
Version: 0.0.3
Summary: Safely remove user-configured MCP servers and hooks from Codex CLI
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# 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:

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

Install the package inside it:

```bash
python -m pip install codex-mcp-eraser
```

## Use

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

```bash
codex-mcp-eraser
codex-mcp-eraser --apply
```

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

```bash
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:

```bash
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:

```bash
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:

```bash
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):

```bash
./build-package.sh
```
