Skip to main content
Glama

mXray

npm version License: MIT Node.js ≥ 20.6

An MCP (Model Context Protocol) server that connects AI-powered IDEs to Xray Test Management for Jira Cloud. It exposes 28 test management tools over stdio, letting your AI assistant create and manage tests, test executions, test plans, test sets, and import/export test results — all without leaving your editor.

⚠️ Xray Cloud only. This server targets the Xray Cloud REST and GraphQL APIs. Xray Server / Data Center use a different API and are not supported.

Quick Start

# Run directly with npx — no installation needed
JIRA_BASE_URL=https://yourcompany.atlassian.net \
JIRA_EMAIL=you@company.com \
JIRA_API_TOKEN=your-token \
npx mxray-mcp-server

For IDE integration, see the Usage section below.

Related MCP server: Xray MCP Server

Prerequisites

  • Node.js ≥ 20.6

  • A Jira Cloud account with the Xray for Jira app installed

  • A Jira API token — generate one at Atlassian account settings

  • (Optional) Xray Cloud API credentials (client ID + secret) — required for Xray-specific tools such as fetching test steps, updating test runs, and importing/exporting results. Generate them in Xray → Settings → API Keys.

Without Xray credentials, 9 Jira-only tools still work fully. The remaining 18 Xray-specific tools will return a clear error message when called.

Installation

# 1. Clone the repository
git clone https://github.com/Timorek/mXray.git
cd mXray

# 2. Install dependencies
npm install

# 3. Configure environment variables
cp .env.example .env
# Edit .env with your credentials (see Configuration below)

# 4. Build
npm run build

Configuration

Edit the .env file created above:

# Required
JIRA_BASE_URL=https://yourcompany.atlassian.net
JIRA_EMAIL=your-email@company.com
JIRA_API_TOKEN=your-jira-api-token

# Optional — enables Xray-specific tools (GraphQL, import/export)
XRAY_CLIENT_ID=your-xray-client-id
XRAY_CLIENT_SECRET=your-xray-client-secret

The server validates all variables at startup using strict Zod schemas and exits with a descriptive error if anything is missing or malformed.

Usage

The server communicates over stdio and must be registered with your MCP-compatible IDE. All startup logs are written to stderr to keep the stdio channel clean.

GitHub Copilot CLI

Add to ~/.copilot/mcp-config.json (global) or .copilot/mcp-config.json (project-local):

Option A — via npx with inline credentials (no installation needed):

{
  "mcpServers": {
    "mxray": {
      "command": "npx",
      "args": ["-y", "mxray-mcp-server"],
      "env": {
        "JIRA_BASE_URL": "https://yourcompany.atlassian.net",
        "JIRA_EMAIL": "your-email@company.com",
        "JIRA_API_TOKEN": "your-jira-api-token",
        "XRAY_CLIENT_ID": "your-xray-client-id",
        "XRAY_CLIENT_SECRET": "your-xray-client-secret"
      }
    }
  }
}

Option B — via npx loading from .env file (recommended):

Create a .env file with your credentials (see Configuration), then set cwd to the directory containing the .env file (not the file itself):

{
  "mcpServers": {
    "mxray": {
      "command": "npx",
      "args": ["-y", "mxray-mcp-server"],
      "cwd": "/absolute/path/to/mXray"
    }
  }
}

Option C — from local build, inline credentials:

{
  "mcpServers": {
    "mxray": {
      "command": "node",
      "args": ["/absolute/path/to/mXray/dist/index.js"],
      "env": {
        "JIRA_BASE_URL": "https://yourcompany.atlassian.net",
        "JIRA_EMAIL": "your-email@company.com",
        "JIRA_API_TOKEN": "your-jira-api-token",
        "XRAY_CLIENT_ID": "your-xray-client-id",
        "XRAY_CLIENT_SECRET": "your-xray-client-secret"
      }
    }
  }
}

Option D — from local build, loading from .env file (recommended):

{
  "mcpServers": {
    "mxray": {
      "command": "node",
      "args": ["--env-file=/absolute/path/to/mXray/.env", "/absolute/path/to/mXray/dist/index.js"]
    }
  }
}

Claude Code

Add to ~/.claude/mcp_settings.json:

Option A — via npx with inline credentials (no installation needed):

{
  "mcpServers": {
    "mxray": {
      "command": "npx",
      "args": ["-y", "mxray-mcp-server"],
      "env": {
        "JIRA_BASE_URL": "https://yourcompany.atlassian.net",
        "JIRA_EMAIL": "your-email@company.com",
        "JIRA_API_TOKEN": "your-jira-api-token",
        "XRAY_CLIENT_ID": "your-xray-client-id",
        "XRAY_CLIENT_SECRET": "your-xray-client-secret"
      }
    }
  }
}

