The ReportPortal MCP Server is a bridge between your ReportPortal instance and AI chat assistants
10K+
The ReportPortal MCP Server is a bridge between your ReportPortal instance and AI chat assistants (such as Claude Desktop, GitHub Copilot, Cursor). In simple terms, it lets you ask questions in plain English about your test runs and get answers directly from ReportPortal. It follows the official MCP guidelines.
For example, instead of logging into the ReportPortal UI, you could ask your AI assistant "What tests failed in the last run?" or "List the 5 most recent test runs," and it will fetch that information from ReportPortal for you. This makes it easy for QA testers and managers to query test results using natural language, speeding up analysis and reporting.
There are two ways to run the latest version of the ReportPortal MCP Server. Each of this way is suitable for any LLM provider.
The MCP server is available on the official ReportPortal's DockerHub.
Configuration:
{
"reportportal": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"RP_API_TOKEN",
"-e",
"RP_HOST",
"-e",
"RP_PROJECT",
"reportportal/mcp-server"
],
"env": {
"RP_API_TOKEN": "your-api-token",
"RP_HOST": "https://your-reportportal-instance.com",
"RP_PROJECT": "YourProjectInReportPortal"
}
}
}
The OS pre-built binaries can be downloaded from the official releases on GitHub.
Configuration:
{
"reportportal": {
"command": "/path/to/reportportal-mcp-server-binary",
"args": ["stdio"],
"env": {
"RP_API_TOKEN": "your-api-token",
"RP_HOST": "https://your-reportportal-instance.com",
"RP_PROJECT": "YourProjectInReportPortal"
}
}
}
Choose your favourite AI Tool to connect.
{
"mcpServers": {
"reportportal": {
// choose the Docker or binary configuration from the section above
}
}
}
claude mcp add-json reportportal '{"command": "docker", "args": ["run", "-i", "--rm", "-e", "RP_API_TOKEN", "-e", "RP_HOST", "-e", "RP_PROJECT", "reportportal/mcp-server"], "env": {"RP_API_TOKEN": "your-api-token", "RP_HOST": "https://your-reportportal-instance.com", "RP_PROJECT": "YourProjectInReportPortal"}}'
Configuration Options:
-s user to add the server to your user configuration (available across all projects).-s project to add the server to project-specific configuration (shared via .mcp.json).local (available only to you in the current project).Documentation: Claude Code guide.
Just click
Or follow the next steps:
{
"mcpServers": {
"reportportal": {
// choose the Docker or binary configuration from the section above
}
}
}
Documentation: Cursor MCP.
{
"servers": {
"reportportal": {
// choose the Docker or binary configuration from the section above
}
}
}
Documentation: VS Code Copilot Guide.
{
"servers": {
"reportportal": {
// choose the Docker or binary configuration from the section above
}
}
}
Ctrl + S or Command + S to save, or close the mcp.json file. The configuration should take effect immediately and restart all the MCP servers defined. You can restart the IDE if needed.Documentation: JetBrains Copilot Guide.
Once connected, your AI assistant will list ReportPortal-related "tools" it can invoke. You can then ask your questions in chat, and the assistant will call those tools on your behalf.
The ReportPortal MCP server provides a comprehensive set of capabilities for interacting with ReportPortal:
| Tool Name | Description | Parameters |
|---|---|---|
| Get Launches by filter | Lists ReportPortal launches with pagination by filter | name, description, owner, number, start_time, end_time, attributes, sort, page, page-size (all optional) |
| Get Last Launch by Name | Retrieves the most recent launch by name | name |
| Run Auto Analysis | Runs auto analysis on a launch | launch_id, analyzer_mode, analyzer_type, analyzer_item_modes |
| Run Unique Error Analysis | Runs unique error analysis on a launch | launch_id, remove_numbers |
| Force Finish Launch | Forces a launch to finish | launch_id |
| Delete Launch | Deletes a specific launch | launch_id |
| Get Suites by filter | Lists test suites for a specific launch | launch-id (required), name, description, start_time_from, start_time_to, attributes, parent_id, sort, page, page-size (all optional) |
| Get Test Items by filter | Lists test items for a specific launch | launch-id (required), name, description, status, has_retries, start_time_from, start_time_to, attributes, parent_id, defect_comment, auto_analyzed, ignored_in_aa, pattern_name, ticket_id, sort, page, page-size (all optional) |
| Get Logs by filter | Lists logs for a specific test item or nested step | parent-id (required), log_level, log_content, logs_with_attachments, status, sort, page, page-size (all optional) |
| Get Attachment by ID | Retrieves an attachment binary by id | attachment_id |
| Run Unique Error Analysis | Runs unique error analysis on a launch | launch_id, remove_numbers |
| Get Test Item by ID | Retrieves details of a specific test item | test_item_id |
Analyzes a ReportPortal launch and provides detailed information about test results, failures, and statistics.
Parameters:
launch_id: ID of the launch to analyzeYou can follow the prompt text and structure as a reference while working on your own prompts.
Here are some real-world examples of what you might ask your AI after setup (the assistant's response will be drawn from ReportPortal data):
Each query above corresponds to a "tool" provided by the MCP server, but you just phrase it naturally. The AI will invoke the correct command behind the scenes. These features let you query and manage your test reports in many ways through simple chat interactions.
# Clone the repository
git clone https://github.com/reportportal/reportportal-mcp-server.git
cd reportportal-mcp-server
# Build the binary
go build -o reportportal-mcp-server ./cmd/reportportal-mcp-server
This creates an executable called reportportal-mcp-server.
The server needs to know where your ReportPortal is and how to authenticate. Set these environment variables in your shell:
| Variable | Description | Required |
|---|---|---|
RP_HOST | The URL of your ReportPortal (e.g. https://myreportportal.example.com) | Yes |
RP_PROJECT | Your default project name in ReportPortal | Optional |
RP_API_TOKEN | Your ReportPortal API token (for access) | Yes |
MCP_PORT | Port for the MCP server | 4389 |
For example:
export RP_HOST="https://your-reportportal-instance.com"
export RP_PROJECT="YourProjectInReportPortal"
export RP_API_TOKEN="your-api-token"
After configuring the env vars as above, simply run:
./reportportal-mcp-server
This will start the MCP server on the configured port.
Once running, the MCP server is ready to accept queries from your AI tool.
To set up a development environment or contribute:
Install Go Task v3:
go install github.com/go-task/task/v3/cmd/task@latest
Run task deps to install Go dependencies:
task deps
task build
task test
task docker:build
The modelcontextprotocol/inspector tool is useful for testing and debugging MCP servers locally:
npx @modelcontextprotocol/inspector docker run -i --rm -e "RP_API_TOKEN=$RP_API_TOKEN" -e "RP_PROJECT=$RP_PROJECT" -e "RP_HOST=$RP_HOST" reportportal-mcp-server
Alternatively, you can use the Task command:
# Run inspector against your local server
task inspector
# Lint
task lint
# Format
task fmt
To add a new tool, create a new method in the appropriate resource file and add it to the server in the NewServer function:
// In your resource file (e.g., launches.go)
func (lr *LaunchResources) toolNewFeature() (tool mcp.Tool, handler server.ToolHandlerFunc) {
// Implement your tool
}
// In server.go
func NewServer(...) *server.MCPServer {
// ...
s.AddTool(launches.toolNewFeature())
// ...
}
To add a new prompt, simply create a YAML file describing your prompt and place it in the prompts folder at the root of the project. The server will automatically read and initialize all prompts from this directory on startup—no code changes are required.
Example:
my_custom_prompt.yaml, in the prompts folder.This approach allows you to extend the server's capabilities with custom prompts quickly and without modifying the codebase.
This project is licensed under the Apache 2.0 License.
Content type
Image
Digest
sha256:27e31e2fb…
Size
13.5 MB
Last updated
3 months ago
docker pull reportportal/mcp-server