An Xray MCP Server
Configuration
View docs{
"mcpServers": {
"c4m3lblue-star-xray-mcp": {
"command": "node",
"args": [
"/path/to/xray-mcp/dist/index.js"
],
"env": {
"XRAY_CLIENT_ID": "your_client_id",
"XRAY_CLIENT_SECRET": "your_client_secret"
}
}
}
}You run this MCP server to connect Xray Cloud APIs with MCP clients, enabling you to manage test cases, test executions, test plans, and test sets from your workflows with GraphQL and REST endpoints.
Use this MCP server with your MCP client to create, retrieve, update, and organize test data in Xray Cloud. You can automate test case management, run test executions, group tests into plans and sets, and monitor results across environments.
Prerequisites: install Node.js 18 or higher and ensure you have Xray Cloud API credentials (Client ID and Client Secret).
Install dependencies and build the project step by step to prepare the MCP server for use.
npm install
npm run buildConfigure the MCP server in your client by copying the configuration block shown here and adapting the paths and credentials to your environment.
{
"mcpServers": {
"xray": {
"command": "node",
"args": ["/path/to/xray-mcp/dist/index.js"],
"env": {
"XRAY_CLIENT_ID": "your_client_id",
"XRAY_CLIENT_SECRET": "your_client_secret"
}
}
}
}Keep your Client ID and Client Secret secure. Do not commit credentials to version control. Use environment-specific secrets management where possible.
Test the MCP server locally by running with your credentials and ensuring it can reach Xray Cloud GraphQL and REST APIs. Use unit tests for isolated components and integration tests to verify end-to-end interactions.
When updating test-related data, prefer GraphQL mutations for test creation and deletion, while updating standard fields on existing tests may require Jira REST API calls.
Create a new test case using the GraphQL mutation createTest with the provided details.
Retrieve details of a specific test case using the GraphQL query getTests.
Delete a test case using the GraphQL mutation deleteTest.
Search test cases using a JQL query.
Retrieve all test cases for a given project.
Update standard fields via Jira REST API as this is not directly supported.
Create a new test execution to run tests.
Retrieve details of a test execution, including all test runs.
Search test executions using a JQL query.
Retrieve all test executions for a project.
Update the status of a test run (PASS, FAIL, etc.).
Create a new test plan to organize tests.
Retrieve details of a specific test plan with all tests.
Search test plans using a JQL query.
Retrieve all test plans for a project.
Add tests to an existing test plan.
Remove tests from a test plan.
Create a new test set to group tests.
Retrieve details of a specific test set with all tests.
Search test sets using a JQL query.
Retrieve all test sets for a project.
Add tests to an existing test set.
Remove tests from a test set.