Option B — via npx loading from .env file (recommended):

Create a .env file with your credentials (see Configuration), then set cwd to the directory containing the .env file (not the file itself):

{
  "mcpServers": {
    "mxray": {
      "command": "npx",
      "args": ["-y", "mxray-mcp-server"],
      "cwd": "/absolute/path/to/mXray"
    }
  }
}

Option C — from local build, inline credentials:

{
  "mcpServers": {
    "mxray": {
      "command": "node",
      "args": ["/absolute/path/to/mXray/dist/index.js"],
      "env": {
        "JIRA_BASE_URL": "https://yourcompany.atlassian.net",
        "JIRA_EMAIL": "your-email@company.com",
        "JIRA_API_TOKEN": "your-jira-api-token",
        "XRAY_CLIENT_ID": "your-xray-client-id",
        "XRAY_CLIENT_SECRET": "your-xray-client-secret"
      }
    }
  }
}

Option D — from local build, loading from .env file (recommended):

{
  "mcpServers": {
    "mxray": {
      "command": "node",
      "args": ["--env-file=/absolute/path/to/mXray/.env", "/absolute/path/to/mXray/dist/index.js"]
    }
  }
}

Available Tools

Tools marked with (Xray) require XRAY_CLIENT_ID and XRAY_CLIENT_SECRET.

Tests

Tool

Description

list_tests

List tests in a project; filter by label or component

get_test

Get details of a specific test

get_test_with_steps

Get test details including manual steps (Xray)

create_test

Create a test (Manual / Cucumber / Generic)

update_test

Update test fields (summary, description, labels, priority)

update_test_type

Change the Xray test type (Xray)

update_gherkin_test_definition

Update the Gherkin scenario on a Cucumber test (Xray)

Test Executions

Tool

Description

list_test_executions

List test executions in a project

get_test_execution

Get execution details and test runs

create_test_execution

Create a new test execution

update_test_run

Update a test run status and comment (Xray)

Test Plans

Tool

Description

list_test_plans

List test plans in a project

get_test_plan

Get plan details and associated tests

create_test_plan

Create a new test plan

add_tests_to_test_plan

Add tests to a plan (Xray)

Test Sets

Tool

Description

list_test_sets

List test sets in a project

get_test_set

Get set details and associated tests

create_test_set

Create a new test set

add_tests_to_test_set

Add tests to a set (Xray)

Import

All import tools require Xray credentials.

Tool

Description

import_execution_results

Import results in Xray JSON format

import_cucumber_results

Import results in Cucumber JSON format

import_junit_results

Import results in JUnit XML format

import_testng_results

Import results in TestNG XML format

import_nunit_results

Import results in NUnit XML format

import_robot_results

Import results in Robot Framework XML format

import_behave_results

Import results in Behave JSON format

import_feature_file

Import a Gherkin .feature file to create/update tests

Export

Tool

Description

export_cucumber_features

Export Cucumber feature files as a base64-encoded ZIP (Xray)

Sample test report files for testing the import tools are in samples/.

Development

npm run dev         # Run with tsx — no build step needed
npm run build       # Compile TypeScript → dist/
npm run typecheck   # Type-check without emitting files
npm test            # Run tests with Vitest
npm run test:watch  # Run tests in watch mode

To use the dev server in an MCP config, replace node dist/index.js with npx tsx src/index.ts.

Project Structure

mXray/
├── src/
│   ├── index.ts                  # Entry point: config, clients, tool registration
│   ├── types.ts                  # Zod config schema + TypeScript interfaces
│   ├── utils/errors.ts           # Centralized API error formatting
│   ├── services/
│   │   └── XrayCloudService.ts   # Xray JWT auth, GraphQL queries, REST imports
│   └── tools/
│       ├── tests/                # 7 test management tools
│       ├── test-executions/      # 4 test execution tools
│       ├── test-plans/           # 4 test plan tools
│       ├── test-sets/            # 4 test set tools
│       ├── import/               # 8 result import tools
│       └── export/               # 1 export tool
├── samples/                      # Example test report files
├── .env.example                  # Environment variable template
├── package.json
└── tsconfig.json

License

MIT © 2026 Arkadiusz Kłos

Available Tools

28 tools
add_tests_to_test_planA

Add tests to an existing test plan via Xray GraphQL (requires Xray credentials).

Inputs: plan_key (required), test_keys (required).

add_tests_to_test_setA

Add tests to an existing test set via Xray GraphQL (requires Xray credentials).

Inputs: set_key (required), test_keys (required).

create_testC

Create a new test in Jira with specified type (Manual/Cucumber/Generic).

Inputs: summary (required), test_type (required), project_key (required), labels, +2 more.

