Mutmut MCP
Mutmut MCP
Сервер Model Context Protocol (MCP) для управления мутационным тестированием с помощью mutmut. Этот инструмент предоставляет набор программных API для запуска мутационных тестов, анализа результатов и улучшения покрытия тестами в Python-проектах.
Возможности
Запуск сеансов мутационного тестирования для любого модуля или пакета Python
Показ общих результатов мутационного тестирования и выживших мутаций
Предложение областей, требующих лучшего покрытия тестами
Повторный запуск mutmut для конкретных выживших мутантов или всех выживших
Очистка кэша mutmut
Предназначен для автоматизации и интеграции с другими MCP-инструментами
Related MCP server: MCP Python Server
Установка
# 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.pyУстановка через Smithery
Чтобы автоматически установить mutmut-mcp для Claude Desktop через Smithery:
npx -y @smithery/cli install @wdm0006/mutmut-mcp --client claudeКонфигурация MCP-клиента
{
"mcpServers": {
"mutmut": {
"command": "uvx",
"args": ["--from", "git+https://github.com/wdm0006/mutmut-mcp", "mutmut-mcp"]
}
}
}API / Инструменты
Доступны следующие инструменты:
run_mutmut(target, options="", venv_path=None, project_path=None)– Запустить сеанс мутационного тестирования для целиshow_results(venv_path=None, project_path=None)– Показать общие результатыshow_survivors(venv_path=None, project_path=None)– Перечислить выжившие мутации, а также помеченный раздел для мутантов, не покрытых тестамиrerun_mutmut_on_survivor(mutation_id=None, venv_path=None, project_path=None)– Повторно запустить mutmut для конкретного выжившего мутанта или всех выжившихclean_mutmut_cache(venv_path=None, project_path=None)– Очистить кэш mutmutshow_mutant(mutation_id, venv_path=None, project_path=None)– Показать diff и сведения для конкретного мутантаprioritize_survivors(venv_path=None, project_path=None)– Ранжировать непокрытые мутанты и выжившие мутанты по вероятной значимости
project_path
Каждый инструмент принимает необязательный параметр project_path: каталог, содержащий конфигурацию mutmut проекта ([mutmut] source_paths= в setup.cfg / pyproject.toml), его исходный код, его тесты и каталог состояния mutants/ от mutmut. Mutmut запускается с этим каталогом в качестве рабочего, а clean_mutmut_cache удаляет состояние только внутри него.
Передавайте его, когда сервер был запущен не из каталога проекта — это типично для настольных MCP-клиентов и uvx. Если параметр опущен, инструменты используют рабочий каталог серверного процесса, поэтому существующие вызовы работают как раньше. Если project_path не является существующим каталогом, возвращается ошибка без запуска mutmut или удаления каких-либо данных.
venv_path
venv_path указывает на виртуальное окружение, содержащее mutmut проекта (инструменты используют <venv>/bin/mutmut или <venv>\Scripts\mutmut.exe в Windows); если параметр опущен, mutmut берется из PATH. Относительный venv_path разрешается относительно project_path, когда указаны оба параметра, поэтому обычная форма .venv работает:
{ "project_path": "/home/me/src/myproject", "venv_path": ".venv" }Лицензия
Этот проект распространяется под лицензией MIT. Подробности см. в LICENSE.
Available Tools
7 toolsclean_mutmut_cacheB
Clean mutmut cache using the mutmut CLI (if available), otherwise remove .mutmut-cache file. Returns the plain text output or confirmation message.
Inputs: venv_path. Returns: result
prioritize_survivorsA
Prioritize surviving mutants by likely materiality, filtering out log/debug-only changes and ranking by potential impact. Returns a sorted list of survivors with reasons for prioritization.
Inputs: venv_path. Returns: object
rerun_mutmut_on_survivorB
Rerun mutmut on specific surviving mutations or all survivors after test updates using the mutmut CLI. Returns the plain text output.
Inputs: mutation_id, venv_path. Returns: result
run_mutmutA
Run a full mutation testing session with mutmut on the specified target.
This tool initiates mutation testing on the given module or package. You can provide additional mutmut options as needed. The output includes a summary of mutations tested, including counts of killed, survived, and timed-out mutations. If a virtual environment path is provided, mutmut will be run using the binaries from that environment to ensure compatibility with project-specific dependencies.
Args: target (str): The module or package to run mutation testing on. options (str): Additional command-line options for mutmut (e.g., '--use-coverage'). Defaults to empty. venv_path (Optional[str]): Path to the project's virtual environment to use for running mutmut. Defaults to None.
Returns: str: Summary of the mutation testing run, or error message if the run fails.
Inputs: target (required), options, venv_path. Returns: result
show_mutantB
Show the code diff and details for a specific mutant using mutmut show. Args: mutation_id (str): The ID of the mutant to show. venv_path (Optional[str]): Path to the virtual environment, if any. Returns: str: The output of 'mutmut show <mutation_id>'.
Inputs: mutation_id (required), venv_path. Returns: result
show_resultsC
Display overall results from the last mutmut run using the mutmut CLI. Returns the plain text output.
Inputs: venv_path. Returns: result
show_survivorsC
List details of surviving mutations from the last mutmut run using the mutmut CLI. Returns the plain text output.
Inputs: venv_path. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a distinct purpose: run_mutmut initiates testing, show_results displays overall results, show_survivors lists survivors, show_mutant shows specific mutant details, rerun_mutmut_on_survivor retests survivors, prioritize_survivors ranks survivors, and clean_mutmut_cache manages cache. There is no overlap or ambiguity in functionality.
All tools follow a consistent snake_case naming pattern with clear verb_noun structures (e.g., run_mutmut, show_results, clean_mutmut_cache). The naming is predictable and readable throughout the set.
With 7 tools, this server is well-scoped for mutation testing with mutmut. Each tool serves a specific role in the workflow, from running tests to analyzing results, without being overly sparse or bloated.
The tool set provides complete coverage for the mutmut domain: it includes core testing (run_mutmut), result inspection (show_results, show_survivors, show_mutant), survivor management (rerun_mutmut_on_survivor, prioritize_survivors), and maintenance (clean_mutmut_cache). There are no obvious gaps in the mutation testing lifecycle.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables AI assistants like Claude to perform Python development tasks through file operations, code analysis, project management, and safe code execution.9MIT
- FlicenseNot gradedqualityDmaintenanceA Python-based implementation of the Model Context Protocol that enables communication between a model context management server and client through a request-response architecture.-
- AlicenseAqualityBmaintenanceA Model Context Protocol server that allows LLMs to interact with Python environments, execute code, and manage files within a specified working directory.10784 PyPI104MIT
- FlicenseAqualityNot gradedmaintenanceA Model Context Protocol server that allows LLMs to interact with Python environments, enabling code execution, file operations, package management, and development workflows.9-