home / mcp / xray mcp server

Xray MCP Server

An Xray MCP Server

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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 build

Configuration and usage notes

Configure 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"
      }
    }
  }
}

Security and credentials

Keep your Client ID and Client Secret secure. Do not commit credentials to version control. Use environment-specific secrets management where possible.

Testing

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.

Notes and best practices

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.

Available tools

create_test_case

Create a new test case using the GraphQL mutation createTest with the provided details.

get_test_case

Retrieve details of a specific test case using the GraphQL query getTests.

delete_test_case

Delete a test case using the GraphQL mutation deleteTest.

search_test_cases

Search test cases using a JQL query.

get_project_test_cases

Retrieve all test cases for a given project.

update_test_case

Update standard fields via Jira REST API as this is not directly supported.

create_test_execution

Create a new test execution to run tests.

get_test_execution

Retrieve details of a test execution, including all test runs.

search_test_executions

Search test executions using a JQL query.

get_project_test_executions

Retrieve all test executions for a project.

update_test_run_status

Update the status of a test run (PASS, FAIL, etc.).

create_test_plan

Create a new test plan to organize tests.

get_test_plan

Retrieve details of a specific test plan with all tests.

search_test_plans

Search test plans using a JQL query.

get_project_test_plans

Retrieve all test plans for a project.

add_tests_to_test_plan

Add tests to an existing test plan.

remove_tests_from_test_plan

Remove tests from a test plan.

create_test_set

Create a new test set to group tests.

get_test_set

Retrieve details of a specific test set with all tests.

search_test_sets

Search test sets using a JQL query.

get_project_test_sets

Retrieve all test sets for a project.

add_tests_to_test_set

Add tests to an existing test set.

remove_tests_from_test_set

Remove tests from a test set.