Skip to main content
Glama
Tox Testing MCP Server
by that1guy15

Servidor MCP de pruebas de toxinas

Un servidor MCP que ejecuta comandos tox para ejecutar pruebas de Python en un proyecto con pytest. Este servidor proporciona una forma práctica de ejecutar y administrar pruebas de Python mediante el Protocolo de Contexto de Modelo (MCP).

Características

Herramientas

  • run_tox_tests - Ejecuta pruebas toxicológicas con varios modos y opciones

    • Admite diferentes modos de ejecución:

      • all : Ejecutar todas las pruebas o pruebas de un grupo específico

      • file : Ejecutar pruebas desde un archivo específico

      • case : Ejecutar un caso de prueba específico

      • directory : ejecuta todas las pruebas en un directorio específico

    • Grupos de prueba admitidos:

      • clients : Pruebas relacionadas con el cliente

      • api : pruebas de puntos finales de API

      • auth : Pruebas de autenticación

      • uploads : Pruebas de funcionalidad de carga

      • routes : Pruebas del controlador de rutas

Related MCP server: MCP Pytest Server

Desarrollo

Instalar dependencias:

npm install

Construir el servidor:

npm run build

Para desarrollo con reconstrucción automática:

npm run watch

Instalación

Para usar con VSCode, agregue la configuración del servidor a su archivo de configuración de MCP en: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

{
  "mcpServers": {
    "tox-testing": {
      "command": "node",
      "args": ["/path/to/tox-testing/build/index.js"],
      "env": {
        "TOX_APP_DIR": "/path/to/your/python/project",
        "TOX_TIMEOUT": "600"
      }
    }
  }
}

Opciones de configuración

  • env.TOX_TIMEOUT : (Opcional) Tiempo máximo en segundos de espera para que se complete la ejecución de la prueba. Si una prueba tarda más de este tiempo límite, se finalizará. El valor predeterminado es 600 segundos (10 minutos).

  • env.TOX_APP_DIR : (Obligatorio) Directorio que contiene el archivo tox.ini. Desde aquí se ejecutarán los comandos tox. La ruta debe apuntar a la raíz de su proyecto Python, donde se encuentra tox.ini.

El tiempo de espera es particularmente importante para:

  • Prevención de procesos de prueba bloqueados

  • Gestión de pruebas de integración de larga duración

  • Cómo garantizar que las canalizaciones de CI/CD no se atasquen

Uso

El servidor proporciona una única herramienta, run_tox_tests que se puede utilizar en diferentes modos:

Argumentos de herramientas

// Run all tests
{
  "mode": "all"
}

// Run tests from a specific group
{
  "mode": "all",
  "group": "api"
}

// Run tests from a specific file
{
  "mode": "file",
  "testFile": "tests/test_api.py"
}

// Run a specific test case
{
  "mode": "case",
  "testFile": "tests/test_api.py",
  "testCase": "test_endpoint_response"
}

// Run tests from a specific directory
{
  "mode": "directory",
  "directory": "tests/api/"
}

Uso con Cline

Al usar este MCP con Cline, puede configurar las instrucciones personalizadas de Cline para gestionar la ejecución de pruebas de forma eficiente. A continuación, se recomienda un flujo de trabajo:

If asked to run tests on the project, use the tox-testing MCP. Follow these steps:
1. Run all tests across the project unless you are given instructions to run a specific test file or test case. 
2. Review and rerun each failed test case individually as you troubleshoot and fix the issue from its output.
3. Repeat step 2 until the testcase passes.
4. Once all failed test cases from step 1 are passing rerun all tests again and repeat all steps until all tests pass.

Este flujo de trabajo garantiza:

  • Cobertura de pruebas integral ejecutando todas las pruebas primero

  • Depuración enfocada mediante el aislamiento de casos de prueba fallidos

  • Verificación de correcciones mediante la repetición de pruebas en casos individuales

  • Validación final ejecutando nuevamente todas las pruebas

Ejemplos de interacciones con Cline:

You: Run the tests for this project
Cline: I'll use the tox-testing MCP to run all tests:
{
  "mode": "all"
}

You: Fix the failing test in test_api.py
Cline: I'll first run the specific test file:
{
  "mode": "file",
  "testFile": "tests/test_api.py"
}
Then address each failing test case individually:
{
  "mode": "case",
  "testFile": "tests/test_api.py",
  "testCase": "test_endpoint_response"
}

Contribuyendo

Consulte CONTRIBUTING.md para obtener detalles sobre nuestro código de conducta y el proceso para enviar solicitudes de extracción.

Available Tools

1 tool
run_tox_testsC

Run tox tests with different modes and options

Inputs: mode (required), directory, group, testFile, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility of ambiguity or overlap between tools, making disambiguation perfect. The single tool has a clear and distinct purpose that cannot be confused with any other tool in the set.

    Naming Consistency5/5

    Since there is only one tool, naming consistency is inherently perfect as there are no other tools to compare it against. The tool name 'run_tox_tests' follows a clear verb_noun pattern, which is consistent with itself.

    Tool Count2/5

    A single tool is generally too few for most server purposes, as it limits functionality and flexibility, making the server feel thin and underdeveloped. While it might suffice for a very narrow scope, it often indicates a lack of comprehensive coverage for the domain.

    Completeness2/5

    With only one tool, the server is severely incomplete for the domain of tox testing, as it lacks essential operations such as configuring environments, listing tests, checking results, or managing dependencies. This minimal surface will likely cause agent failures when more complex tasks are required.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      F
      maintenance
      An MCP server that enables AI assistants to discover and execute Nox sessions for project automation tasks like testing, linting, and building. It provides tools to list available sessions and run them using specific Python versions, tags, or keyword expressions.
      2
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP-compliant server that enables the execution of pytest test suites and the storage of results into a QA platform database. It allows AI models to trigger test runs, track execution progress, and retrieve historical test data through specialized tool interfaces.
      1
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      This MCP server enables automated maintenance and code analysis for Python/pytest repositories in isolated Docker environments. It supports read-only investigations, fix-and-verify tasks, and provides full audit trails with SQLite event history and artifact exports.
      MIT