MCP Zephyr

MCP Zephyr

Enables comprehensive test management in Zephyr Scale Cloud, including creating and managing test cases, executing tests with step-by-step results, organizing test cycles and plans, and performing advanced JQL searches.

Category
访问服务器

README

MCP Zephyr

A Model Context Protocol (MCP) server for Zephyr Scale Cloud test management. This MCP server provides tools to manage test cases, test executions, test cycles, and test plans in Zephyr Scale Cloud.

Features

  • Test Case Management: Create, read, update, delete, and search test cases
  • Test Execution: Execute tests and track results with detailed step-by-step outcomes
  • Test Cycle Management: Organize test cases into cycles and manage execution progress
  • Test Plan Management: Create and manage comprehensive test plans
  • Bulk Operations: Efficiently handle multiple test executions at once
  • Search and Filtering: Use JQL (Jira Query Language) for advanced test case searching

Prerequisites

  • Node.js 18+
  • Zephyr Scale Cloud account with API access
  • Valid Zephyr API token

Installation

  1. Clone this repository:
git clone <repository-url>
cd mcp-zephyr
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

Create a .env file based on .env.example:

cp .env.example .env

Edit .env with your Zephyr Scale Cloud credentials:

# Required: Your Zephyr API token
ZEPHYR_API_TOKEN=your_api_token_here

# Optional: Base URL (defaults to official Zephyr Scale Cloud API)
ZEPHYR_BASE_URL=https://api.zephyrscale.smartbear.com/v2

# Optional: Default project key
ZEPHYR_PROJECT_KEY=your_project_key_here

Getting Your API Token

  1. Log into your Zephyr Scale Cloud instance
  2. Navigate to Settings > API Tokens
  3. Generate a new API token with appropriate permissions
  4. Copy the token and add it to your .env file

Usage

Start the MCP Server

npm start

Or for development:

npm run dev

Integration with Claude Desktop

Add this server to your Claude Desktop configuration:

{
  "mcpServers": {
    "zephyr": {
      "command": "node",
      "args": ["/path/to/mcp-zephyr/dist/index.js"],
      "env": {
        "ZEPHYR_API_TOKEN": "your_api_token_here",
        "ZEPHYR_BASE_URL": "https://api.zephyrscale.smartbear.com/v2",
        "ZEPHYR_PROJECT_KEY": "your_project_key_here"
      }
    }
  }
}

Available Tools

Test Case Management

zephyr_list_test_cases

List test cases in a project.

  • Parameters: projectKey, maxResults, startAt

zephyr_get_test_case

Get a specific test case by key.

  • Parameters: testCaseKey

zephyr_create_test_case

Create a new test case.

  • Parameters: projectKey, name, objective, precondition, status, priority, component, estimatedTime, labels, steps

zephyr_update_test_case

Update an existing test case.

  • Parameters: testCaseKey, plus any fields to update

zephyr_delete_test_case

Delete a test case.

  • Parameters: testCaseKey

zephyr_search_test_cases

Search test cases using JQL.

  • Parameters: jql, maxResults

Test Execution Management

zephyr_list_test_executions

List executions for a test cycle.

  • Parameters: testCycleKey, maxResults

zephyr_get_test_execution

Get a specific test execution.

  • Parameters: executionKey

zephyr_create_test_execution

Create a new test execution.

  • Parameters: testCaseKey, testCycleKey, status, executedBy, actualTime, comment, defects, stepResults

zephyr_update_test_execution

Update an existing test execution.

  • Parameters: executionKey, plus any fields to update

zephyr_bulk_create_test_executions

Create multiple test executions at once.

  • Parameters: executions (array)

zephyr_get_test_case_executions

Get all executions for a test case.

  • Parameters: testCaseKey, maxResults

zephyr_get_test_results

Get test results for a test cycle.

  • Parameters: testCycleKey, maxResults

Test Cycle Management

zephyr_list_test_cycles

List test cycles in a project.

  • Parameters: projectKey, maxResults

zephyr_get_test_cycle

Get a specific test cycle.

  • Parameters: testCycleKey

zephyr_create_test_cycle

Create a new test cycle.

  • Parameters: projectKey, name, description, status, environment, startDate, endDate

zephyr_update_test_cycle

Update an existing test cycle.

  • Parameters: testCycleKey, plus any fields to update

zephyr_add_test_cases_to_cycle

Add test cases to a test cycle.

  • Parameters: testCycleKey, testCaseKeys (array)

zephyr_remove_test_cases_from_cycle

Remove test cases from a test cycle.

  • Parameters: testCycleKey, testCaseKeys (array)

Test Plan Management

zephyr_list_test_plans

List test plans in a project.

  • Parameters: projectKey, maxResults

zephyr_get_test_plan

Get a specific test plan.

  • Parameters: testPlanKey

zephyr_create_test_plan

Create a new test plan.

  • Parameters: projectKey, name, description, status, startDate, endDate

zephyr_update_test_plan

Update an existing test plan.

  • Parameters: testPlanKey, plus any fields to update

Examples

Creating a Test Case

await zephyr_create_test_case({
  projectKey: "PROJ",
  name: "User Login Test",
  objective: "Verify users can successfully log in with valid credentials",
  precondition: "User must have valid account",
  status: "Draft",
  priority: "High",
  steps: [
    {
      action: "Navigate to login page",
      expected: "Login page is displayed",
      stepIndex: 1
    },
    {
      action: "Enter valid username and password",
      expected: "Fields accept input",
      stepIndex: 2
    },
    {
      action: "Click login button",
      expected: "User is redirected to dashboard",
      stepIndex: 3
    }
  ]
});

Creating a Test Execution

await zephyr_create_test_execution({
  testCaseKey: "PROJ-T1",
  testCycleKey: "PROJ-C1",
  status: "Pass",
  executedBy: "test.user@company.com",
  actualTime: 5,
  comment: "All steps executed successfully",
  stepResults: [
    {
      stepIndex: 0,
      status: "Pass",
      actual: "Login page loaded correctly"
    },
    {
      stepIndex: 1,
      status: "Pass",
      actual: "Credentials accepted"
    },
    {
      stepIndex: 2,
      status: "Pass",
      actual: "Successfully redirected to dashboard"
    }
  ]
});

Searching Test Cases

await zephyr_search_test_cases({
  jql: "project = PROJ AND status = 'Draft' AND priority = High",
  maxResults: 25
});

Error Handling

The server provides detailed error messages for common issues:

  • Authentication errors: Invalid API token
  • Authorization errors: Insufficient permissions
  • Validation errors: Invalid input data
  • Network errors: Connection issues
  • API limits: Rate limiting exceeded

Development

Project Structure

src/
├── index.ts                 # Main MCP server entry point
├── zephyr-client.ts        # Zephyr API client
├── types.ts                # TypeScript type definitions
└── tools/                  # MCP tool implementations
    ├── test-case-tools.ts
    ├── test-execution-tools.ts
    ├── test-cycle-tools.ts
    └── test-plan-tools.ts

Building

npm run build

Testing

npm run dev

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

For issues related to:

Changelog

v1.0.0

  • Initial release
  • Full test case management
  • Test execution tracking
  • Test cycle and plan management
  • Bulk operations support
  • JQL search functionality

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选