Skip to main content
Glama

Mutmut MCP

Model Context Protocol(MCP) 서버로, mutmut를 사용한 변이 테스트를 관리합니다. 이 도구는 Python 프로젝트에서 변이 테스트를 실행하고 결과를 분석하며 테스트 커버리지를 개선하는 프로그래밍 방식의 API 세트를 제공합니다.

기능

  • 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를 통한 설치

Claude Desktop용 mutmut-mcp를 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) – mutmut 캐시를 정리합니다.

  • show_mutant(mutation_id, venv_path=None, project_path=None) – 특정 변이에 대한 코드 diff와 세부 정보를 표시합니다.

  • prioritize_survivors(venv_path=None, project_path=None) – 테스트되지 않은 변이와 생존 변이를 예상 중요도에 따라 순위를 매깁니다.

project_path

모든 도구는 선택적 project_path를 허용합니다. project_path는 프로젝트의 mutmut 구성(setup.cfg / pyproject.toml의 [mutmut] source_paths=), 소스, 테스트, 그리고 mutmut의 mutants/ 상태 디렉터리를 포함하는 디렉터리입니다. mutmut는 해당 디렉터리를 작업 디렉터리로 사용하며, clean_mutmut_cache는 그 내부의 상태만 제거합니다.

서버가 프로젝트 디렉터리에서 시작되지 않은 경우(데스크톱 MCP 클라이언트와 uvx에서 일반적) 이 값을 전달하세요. 생략하면 도구는 서버 프로세스의 작업 디렉터리로 대체되므로 기존 호출은 이전과 동일하게 동작합니다. 존재하지 않는 디렉터리를 가리키는 project_path는 mutmut를 실행하거나 아무것도 삭제하지 않고 오류를 반환합니다.

venv_path

venv_path는 프로젝트의 mutmut가 있는 가상 환경을 가리킵니다(도구는 <venv>/bin/mutmut 또는 Windows에서는 <venv>\Scripts\mutmut.exe를 사용합니다). 생략하면 mutmut는 PATH에서 가져옵니다. 상대 경로 venv_path는 project_path와 둘 다 주어질 때 project_path 기준으로 해석되므로 일반적인 .venv 형식이 작동합니다:

{ "project_path": "/home/me/src/myproject", "venv_path": ".venv" }

라이선스

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 LICENSE를 참조하세요.

Available Tools

7 tools
clean_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

    A3.7/5.0

    Scored across 7 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      A 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.
      9
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Python-based implementation of the Model Context Protocol that enables communication between a model context management server and client through a request-response architecture.
      -
    • F
      license
      A
      quality
      Not graded
      maintenance
      A Model Context Protocol server that allows LLMs to interact with Python environments, enabling code execution, file operations, package management, and development workflows.
      9
      -