Token导航 LogoToken导航TokenDH.com
Tox Testing MCP logo
开发工具stdio官方级别未说明来源级核验

Tox Testing MCP

MCP Server

一个通过MCP协议执行tox命令来运行和管理Python测试的服务,支持多种测试模式和分组。

工具数

1

提示词数

0

GitHub Stars

5

资源数

0
开发工具JavaScriptClaude自动化测试ClaudeCline

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

that1guy15

提供方

that1guy15

最后核验

2026/5/17 20:42

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Tox测试MCP服务器

一个MCP服务器,它执行tox命令,使用pytest在项目中运行python测试。此服务器提供了一种通过模型上下文协议(MCP)运行和管理python测试的便捷方式。

特性

工具

  • run_tox_tests -使用各种模式和选项执行毒性测试

- 支持不同的执行模式: - all:运行所有测试或特定组中的测试 - file:从特定文件运行测试 - case:运行特定的测试用例 - directory:在指定目录中运行所有测试 - 支持的测试组: - clients:客户相关测试 - api:API端点测试 - auth:身份验证测试 - uploads:上传功能测试 - routes:路由处理程序测试

发展

安装依赖项:

npm install

构建服务器:

npm run build

对于自动重建的开发:

npm run watch

安装

要与VSCode一起使用,请将服务器配置添加到MCP设置文件中: ~/.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"
      }
    }
  }
}

配置选项

  • env.TOX_TIMEOUT:(可选)等待测试执行完成的最长时间(秒)。如果测试运行的时间超过此超时时间,则将终止。默认值为600秒(10分钟)
  • env.TOX_APP_DIR:(必需)包含tox.ini文件的目录。这是执行tox命令的地方。路径应指向tox.ini所在的Python项目的根目录。

超时对于以下情况尤为重要:

  • 防止测试过程挂起
  • 管理长时间运行的集成测试
  • 确保CI/CD管道不会卡住

用法

服务器提供单一工具 run_tox_tests 其可用于不同的模式:

工具参数

// 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/"
}

与Cline一起使用

当将此MCP与Cline一起使用时,您可以配置Cline的自定义指令以有效地处理测试执行。以下是推荐的工作流程:

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.

此工作流程可确保:

  • 首先运行所有测试,实现全面的测试覆盖
  • 通过隔离失败的测试用例进行集中调试
  • 通过重新测试单个案例来验证修复
  • 通过再次运行所有测试进行最终验证

与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"
}

贡献

请看 贡献.md 有关我们的行为准则和提交pull请求流程的详细信息。

目录标签

目录标签

开发工具JavaScriptClaude自动化测试Python测试本地部署pytest集成MCP协议

支持客户端

ClaudeCline

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP