Test Runner MCP
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Integrates with Dependabot for automated dependency updates
Allows running and parsing Flutter tests, with enhanced support including environment setup, error handling, and detailed output processing
Integrates with GitHub Actions for continuous integration, including automated testing on Node.js 18.x and 20.x, test results uploaded as artifacts
Test Runner MCP
*** Note: this mcp server can be used by agents to potentially run arbitrary commands, this is something which can actually be quite helpful as intelligent agents will often automatically and naturally take debugging steps to achieve specified task; especially if every instance of execution for this tool is approved individually. Though I would not recommend allowing always approve execution***
A Model Context Protocol (MCP) server for running and parsing test results from multiple testing frameworks. This server provides a unified interface for executing tests and processing their outputs, supporting:
- Bats (Bash Automated Testing System)
- Pytest (Python Testing Framework)
- Flutter Tests
- Jest (JavaScript Testing Framework)
- Go Tests
Installation
Prerequisites
The following test frameworks need to be installed for their respective test types:
- Bats:
apt-get install bats
orbrew install bats
- Pytest:
pip install pytest
- Flutter: Follow Flutter installation guide
- Jest:
npm install --save-dev jest
- Go: Follow Go installation guide
Usage
Configuration
Add the test-runner to your MCP settings (e.g., in claude_desktop_config.json
or cline_mcp_settings.json
):
Note: For Flutter tests, ensure you replace:
/opt/homebrew/Caskroom/flutter/3.27.2/flutter
with your actual Flutter installation path/Users/username/.pub-cache
with your actual pub cache path- Update PATH to include your system's actual paths
You can find these values by running:
Running Tests
Use the run_tests
tool with the following parameters:
Example for each framework:
Flutter Test Support
The test runner includes enhanced support for Flutter tests:
- Environment Setup
- Automatic Flutter environment configuration
- PATH and PUB_CACHE setup
- Flutter installation verification
- Error Handling
- Stack trace collection
- Assertion error handling
- Exception capture
- Test failure detection
- Output Processing
- Complete test output capture
- Stack trace preservation
- Detailed error reporting
- Raw output preservation
Output Format
The test runner produces structured output while preserving complete test output:
Results are saved in the specified output directory:
test_output.log
: Raw test outputtest_errors.log
: Error messages if anytest_results.json
: Structured test resultssummary.txt
: Human-readable summary
Development
Setup
- Clone the repository
- Install dependencies:Copy
- Build the project:Copy
Running Tests
The test suite includes tests for all supported frameworks and verifies both successful and failed test scenarios.
CI/CD
The project uses GitHub Actions for continuous integration:
- Automated testing on Node.js 18.x and 20.x
- Test results uploaded as artifacts
- Dependabot configured for automated dependency updates
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
You must be authenticated.
Facilitates unified execution and result parsing for various testing frameworks, including Bats, Pytest, Flutter, Jest, and Go, through a Model Context Protocol interface.