Complete reference for Allure MCP Server tools and endpoints.
The server exposes 32+ tools across 4 categories:
- Launch Management (9 tools) — Create, monitor, close launches
- Test Results (8 tools) — Manage test execution results
- Test Cases (9 tools) — CRUD operations on test cases
- Analytics (6 tools) — Projects, statistics, trends
Start a new test launch in Allure TestOps.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Allure project ID |
launch_name |
string | ✓ | Human-readable name for the launch |
auto_submit |
boolean | Auto-submit when test collection complete (default: false) |
{
"type": "text",
"text": "Launch started: ID=12345, Name='Smoke Tests'"
}curl -X POST http://localhost:3000/messages?sessionId=abc123 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run_allure_launch",
"arguments": {
"project_id": 1,
"launch_name": "Smoke Tests"
}
}
}'Get current launch status.
| Parameter | Type | Required | Description |
|---|---|---|---|
launch_id |
integer | ✓ | Launch ID |
Get execution statistics for a launch.
| Parameter | Type | Required | Description |
|---|---|---|---|
launch_id |
integer | ✓ | Launch ID |
List launches in a project with pagination.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Project ID |
page |
integer | Page number (0-based, default: 0) | |
size |
integer | Items per page (default: 10, max: 100) |
Get comprehensive launch information.
| Parameter | Type | Required | Description |
|---|---|---|---|
launch_id |
integer | ✓ | Launch ID |
Close/finish an active launch.
| Parameter | Type | Required | Description |
|---|---|---|---|
launch_id |
integer | ✓ | Launch ID |
Reopen a closed launch for additional test results.
| Parameter | Type | Required | Description |
|---|---|---|---|
launch_id |
integer | ✓ | Launch ID |
Add test cases to a launch.
| Parameter | Type | Required | Description |
|---|---|---|---|
launch_id |
integer | ✓ | Launch ID |
project_id |
integer | ✓ | Project ID |
test_case_ids |
array | ✓ | Test case IDs |
assignees |
array | Usernames to assign to |
Add a test plan to a launch.
| Parameter | Type | Required | Description |
|---|---|---|---|
launch_id |
integer | ✓ | Launch ID |
test_plan_id |
integer | ✓ | Test plan ID |
List test results in a launch with optional status filter.
| Parameter | Type | Required | Description |
|---|---|---|---|
launch_id |
integer | ✓ | Launch ID |
status |
string | Filter: PASSED, FAILED, BROKEN, SKIPPED | |
page |
integer | Page number (0-based) | |
size |
integer | Items per page |
Get detailed information about a single test result.
| Parameter | Type | Required | Description |
|---|---|---|---|
test_result_id |
integer | ✓ | Test result ID |
Assign a test result to a team member.
| Parameter | Type | Required | Description |
|---|---|---|---|
test_result_id |
integer | ✓ | Test result ID |
username |
string | ✓ | Username to assign to |
Mute a failing test result (mark as known issue).
| Parameter | Type | Required | Description |
|---|---|---|---|
test_result_id |
integer | ✓ | Test result ID |
reason |
string | Reason for muting |
bulk_assign_test_results— Assign multiple results at oncebulk_mute_test_results— Mute multiple resultsbulk_unmute_test_results— Unmute multiple resultsbulk_resolve_test_results— Resolve multiple results
All take: launch_id, test_result_ids (array), and optional parameters.
List test cases in a project.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Project ID |
page |
integer | Page (0-based) | |
size |
integer | Items per page |
Get test case details and steps.
| Parameter | Type | Required | Description |
|---|---|---|---|
test_case_id |
integer | ✓ | Test case ID |
Create a new test case in a project.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Project ID |
name |
string | ✓ | Test case name |
description |
string | Description (optional) |
Update an existing test case.
| Parameter | Type | Required | Description |
|---|---|---|---|
test_case_id |
integer | ✓ | Test case ID |
name |
string | New name | |
description |
string | New description |
Delete a test case.
| Parameter | Type | Required | Description |
|---|---|---|---|
test_case_id |
integer | ✓ | Test case ID |
Start a test run for a specific test case.
| Parameter | Type | Required | Description |
|---|---|---|---|
test_case_id |
integer | ✓ | Test case ID |
launch_id |
integer | ✓ | Launch ID to run in |
bulk_set_test_case_status— Update status for multiple casesbulk_add_test_case_tags— Add tags to multiple casesbulk_remove_test_case_tags— Remove tags from multiple cases
List all accessible projects.
| Parameter | Type | Required | Description |
|---|---|---|---|
page |
integer | Page (0-based) | |
size |
integer | Items per page |
Get project details and settings.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Project ID |
Get project statistics (test count, runs, automation %).
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Project ID |
Get launch trend data over time (passed/failed/broken/skipped).
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Project ID |
Get launch execution time distribution.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Project ID |
Get test case success rate metrics.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id |
integer | ✓ | Project ID |
Opens a Server-Sent Events (SSE) stream for receiving async responses.
Request:
curl http://localhost:3000/sseResponse Stream:
event: endpoint
data: /messages?sessionId=e8f2a3c9d4e1b6f2
event: message
data: {"jsonrpc":"2.0","id":1,"result":{"content":[...]}}
: heartbeat comment
Headers:
Authorization: Bearer <MCP_AUTH_TOKEN>(ifMCP_AUTH_TOKENis set)
Send a JSON-RPC 2.0 request and receive async response on SSE stream.
Query Parameters:
| Parameter | Required | Description |
|---|---|---|
sessionId |
✓ | Session ID from SSE /endpoint event |
Request Body:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run_allure_launch",
"arguments": { "project_id": 1, "launch_name": "Tests" }
}
}Response:
HTTP/1.1 202 Accepted
Content-Length: 0
The actual response is delivered to the SSE stream.
Headers:
Authorization: Bearer <MCP_AUTH_TOKEN>(if required)Content-Type: application/json
CORS preflight handling (when CORS_ALLOWED_ORIGIN is set).
Response Headers:
Access-Control-Allow-Origin: <CORS_ALLOWED_ORIGIN>
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Max-Age: 86400
The server implements MCP Protocol 2024-11-05 (JSON-RPC 2.0 subset).
1. Client opens GET /sse
↓
2. Server sends: event: endpoint, data: /messages?sessionId=...
↓
3. Client sends initialize request
4. Server responds with initialize result
↓
5. Client sends notifications/initialized
↓
6. Client can now call tools via tools/call
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run_allure_launch",
"arguments": { "project_id": 1, "launch_name": "Tests" }
}
}Success Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Launch started: ID=12345"
}
]
}
}Error Response (MCP Protocol Error):
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Invalid params",
"data": { "reason": "project_id must be positive" }
}
}Tool-Level Error:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Error: Allure API returned 401 Unauthorized"
}
],
"isError": true
}
}#!/bin/bash
# See examples/launch-tests.sh for complete automation script
BASE_URL="http://localhost:3000"
AUTH_TOKEN="your_mcp_auth_token"
# 1. Open SSE stream
SESSION_ID=$(curl -s "$BASE_URL/sse" \
-H "Authorization: Bearer $AUTH_TOKEN" | \
grep -oP '(?<=sessionId=)[^"]+' | head -1)
# 2. Create launch
LAUNCH=$(curl -s -X POST "$BASE_URL/messages?sessionId=$SESSION_ID" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "run_allure_launch",
"arguments": {"project_id": 1, "launch_name": "Regression"}
}
}')
LAUNCH_ID=$(echo $LAUNCH | grep -o '"launch_id":[0-9]*' | grep -o '[0-9]*')
# 3. Add test cases
curl -s -X POST "$BASE_URL/messages?sessionId=$SESSION_ID" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "add_test_cases_to_launch",
"arguments": {
"launch_id": '$LAUNCH_ID',
"project_id": 1,
"test_case_ids": [1, 2, 3]
}
}
}'
# 4. Monitor and close
sleep 60 # Wait for execution
curl -s -X POST "$BASE_URL/messages?sessionId=$SESSION_ID" \
-H "Authorization: Bearer $AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {"name": "close_launch", "arguments": {"launch_id": '$LAUNCH_ID'}}
}'import httpx
import json
import asyncio
async def call_tool(session_id, auth_token, tool_name, arguments):
"""Call a tool via Allure MCP server."""
async with httpx.AsyncClient() as client:
# Send request
response = await client.post(
f"http://localhost:3000/messages?sessionId={session_id}",
headers={"Authorization": f"Bearer {auth_token}"},
json={
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": tool_name,
"arguments": arguments
}
}
)
return response.status_code, response.text
async def main():
session_id = "abc123"
auth_token = "your_token"
# Run launch
status, response = await call_tool(
session_id, auth_token,
"run_allure_launch",
{"project_id": 1, "launch_name": "Tests"}
)
print(f"Status: {status}, Response: {response}")
asyncio.run(main())| Code | Meaning | Example |
|---|---|---|
200 |
OK (SSE stream opened) | GET /sse |
202 |
Accepted (request queued) | POST /messages |
400 |
Bad Request | Missing sessionId, invalid JSON |
401 |
Unauthorized | Missing/invalid MCP_AUTH_TOKEN |
404 |
Not Found | Unknown sessionId |
500 |
Server Error | Crash, internal bug |
| Code | Description |
|---|---|
-32700 |
Parse error |
-32600 |
Invalid Request |
-32601 |
Method not found |
-32602 |
Invalid params |
-32603 |
Internal error |
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32602,
"message": "Invalid params",
"data": { "reason": "project_id must be positive" }
}
}Fix: Use a valid Allure project ID (integer > 0)
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [{ "type": "text", "text": "Tool execution failed: ..." }],
"isError": true
}
}Fix: Verify ALLURE_BASE_URL and ALLURE_TOKEN are correct
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [{ "type": "text", "text": "Tool execution failed: launch_id=99999 not found" }],
"isError": true
}
}Fix: Use correct launch_id from run_allure_launch response