Mutmut MCP
A Model Context Protocol (MCP) server for managing mutation testing with mutmut. This tool provides a set of programmatic APIs for running mutation tests, analyzing results, and improving test coverage in Python projects.
Features
Run mutation testing sessions on any Python module or package
Show overall mutation testing results and surviving mutations
Suggest areas needing better test coverage
Rerun mutmut on specific survivors or all survivors
Clean mutmut cache
Designed for automation and integration with other MCP tools
Related MCP server: MCP Server Python Template
Installation
Clone the repository:
git clone https://github.com/wdm0006/mutmut-mcp.git cd mutmut-mcpInstall dependencies:
python3 -m venv .venv source .venv/bin/activate pip install -U pip pip install mcp[cli] mutmut
Usage
You can run the MCP server directly:
Or use with uv:
API / Tools
The following tools are available:
run_mutmut(target, test_command="pytest", options="", venv_path=None)– Run mutation testingshow_results(venv_path=None)– Show overall resultsshow_survivors(venv_path=None)– List surviving mutationsgenerate_test_suggestion(venv_path=None)– Suggest areas needing better test coveragererun_mutmut_on_survivor(mutation_id=None, venv_path=None)– Rerun mutmut on survivorsclean_mutmut_cache(venv_path=None)– Clean mutmut cache
License
This project is licensed under the MIT License. See LICENSE for details.