
zephyr mcp
实现与 Zephyr Scale Cloud API 交互的 MCP 服务器,用于管理测试用例、周期和执行。
Repository Info
About This Server
实现与 Zephyr Scale Cloud API 交互的 MCP 服务器,用于管理测试用例、周期和执行。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Zephyr Scale MCP Server
This project implements a Model Context Protocol (MCP) server for interacting with the Zephyr Scale Cloud API. It allows Cline (or other compatible MCP clients) to manage Zephyr Scale resources like test cases, test cycles, and test executions.
Prerequisites
- Bun (v1.2.10 or later recommended)
Setup
-
Clone the repository (if applicable):
git clone <repository-url> cd zephyr-mcp -
Install dependencies:
bun install -
Configure Environment Variables:
-
Copy the example environment file:
cp .env.example .env -
Edit the
.envfile and add your Zephyr Scale API Key and Base URL:ZEPHYR_API_KEY=YOUR_ZEPHYR_SCALE_API_KEY ZEPHYR_BASE_URL=YOUR_ZEPHYR_SCALE_BASE_URL # e.g., https://api.zephyrscale.smartbear.com/v2 -
Generating a Zephyr Scale API Key:
- Log in to your Jira instance.
- Navigate to your user menu (top right corner) and select "Zephyr Scale API Access Tokens".
- Click "Create Access Token".
- Copy the generated Access Token (PAT) immediately – you won't be able to see it again. This token is your
ZEPHYR_API_KEY.
-
ZEPHYR_BASE_URL: The base URL for the Zephyr Scale Cloud API corresponding to your instance's region. This is crucial for the server to connect to the correct endpoint.- Acceptable Values (based on official documentation):
- Default/US Region:
https://api.zephyrscale.smartbear.com/v2 - EU Region:
https://eu.api.zephyrscale.smartbear.com/v2
- Default/US Region:
- Ensure you use the correct URL for your region in the
.envfile.
- Acceptable Values (based on official documentation):
-
Running the Server
To start the MCP server:
bun run src/index.ts
The server will start and listen for incoming MCP requests. Ensure the ZEPHYR_API_KEY is correctly set in your environment or .env file.
Available Tools
This server provides a comprehensive set of tools to interact with Zephyr Scale. All tools are grouped by their functionality below:
Test Case Tools
-
get_test_case: Get a specific test case by its key.- Required parameters:
testCaseKey(string): The key of the test case (e.g., PROJ-T123)
- Returns both test case info and test steps in a single response.
- Required parameters:
-
list_test_cases: List test cases with optional filtering by project, folder, or Jira issue.- Optional parameters:
projectKey(string): Key of the project (e.g., PROJ)folderId(number): Numeric ID of the folderjiraIssueKey(string): Key of the linked Jira issue (e.g., PROJ-456)- Pagination parameters (e.g.,
maxResults,startAt) are supported
- Optional parameters:
-
create_test_case: Create a new test case.- Required parameters:
name(string): Name of the test caseprojectKey(string): Key of the project
- Optional parameters:
folderId(number): Folder to place the test case instatusId(number): Status of the test casepriorityId(number): Priority of the test caseownerId(number): Owner of the test casejiraIssueKey(string): Jira issue to linklinks(array): Array of links to associateparameters(object): Test case parameterstestScript(object): Test script informationtestSteps(object): Test steps information
- Required parameters:
-
update_test_case: Update an existing test case.- Required parameters:
testCaseKey(string): The key of the test case to update
- Optional parameters:
name(string): New name for the test casefolderId(number): New folder IDstatusId(number): New status IDpriorityId(number): New priority IDownerId(number): New owner IDjiraIssueKey(string): New Jira issue key to linklinks(array): New links to associateparameters(object): Updated parameterstestScript(object): Updated test scripttestSteps(object): Updated test steps
- Required parameters:
-
get_test_case_links: Get links associated with a test case.- Required parameters:
testCaseKey(string): The key of the test case
- Required parameters:
-
create_test_case_issue_link: Create an issue link for a test case.- Required parameters:
testCaseKey(string): The key of the test caseissueKey(string): The key of the issue to link
- Required parameters:
-
create_test_case_web_link: Create a web link for a test case.- Required parameters:
testCaseKey(string): The key of the test caseurl(string): The URL to link
- Optional parameters:
description(string): Description of the link
- Required parameters:
-
get_test_case_test_script: Get the test script for a test case.- Required parameters:
testCaseKey(string): The key of the test case
- Required parameters:
-
create_test_case_test_script: Create or update the test script for a test case.- Required parameters:
testCaseKey(string): The key of the test casetype(string): The type of test script (one of: "STEP_BY_STEP", "BDD", "PLAIN")
- Optional parameters:
text(string): The content of the test scriptsteps(array): Array of test steps
- Required parameters:
-
get_test_case_test_steps: Get the test steps for a test case.- Required parameters:
testCaseKey(string): The key of the test case
- Required parameters:
-
create_test_case_test_steps: Create or update test steps for a test case.-
Required parameters:
-
testCaseKey(string): The key of the test case -
steps(array): Array of test step objects with the following structure:[ { "description": "Step description (e.g., 'Login to application')", "expectedResult": "Expected outcome (e.g., 'User should be logged in successfully')", "testData": "Optional test data (e.g., 'username: admin, password: admin123')" } ]
-
-
Optional parameters:
mode(string): Mode for creating test steps - "OVERWRITE" (default) or "APPEND"
-
-
update_test_case_test_steps: Update test steps for a test case with specified mode.- Required parameters:
testCaseKey(string): The key of the test casesteps(array): Array of test step objects (same structure as create_test_case_test_steps)
- Optional parameters:
mode(string): Mode for updating test steps - "OVERWRITE" (default) or "APPEND"- "OVERWRITE": Replaces all existing test steps with the new ones
- "APPEND": Adds the new test steps to the end of the existing list
- Required parameters:
Test Cycle Tools
-
get_test_cycle: Get a specific test cycle by its ID or key.- Required parameters:
testCycleIdOrKey(string): The ID or key of the test cycle
- Required parameters:
-
list_test_cycles: List test cycles with optional filtering.- Optional parameters:
projectKey(string): Key of the projectfolderId(number): ID of the folderjiraIssueKey(string): Key of a linked Jira issue- Pagination parameters (e.g.,
maxResults,startAt) are supported
- Optional parameters:
-
create_test_cycle: Create a new test cycle.- Required parameters:
name(string): Name of the test cycleprojectKey(string): Key of the project
- Optional parameters:
folderId(number): Folder to place the test cycle instatusId(number): Status of the test cycleownerId(number): Owner of the test cyclestartDate(string): Start date in ISO formatendDate(string): End date in ISO formatjiraIssueKey(string): Jira issue to linklinks(array): Array of links to associate
- Required parameters:
-
update_test_cycle: Update an existing test cycle.- Required parameters:
testCycleIdOrKey(string): The ID or key of the test cycle to update
- Optional parameters:
name(string): New name for the test cyclefolderId(number): New folder IDstatusId(number): New status IDownerId(number): New owner IDstartDate(string): Updated start dateendDate(string): Updated end datejiraIssueKey(string): New Jira issue keylinks(array): Updated links
- Required parameters:
Test Execution Tools
-
get_test_execution: Get a specific test execution by its ID or key.- Required parameters:
testExecutionIdOrKey(string): The ID or key of the test execution
- Required parameters:
-
list_test_executions: List test executions with optional filtering.- Optional parameters:
projectKey(string): Key of the projecttestCaseKey(string): Key of the test casetestCycleKey(string): Key of the test cyclestatusId(number): Filter by status IDenvironmentId(number): Filter by environment IDownerId(number): Filter by owner IDjiraIssueKey(string): Filter by linked Jira issue- Pagination parameters (e.g.,
maxResults,startAt) are supported
- Optional parameters:
-
create_test_execution: Create a new test execution.- Required parameters:
projectKey(string): Key of the projecttestCaseKey(string): Key of the test case
- Optional parameters:
testCycleKey(string): Key of the test cyclestatusId(number): Status of the executionenvironmentId(number): Environment IDownerId(number): Owner of the executionexecutedDate(string): Date of execution in ISO formatjiraIssueKey(string): Jira issue to linklinks(array): Array of links to associatetestSteps(object): Test steps information
- Required parameters:
-
update_test_execution: Update an existing test execution.- Required parameters:
testExecutionIdOrKey(string): The ID or key of the test execution to update
- Optional parameters:
statusId(number): New status IDenvironmentId(number): New environment IDownerId(number): New owner IDexecutedDate(string): Updated execution datejiraIssueKey(string): New Jira issue keylinks(array): Updated linkstestSteps(object): Updated test steps
- Required parameters:
-
get_test_execution_test_steps: Get the test steps for a test execution.- Required parameters:
testExecutionIdOrKey(string): The ID or key of the test execution
- Required parameters:
-
update_test_execution_test_steps: Update test steps for a test execution.- Required parameters:
testExecutionIdOrKey(string): The ID or key of the test executiontestSteps(object): Updated test step information
- Required parameters:
Project Tools
-
get_project: Get a specific project by its ID or key.- Required parameters:
projectIdOrKey(string): The ID or key of the project
- Required parameters:
-
list_projects: List all accessible projects.- No required parameters
- Pagination parameters (e.g.,
maxResults,startAt) are supported
Folder Tools
-
get_folder: Get a specific folder by its ID.- Required parameters:
folderId(number): The ID of the folder
- Required parameters:
-
list_folders: List folders with optional filtering.- Optional parameters:
projectKey(string): Key of the projecttype(string): Type of the folder (one of: "TEST_CASE", "TEST_CYCLE")- Pagination parameters (e.g.,
maxResults,startAt) are supported
- Optional parameters:
-
create_folder: Create a new folder.- Required parameters:
name(string): Name of the foldertype(string): Type of the folder (one of: "TEST_CASE", "TEST_CYCLE")projectKey(string): Key of the project
- Optional parameters:
description(string): Description of the folderparentFolderId(number): ID of the parent folder
- Required parameters:
Status, Priority, and Environment Tools
-
list_statuses: List available statuses with optional filtering.- Optional parameters:
type(string): Type of status (one of: "TEST_CASE", "TEST_CYCLE", "TEST_EXECUTION")projectKey(string): Key of the project- Pagination parameters (e.g.,
maxResults,startAt) are supported
- Optional parameters:
-
list_priorities: List all available priorities.- No required parameters
- Pagination parameters (e.g.,
maxResults,startAt) are supported
-
list_environments: List all available environments.- No required parameters
- Pagination parameters (e.g.,
maxResults,startAt) are supported
Link Tools
delete_link: Delete a link by its ID.- Required parameters:
linkId(number): The ID of the link to delete
- Required parameters:
Example Usage
Here are a few examples of how to use these tools:
// Get a list of all projects
{
"tool_name": "list_projects",
"arguments": {}
}
// Get a list of test cases with pagination
{
"tool_name": "list_test_cases",
"arguments": {
"projectKey": "YOUR-PROJECT-KEY",
"maxResults": 10,
"startAt": 0
}
}
// Get a specific test case
{
"tool_name": "get_test_case",
"arguments": {
"testCaseKey": "YOUR-PROJECT-KEY-T123"
}
}
// Create a new test case
{
"tool_name": "create_test_case",
"arguments": {
"name": "Login Authentication Test",
"projectKey": "YOUR-PROJECT-KEY",
"priorityId": 1,
"statusId": 2
}
}
// Create a new test cycle
{
"tool_name": "create_test_cycle",
"arguments": {
"projectKey": "YOUR-PROJECT-KEY",
"name": "Sprint 12 Regression",
"startDate": "2025-05-01T00:00:00Z",
"endDate": "2025-05-15T00:00:00Z"
}
}
// Create a test execution
{
"tool_name": "create_test_execution",
"arguments": {
"projectKey": "YOUR-PROJECT-KEY",
"testCaseKey": "YOUR-PROJECT-KEY-T123",
"testCycleKey": "YOUR-PROJECT-KEY-R1",
"statusId": 1
}
}
// Create test steps for a test case
{
"tool_name": "create_test_case_test_steps",
"arguments": {
"testCaseKey": "YOUR-PROJECT-KEY-T123",
"steps": [
{
"description": "Navigate to login page",
"expectedResult": "Login page should be displayed",
"testData": "URL: https://app.example.com/login"
},
{
"description": "Enter valid credentials",
"expectedResult": "User should be logged in successfully",
"testData": "username: testuser, password: testpass123"
}
],
"mode": "OVERWRITE"
}
}
// Update test steps (append new steps)
{
"tool_name": "update_test_case_test_steps",
"arguments": {
"testCaseKey": "YOUR-PROJECT-KEY-T123",
"steps": [
{
"description": "Verify dashboard widgets",
"expectedResult": "All dashboard widgets should be displayed correctly"
}
],
"mode": "APPEND"
}
}
LICENCE
This project is licensed under the MIT License - see the LICENCE file for details.
Quick Start
Clone the repository
git clone https://github.com/cosmix/zephyr-mcpInstall dependencies
cd zephyr-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.