export ALLURE_TESTOPS_URL='https://your-allure-instance.com'
export ALLURE_TOKEN='your-api-token'
export PROJECT_ID='1'python test_simple.pyThis will check:
- Environment variables are set
- Modules can be imported
- Server structure is correct
python test_mcp.pyThis will test:
- AllureClient connection to API
- Controller tools registration
- Tool handler execution
- MCP server structure
python index.pyThe server should start and wait for input on stdin. You should see:
Allure TestOps MCP Server running on stdio
Connected to: https://your-instance.com
Project ID: 1
Registered X tools
If you have an MCP client configured, you can test by:
- Add to your
~/.cursor/mcp.json:
{
"mcpServers": {
"allure-testops-python": {
"command": "python3",
"args": [
"/Users/alexander.shurov/allure_testops/mcp/python/index.py"
],
"env": {
"ALLURE_TESTOPS_URL": "https://your-instance.com",
"ALLURE_TOKEN": "your-token",
"PROJECT_ID": "1"
}
}
}
}- Restart Cursor/IDE
- Try using MCP tools in chat
import asyncio
import os
from allure_client import create_allure_client
from controllers.test_case_controller import handle_test_case_controller_tool
async def test():
client = create_allure_client(
os.environ['ALLURE_TESTOPS_URL'],
os.environ['ALLURE_TOKEN']
)
result = await handle_test_case_controller_tool(
client,
'allure_findAll_12',
{'projectId': 1, 'page': 0, 'size': 10},
'1'
)
print(result)
asyncio.run(test())- Check environment variables are set
- Check Python version (requires 3.8+)
- Check dependencies:
pip install -r requirements.txt
- Verify
ALLURE_TESTOPS_URLis correct - Verify
ALLURE_TOKENis valid - Check network connectivity
- Make sure you're in the project directory
- Check that all files are present
- Verify Python path includes project directory
- Check API endpoint URLs
- Verify request parameters
- Check API response format