local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Provides tools for executing Python tests within a project using tox and pytest. Supports running tests in various modes (all tests, specific test files, individual test cases, or directory-based tests) and different test groups.
Enables running and managing Python test suites using tox commands. Handles different test execution scenarios with configurable timeouts and provides targeted testing capabilities for Python projects.
Tox 测试 MCP 服务器
一个 MCP 服务器,它执行 tox 命令,使用 pytest 在项目中运行 Python 测试。该服务器通过模型上下文协议 (MCP) 提供了一种便捷的方法来运行和管理 Python 测试。
特征
工具
run_tox_tests
- 使用各种模式和选项执行毒性测试- 支持不同的执行模式:
all
:运行所有测试或特定组的测试file
:从特定文件运行测试case
:运行特定的测试用例directory
:运行指定目录中的所有测试
- 支持的测试组:
clients
:客户端相关测试api
:API 端点测试auth
:身份验证测试uploads
:上传功能测试routes
:路由处理程序测试
- 支持不同的执行模式:
发展
安装依赖项:
构建服务器:
对于使用自动重建的开发:
安装
要与 VSCode 一起使用,请将服务器配置添加到您的 MCP 设置文件中: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
配置选项
env.TOX_TIMEOUT
:(可选)等待测试执行完成的最长时间(以秒为单位)。如果测试运行时间超过此超时时间,测试将被终止。默认值为 600 秒(10 分钟)。env.TOX_APP_DIR
:(必需)包含 tox.ini 文件的目录。tox 命令将从此处执行。该路径应指向 tox.ini 所在的 Python 项目根目录。
超时对于以下情况尤其重要:
- 防止测试进程挂起
- 管理长期运行的集成测试
- 确保 CI/CD 管道不会卡住
用法
服务器提供了一个可以在不同模式下使用的单一工具run_tox_tests
:
工具参数
与 Cline 一起使用
将此 MCP 与 Cline 配合使用时,您可以配置 Cline 的自定义指令,以高效地处理测试执行。以下是推荐的工作流程:
此工作流程可确保:
- 首先运行所有测试,实现全面的测试覆盖
- 通过隔离失败的测试用例进行重点调试
- 通过重新测试个别案例来验证修复
- 通过再次运行所有测试进行最终验证
与 Cline 的互动示例:
贡献
请参阅CONTRIBUTING.md了解我们的行为准则和提交拉取请求的流程的详细信息。
You must be authenticated.
Tools
一个 MCP 服务器,执行 tox 命令以使用 pytest 在项目内运行 Python 测试,允许用户运行所有测试或特定的测试组、文件、案例或目录。