create_test_executionA

Create a new test execution in Jira. Optionally add tests to it (requires Xray credentials for adding tests).

Inputs: summary (required), project_key (required), test_keys, description.

create_test_planC

Create a new test plan in Jira.

Inputs: summary (required), project_key (required), description.

create_test_setC

Create a new test set in Jira.

Inputs: summary (required), project_key (required), description.

export_cucumber_featuresA

Export Cucumber feature files from Xray. Can export all features or specific test keys (requires Xray credentials).

Inputs: test_keys.

get_testC

Get details of a specific test from Jira.

Inputs: test_key (required).

get_test_executionA

Get details of a test execution, including associated test runs if Xray is configured.

Inputs: execution_key (required).

get_test_planA

Get details of a test plan, including associated tests if Xray is configured.

Inputs: plan_key (required).

get_test_setA

Get details of a test set, including associated tests if Xray is configured.

Inputs: set_key (required).

get_test_with_stepsA

Get test details including test steps from Xray (requires Xray credentials).

Inputs: test_key (required).

import_behave_resultsB

Import Behave JSON test results (requires Xray credentials).

Inputs: results (required).

import_cucumber_resultsB

Import Cucumber JSON test results (requires Xray credentials).

Inputs: results (required), project_key (required), summary.

import_execution_resultsB

Import test execution results in Xray JSON format (requires Xray credentials).

Inputs: results (required).

import_feature_fileB

Import a Cucumber .feature file to create/update tests in Xray (requires Xray credentials).

Inputs: project_key (required), feature_content (required).

import_junit_resultsB

Import JUnit XML test results (requires Xray credentials).

Inputs: xml_content (required), project_key, execution_key.

import_nunit_resultsC

Import NUnit XML test results (requires Xray credentials).

Inputs: xml_content (required), project_key.

import_robot_resultsA

Import Robot Framework XML test results (requires Xray credentials).

Inputs: xml_content (required), project_key.

import_testng_resultsB

Import TestNG XML test results (requires Xray credentials).

Inputs: xml_content (required), project_key.

list_test_executionsC

List test executions in a Jira project.

Inputs: project_key (required), max_results.

list_test_plansC

List test plans in a Jira project.

Inputs: project_key (required), max_results.

list_testsB

List tests in a Jira project. Supports filtering by labels and component.

Inputs: project_key (required), labels, component, max_results.

list_test_setsC

List test sets in a Jira project.

Inputs: project_key (required), max_results.

update_gherkin_test_definitionA

Update the Gherkin scenario definition of a Cucumber test via GraphQL (requires Xray credentials).

Inputs: gherkin (required), test_key (required).

update_testC

Update fields of an existing test in Jira.

Inputs: test_key (required), labels, summary, components, +1 more.

update_test_runA

Update the status and comment of a test run within a test execution (requires Xray credentials).

Inputs: status (required), test_key (required), execution_key (required), comment.

update_test_typeB

Change the Xray test type (Manual/Cucumber/Generic) via GraphQL (requires Xray credentials).

Inputs: test_key (required), test_type (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 28 tools

    Disambiguation4/5

    Most tools target distinct Jira/Xray resources and actions, so an agent can generally select the right one. There is slight ambiguity between get_test and get_test_with_steps, between update_test and update_test_type, and between the generic import_execution_results and the format-specific import_* tools.

    Naming Consistency5/5

    Tool names consistently use snake_case verb_noun patterns such as list_tests, create_test_set, update_test_run, and import_cucumber_results. The convention is predictable across the entire surface.

    Tool Count2/5

    At 28 tools, the surface is heavy and exceeds the typical well-scoped range. The six format-specific import tools plus the generic import_execution_results likely could be consolidated with a format parameter, reducing near-duplicate tooling.

    Completeness3/5

    Core test management workflows are covered, including test creation, execution listing, test plans, test sets, imports, and exports. However, lifecycle coverage is uneven: there are no delete/remove operations, and test sets, plans, and executions lack update/delete tools.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables integration with Xray Cloud APIs for comprehensive test management including creating and managing test cases, test executions, test plans, and test sets. Supports CI/CD automation and test result tracking through GraphQL APIs.
      23
      64 npm
      3
      ISC
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to interact with Xray Test Management for both Cloud and Server deployments. Supports test execution, importing results from multiple formats (JUnit, Cucumber, Robot Framework, TestNG), and managing test plans and executions.
      8
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables interaction with Xray Cloud and Data Center for test management, including authentication, GraphQL queries, test execution/plan management, and result import via MCP.
      9
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that connects AI assistants to Xray Cloud for Jira test management, enabling natural language interaction with tests, test plans, executions, and CI result imports.
      MIT