MCP Jira Xray Server
Connects to Jira with Xray Test Management to extract test cases related to tickets and list test executions.
README
MCP Jira Xray Server
A Model Context Protocol (MCP) server for extracting test information from Jira Xray. This server connects to Jira instances with Xray Test Management and extracts test cases related to specific tickets.
Features
- 🔍 Extract tests related to any Jira ticket
- 📋 List test executions linked to tickets
- 🎨 Configurable JSON output format
- 💾 Automatic saving to the
extractionsfolder - 🔐 Secure connection using Jira API tokens
Installation
Prerequisites
- Node.js 17 or higher
- A Jira instance with Xray Test Management
- Jira API token
Setup
- Clone this repository or install via npm:
git clone <repository-url>
cd mcp-jira-xray
npm install
- Run the interactive setup:
npm run setup
This will guide you through:
- Entering your Jira host URL
- Providing your Jira email
- Adding your API token
- Validating the connection
- Configuring output format
Or manually create a .env file:
cp .env.example .env
# Edit .env with your credentials
Getting a Jira API Token
- Go to Atlassian Account Settings
- Click "Create API token"
- Give it a label and copy the token
- Use this token in your
.envfile
Configuration
Jira Connection
The server requires three configuration values:
JIRA_HOST: Your Jira instance URL (e.g.,https://mycompany.atlassian.net)JIRA_EMAIL: Your Jira account emailJIRA_API_TOKEN: Your Jira API token
Output Format
The OUTPUT_FORMAT environment variable defines the JSON structure for extracted test data. You can customize this to match your needs.
Default format:
{
"ticketId": "",
"test": "",
"testCases": []
}
Custom format example:
{
"ticket": {
"id": "",
"name": ""
},
"tests": {
"cases": []
}
}
The server will populate the fields based on these keys:
ticketId→ The Jira ticket IDtest→ The ticket summarytestCases→ Array of test case descriptions
Usage
With VS Code
Good news! The server is already configured for this project in .vscode/mcp.json.
Quick Start:
- Make sure you've run
npm run setup(configuration complete) - Open Command Palette:
Cmd/Ctrl + Shift + P - Type: "MCP: Enable" and press Enter
- Try: "Extract tests for ticket PROJ-123" in Copilot Chat
📖 See VSCODE-SETUP.md for complete VS Code installation guide
With Claude Desktop
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"jira-xray": {
"command": "node",
"args": ["/absolute/path/to/mcp-jira-xray/build/index.js"]
}
}
}
Available Tools
1. extract_tests
Extracts all tests related to a given Jira ticket.
Parameters:
ticketId(string): The Jira ticket ID (e.g., "PROJ-123")
Example:
Extract tests for ticket PROJ-123
Output:
- Test execution details
- All test cases with descriptions
- Saved to
extractions/PROJ-123_<timestamp>.json
2. list_test_executions
Lists all test executions linked to a Jira ticket.
Parameters:
ticketId(string): The Jira ticket ID
Example:
List test executions for PROJ-123
Output:
- List of test execution keys
- Test execution summaries
- Execution statuses
Output Files
All extracted test data is saved to the extractions/ folder with the following naming convention:
extractions/<TICKET-ID>_<TIMESTAMP>.json
Example: extractions/PROJ-123_2024-01-15T10-30-45-123Z.json
Development
Interactive Setup
Run the setup wizard:
npm run setup
Validate Configuration
Test your Jira connection:
npm run validate
This will:
- Check your .env configuration
- Test connection to Jira
- Verify authentication
- List accessible projects
- Confirm permissions
Build
npm run build
This compiles TypeScript to JavaScript in the build/ directory.
Project Structure
mcp-jira-xray/
├── src/
│ ├── index.ts # Main MCP server entry point
│ ├── jira-client.ts # Jira API client
│ ├── config.ts # Configuration management
│ └── output-handler.ts # File output handling
├── build/ # Compiled JavaScript (generated)
├── extractions/ # Output files (generated)
├── .env # Environment configuration
├── .env.example # Example configuration
├── package.json
├── tsconfig.json
└── README.md
Troubleshooting
"Missing required environment variables"
Make sure your .env file exists and contains all required variables (JIRA_HOST, JIRA_EMAIL, JIRA_API_TOKEN).
"Failed to get ticket"
- Verify your Jira credentials are correct
- Check that the ticket ID exists in your Jira instance
- Ensure your API token has appropriate permissions
"Xray API not available"
The server tries multiple methods to extract test data. If Xray-specific APIs aren't available, it falls back to standard Jira JQL queries. This may happen if:
- Xray is not installed on your Jira instance
- Your account doesn't have Xray permissions
Connection Issues
- Ensure your
JIRA_HOSTincludes the protocol (https://) - Check that your network allows connections to Jira
- Verify your API token is valid and not expired
License
MIT
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Support
For issues and questions:
- Check existing [GitHub Issues](<repository-url>/issues)
- Create a new issue with detailed information
- Include your Jira and Xray versions
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。