Mutmut MCP
This server provides a programmatic interface for running and managing mutation testing in Python projects using mutmut. Here's what you can do:
Run mutation tests (
run_mutmut): Execute a full mutation testing session on a specified Python module or package, with optional CLI flags and virtual environment support.Show overall results (
show_results): Display a summary of the last mutmut run, including counts of killed, survived, and timed-out mutations.List surviving mutations (
show_survivors): Retrieve details about mutations that survived (i.e., were not caught by your tests).Inspect a specific mutant (
show_mutant): View the code diff and details for a particular mutant by its ID.Rerun tests on survivors (
rerun_mutmut_on_survivor): Re-execute mutmut on a specific surviving mutant or all survivors after updating tests.Prioritize survivors (
prioritize_survivors): Rank surviving mutants by likely materiality/impact, filtering out low-value changes (e.g., log/debug-only mutations) to focus on the most important test coverage gaps.Clean the mutmut cache (
clean_mutmut_cache): Remove the mutmut cache to start fresh.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mutmut MCPrun mutation testing on my utils module"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 Python Server
Install
# Run directly from GitHub (no install needed)
uvx --from git+https://github.com/wdm0006/mutmut-mcp mutmut-mcp
# Or install from source
git clone https://github.com/wdm0006/mutmut-mcp
cd mutmut-mcp
uv sync
uv run mutmut_mcp.pyInstalling via Smithery
To install mutmut-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @wdm0006/mutmut-mcp --client claudeMCP Client Configuration
{
"mcpServers": {
"mutmut": {
"command": "uvx",
"args": ["--from", "git+https://github.com/wdm0006/mutmut-mcp", "mutmut-mcp"]
}
}
}API / Tools
The following tools are available:
run_mutmut(target, options="", venv_path=None, project_path=None)– Run a mutation testing session on the targetshow_results(venv_path=None, project_path=None)– Show overall resultsshow_survivors(venv_path=None, project_path=None)– List surviving mutationsrerun_mutmut_on_survivor(mutation_id=None, venv_path=None, project_path=None)– Rerun mutmut on a specific survivor or all survivorsclean_mutmut_cache(venv_path=None, project_path=None)– Clean mutmut cacheshow_mutant(mutation_id, venv_path=None, project_path=None)– Show the code diff and details for a specific mutantprioritize_survivors(venv_path=None, project_path=None)– Rank surviving mutants by likely materiality
project_path
Every tool accepts an optional project_path: the directory containing the project's mutmut
configuration ([mutmut] paths_to_mutate= in setup.cfg / pyproject.toml), its source, its
tests, and mutmut's mutants/ state directory. Mutmut runs with that directory as its working
directory, and clean_mutmut_cache removes state only from inside it.
Pass it whenever the server was not launched from the project directory — which is typical for
desktop MCP clients and uvx. Omitted, the tools fall back to the server process's working
directory, so existing calls behave as before. A project_path that is not an existing directory
returns an error without running mutmut or deleting anything.
venv_path
venv_path points at the virtual environment holding the project's mutmut (the tools use
<venv>/bin/mutmut, or <venv>\Scripts\mutmut.exe on Windows); omitted, mutmut is taken from
PATH. A relative venv_path is resolved against project_path when both are given, so the
common .venv form works:
{ "project_path": "/home/me/src/myproject", "venv_path": ".venv" }License
This project is licensed under the MIT License. See LICENSE for details.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wdm0006/mutmut-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server