Model Context Protocol server for Allure TestOps API, written in Python.
This MCP server provides a Python implementation for interacting with Allure TestOps API through the Model Context Protocol. It supports full CRUD operations for test cases, launches, and test plans, along with 56+ controller endpoints for comprehensive Allure TestOps integration.
- Python 3.8 or higher
- pip package manager
- Clone the repository:
git clone <repository-url>
cd allure_testops/mcp/python- Install dependencies:
pip install -r requirements.txt- Set up environment variables (see Configuration section below)
Set the following environment variables:
ALLURE_TESTOPS_URL: Base URL of your Allure TestOps instance (e.g.,https://your-allure-instance.com)ALLURE_TOKEN: API token for authentication (generate in Allure TestOps user settings)PROJECT_ID: Default project ID (numeric string, e.g.,"1")
export ALLURE_TESTOPS_URL='https://your-allure-instance.com'
export ALLURE_TOKEN='your-api-token'
export PROJECT_ID='1'Create a .env file in the project root:
ALLURE_TESTOPS_URL=https://your-allure-instance.com
ALLURE_TOKEN=your-api-token
PROJECT_ID=1Note: Never commit .env files to version control. Use .env.example as a template.
Run the server directly:
python index.pyThe server will run on stdio and communicate via the Model Context Protocol.
The repository includes utility scripts:
get_open_launches.py- Fetch all open launches from Allure TestOps
python get_open_launches.pyAdd to your mcp.json (typically located in ~/.cursor/mcp.json or similar):
{
"mcpServers": {
"allure-testops-python": {
"command": "python3",
"args": [
"/absolute/path/to/index.py"
],
"env": {
"ALLURE_TESTOPS_URL": "https://your-allure-instance.com",
"ALLURE_TOKEN": "your-api-token",
"PROJECT_ID": "1"
}
}
}
}list_test_cases- List all test cases in the projectget_test_case- Get a specific test case by IDcreate_test_case- Create a new test caseupdate_test_case- Update an existing test casedelete_test_case- Delete a test casebulk_create_test_cases_from_csv- Bulk create test cases from CSV
list_launches- List all launches in the projectget_launch- Get a specific launch by IDcreate_launch- Create a new launchupdate_launch- Update an existing launchdelete_launch- Delete a launchclose_launch- Close a launch
list_test_plans- List all test plans in the projectget_test_plan- Get a specific test plan by IDcreate_test_plan- Create a new test planupdate_test_plan- Update an existing test plandelete_test_plan- Delete a test plan
- ✅ Full Allure TestOps API integration
- ✅ 56+ controller endpoints
- ✅ Async/await support for high performance
- ✅ Type-safe tool definitions
- ✅ Comprehensive error handling
- ✅ CSV import support for bulk operations
.
├── index.py # Main MCP server entry point
├── allure_client.py # HTTP client for Allure TestOps API
├── csv_parser.py # CSV parsing utilities
├── controllers/ # API controller modules
├── get_open_launches.py # Utility script for fetching open launches
├── requirements.txt # Python dependencies
└── README.md # This file
Run the test scripts:
python test_simple.py
python test_mcp.pySee TESTING.md and QUICK_TEST.md for more details.
- Never commit API tokens or credentials to version control
- Use environment variables or secure secret management
- The
.gitignorefile excludes sensitive files by default - Rotate API tokens regularly
Contributions are welcome! Please ensure:
- Code follows Python best practices
- All tests pass
- No sensitive data is included in commits
- README is updated for new features
See LICENSE file for details.
For issues and questions:
- Check the documentation in
TESTING.mdandQUICK_TEST.md - Review Allure TestOps API documentation
- Open an issue in the repository