This repository contains a ReportPortal MCP Server. It allows users to interact with ReportPortal directly from GitHub Copilot / Claude / etc chat to query and analyze test execution results.
The ReportPortal MCP server provides the following functionality:
- List launches with pagination
- Get launch details by name
- Filter launches using various criteria
- View test execution reports
- Go 1.24.1 or later
- A ReportPortal instance
# 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
The server uses environment variables for configuration:
Variable | Description | Default |
---|---|---|
RP_HOST |
ReportPortal host URL | |
RP_PROJECT |
ReportPortal project name | |
RP_TOKEN |
ReportPortal API token | |
MCP_PORT |
Port to run the MCP server on | 4389 |
# Set required environment variables
export RP_HOST="https://your-reportportal-instance.com"
export RP_PROJECT="your-project"
export RP_TOKEN="your-api-token"
# Run the server
./reportportal-mcp-server
Lists ReportPortal launches with pagination support.
Parameters:
page
(optional): Page number (default: 1)page-size
(optional): Number of items per page (default: 20)
Retrieves the most recent launch with the specified name.
Parameters:
launch
: Launch name to search for
Retrieves the most recent launch matching specified filters.
Parameters:
name
(optional): Filter by launch namedescription
(optional): Filter by launch descriptionuuid
(optional): Filter by launch UUIDstatus
(optional): Filter by launch status (IN_PROGRESS, PASSED, FAILED, STOPPED, SKIPPED, INTERRUPTED)start_time
(optional): Filter by start time (unix timestamp)end_time
(optional): Filter by end time (unix timestamp)attributes
(optional): Filter by attributes (comma-separated key:value pairs)mode
(optional): Filter by launch mode (DEFAULT or DEBUG)sort
(optional): Sort direction and field (default: "desc(startTime)")
Lists test items for a specific launch with pagination support.
Parameters:
launch-id
: ID of the launch to get test items forpage
(optional): Page number (default: 1)page-size
(optional): Number of items per page (default: 20)
Retrieves details of a specific test item.
Parameters:
test_item_id
: ID of the test item to retrieve
go test ./...
To add a new tool, create a new method in the appropriate resource file and add it to the server in
the NewServer
function.
This project is licensed under the Apache 2.0 License.