
Zephyr Scale Mcp
io.github.vilaabo由 GitHub 帳號 vilaabo 發布v1.0.0更新於 Oct 24, 2026
Zephyr Scale on self-hosted Jira Server/DC: test cases, cycles, executions, plans and attachments
概覽
本機 MCP 伺服器,為 AI 助理提供 54 個工具,用來在自架 Jira Server/Data Center 上管理 Zephyr Scale 的測試案例、測試週期、執行結果、測試計畫與附件。
- 可以做什麼
- 建立、讀取、搜尋、更新、複製、移動與刪除測試案例,支援逐步、純文字與 BDD 腳本,並支援批次建立、連結 Jira 議題與涵蓋率報告。建立、讀取、搜尋、刪除與重建測試週期,並提供摘要與分頁結果。記錄、更新與批次建立執行結果,查詢某個案例的最新結果。建立、讀取、更新、搜尋與刪除測試計畫。建立與重新命名資料夾,上傳、列出、下載與刪除附件。發佈自動化與 Cucumber 結果壓縮檔,匯出 BDD 功能檔,並執行健康檢查、環境與 Jira 使用者查詢。
- 適用情境
- 適用於團隊在自架 Jira Server 或 Data Center 上以 Zephyr Scale 管理測試,並希望助理草擬案例、記錄結果、追蹤議題涵蓋率或匯入自動化報告的情境。它不適用於 Zephyr Scale Cloud 或 Zephyr Squad。
- 執行需求
- 透過 npx 在本機執行,需要 Node.js 20 或更新版本。需要可存取的、已安裝 Zephyr Scale 外掛的 Jira Server/DC 執行個體,以 JIRA_BASE_URL 指定;並提供 JIRA_PAT 中的個人存取權杖(預設模式),或設定 JIRA_AUTH=basic 並提供 JIRA_USERNAME 與 JIRA_PASSWORD。選用設定包括預設專案鍵、逾時、重試、唯讀模式與內部 API 工具。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Zephyr Scale Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
zephyr-scale-mcp
MCP server for Zephyr Scale on self-hosted Jira Server / Data Center (formerly TM4J). It gives an AI agent — Claude Code, Claude Desktop, Cursor, any MCP client — 54 tools over your test management: test cases, folders, test cycles, executions, test plans, attachments and automation imports, through the Zephyr Scale REST API v1 at {JIRA_BASE_URL}/rest/atm/1.0.
[Node] [TypeScript] [Tests] [License] [API]
npm: zephyr-scale-mcp · MCP Registry: io.github.vilaabo/zephyr-scale-mcp · Русская версия →
⚠️ Scope: Server / Data Center only. Zephyr Scale Cloud (API v2) and Zephyr Squad are different APIs and are out of scope — this server will not work against them.
Why this exists
Most Zephyr MCP servers target the Cloud API. If your Jira is on-premise you get the v1 API instead, and v1 has teeth: test runs are immutable after creation, folders cannot be listed, statuses are case-sensitive internal names, BDD scripts reject a Feature: header, and older plugin builds are missing whole endpoints. This server encodes that knowledge instead of leaving the agent to discover it one 400 at a time.
- 54 tools (42 public + 12 opt-in internal-API tools), each with a description that states the endpoint, the constraints a caller cannot guess, and the exact response shape.
- Composite tools for the API's blind spots —
add_test_stepsmerges steps by id (read → merge → write) so nothing is silently deleted;recreate_test_run_with_itemsworks around run immutability and can carry the last results over;get_issue_test_coverage,get_test_run_summary,clone_test_case,move_test_cases_to_folder. - Degradation on older builds — automatic fallback when the paginated results endpoint is absent, and a per-item fallback when the bulk create endpoint is broken. Both were found on a real legacy instance, not in a changelog.
- Plumbing that fails loudly — strict zod input validation,
Retry-After-aware retries with exponential backoff, error messages carrying actionable hints, read-only mode, secrets kept out of logs and tool output. - 1181 unit and contract tests (vitest + msw, no network) plus a gated end-to-end scenario against a real instance.
Quick start
Requirements: Node.js >= 20, Jira Server/DC with the Zephyr Scale plugin, and a Personal Access Token (Jira 8.14+) or a username/password pair.
Nothing to clone — the package is on npm. Claude Code:
Claude Desktop / any MCP client (claude_desktop_config.json, .mcp.json):
Running from source instead
Then point the client at the build: "command": "node", "args": ["/path/to/zephyr-scale-mcp/dist/index.js"].
ZEPHYR_ALLOW_INTERNAL_API=trueis optional and recommended. It registers 12 extra tools that reach the things the public API cannot do at all: editing a test run in place — renaming or moving it (update_test_run) and adding or removing cases without changing its key (add_test_cases_to_run,remove_test_cases_from_run) — plus listing the folder tree (get_folder_tree), deleting folders (delete_folder), editing older executions (update_test_result_by_id) and reading the exact status names the API silently expects (get_status_options). These call the same undocumented/rest/tests/1.0endpoints the Jira UI itself uses; the vendor does not support them and they may differ or be absent on another Zephyr Scale version. Leave the flag off if that trade-off is not acceptable — the other 42 tools are unaffected.
Then ask the agent to run health_check. It verifies connectivity and credentials via GET /rest/api/2/myself and, when ZEPHYR_DEFAULT_PROJECT_KEY is set, that the Zephyr plugin answers on /rest/atm/1.0.
What you can ask your agent to do
- "Create the folder
/Regression/Paymentsand add step-by-step test cases for the checkout flow described in this document." - "Find every Draft case in
/Regression, review them, and set the ready ones to Approved." - "Create a cycle for sprint 42 with all smoke cases, then record the results from this report — step by step where the script has steps."
- "Which test cases cover PROJ-123, and when did each of them last pass?" — traceability from the issue to its cases and their latest executions.
- "Take this ZIP of Cucumber JSON reports and publish it as a new cycle in PROJ." — automation import; scenarios are matched to BDD cases by their
@TestCaseKey=PROJ-T1tag. - "Add two steps to PROJ-T55 after step 3." — existing steps and their ids survive.
- "Recreate cycle PROJ-R7 with three more cases, keep the results, and delete the original."
Configuration
Two guarantees the tests cover: JIRA_PAT and JIRA_PASSWORD never appear in logs, tool output or error messages — in any encoding they can take on the way out: raw, JSON-escaped, or the base64 basic-auth token (error text carries the method and path only — never the query string, which may contain data) — and stdout is reserved for the MCP protocol, every log line goes to stderr. One deliberate exception: a secret shorter than six characters is left alone, because redacting it would corrupt unrelated output while protecting nothing; the server warns about it at startup.
Configuration is validated at startup: all problems are reported at once and the process exits with a non-zero code rather than starting half-configured.
Tools
54 tools. The 42 public ones are always registered; the 12 in the last group only with ZEPHYR_ALLOW_INTERNAL_API=true.
Test cases — 13 tools
Test cycles (test runs) — 7 tools
Executions (test results) — 4 tools
Items that exist several times in a run (per environment or per assignee) are disambiguated with matchEnvironment / matchUserKey, sent as query parameters.
Test plans — 5 tools
Folders — 2 tools
Attachments — 4 tools
Automation — 3 tools
Service and diagnostics — 4 tools
UNOFFICIAL — internal API, opt-in — 12 tools
Registered only with ZEPHYR_ALLOW_INTERNAL_API=true. These call /rest/tests/1.0, the undocumented API behind the Jira UI. The vendor does not support it: endpoints may differ or be absent on another Zephyr Scale version, and a 404/405 from one of these tools means exactly that. Every request shape below was either captured from the Jira UI's own traffic or verified live against a real instance — never guessed. Errors from this layer carry a hint saying so.
Working around API v1
These are the constraints the server is built around. Every tool description repeats the ones relevant to it, so the agent sees them at call time.
- Test runs are immutable. There is no
PUT /testrun: a run cannot be renamed, moved, or have cases added or removed. Its items are fixed at creation and the run status is derived from item statuses. Escape hatches:recreate_test_run_with_items(public, produces a new key) or the internalupdate_test_run/add_test_cases_to_run/remove_test_cases_from_run(same key). - Folders are never created implicitly.
create_test_case,create_test_runandcreate_test_planfail with 400 on an unknown folder. Folders also cannot be listed through the public API, and renaming needs the numeric id returned bycreate_folder— orget_folder_treewith the internal API enabled. owner/executedBy/assignedTotake a Jira user key (JIRAUSER10000), never a username or an e-mail.find_jira_userresolves it.- TQL is strict: spaces around operators are mandatory, string values go in double quotes,
ANDis the only connector (noOR), and folder paths start with/. Test runs are searchable byprojectKeyandfolderonly. For single/multi-choice custom fields=does not work — useIN. - Statuses, priorities and environments are case-sensitive internal names. Built-in statuses are shown localized in the UI (the label you see for
Draftmay be a translation) while custom ones use their literal names —get_status_optionsshows what the API actually expects. A wrong execution status is silently ignored by the public API. - A BDD script is the scenario body only — bare
Given/When/Then/And/Butlines. Text wrapped inFeature:/Scenario:is rejected with400 Invalid BDD Script; the wrapper is generated on export. STEP_BY_STEPsteps are synchronized by id onPUT: a step without an id is created, a step with an id is updated, and every stored step missing from the list is deleted. Always send the complete final list with ids carried over fromget_test_case— or letadd_test_stepsdo the read-merge-write.- Deprecated fields are intentionally not accepted: use
issueLinksinstead ofissueKey,actualEndDateinstead ofexecutionDate,executedByinstead ofuserKey.
Quirks of older plugin builds
All of the following was observed live on a real legacy Zephyr Scale Server instance and is covered by tests.
- Cycle keys may use the
-Cprefix (PROJ-C34) instead of-R. Every run-key parameter takes the key as-is, so pass whatever your instance shows. GET /testrun/{key}/testresults/pagemay not exist.get_test_run_resultsandget_test_run_summaryfall back to the deprecated flat endpoint and paginate client-side, adding anoteto the response. A run that genuinely does not exist still surfaces as a 404.- An overall
statussent together withscriptResultsis ignored. Send the step results first, then set the overall status withupdate_last_test_result. POST /testcase/link-issuesmay answer 500. Link throughupdate_test_casewithissueLinksinstead.POST /testcase/bulkmay answer HTTP 500 with an empty body for any payload while single creation works.create_test_cases_bulkfalls back to creating the cases one by one — on any5xx, and on a JSON404(which means "no such endpoint on this build", unlike the HTML404Jira serves when the plugin is absent) — and reports which ones succeeded (#1). Every other4xxis a payload error and is not retried.- Posting a result for a case that is not among the run's items silently adds it to the run on this build; other builds reject the call with 400/404. The result tools document both.
- The custom automation-results format is validated strictly.
{"version": 1, "executions": [{"source", "result", "testCase": {"key"}}]}works; extra per-execution fields such asexecutionTimeare rejected withInvalid Custom Format JSON file. Cucumber JSON reports work as-is when the scenario carries@TestCaseKey=PROJ-T1. download_feature_filesrequires thetqlquery parameter — the API rejects the call without it.- The last execution of a run item cannot be deleted.
delete_test_resultsrejects it; remove the item instead. - Custom fields may be absent entirely — the definitions endpoint then returns
[].
Development
The smoke scenario is skipped unless ZEPHYR_E2E=1. It needs a real JIRA_BASE_URL, credentials and a dedicated ZEPHYR_DEFAULT_PROJECT_KEY — it creates and deletes real entities and leaves /mcp-smoke-* folders behind, since the public API cannot delete folders.
Versioning and changelog
Version 1.0.0. Tool names, parameter names and response shapes are a public contract from this release on and change only in a major version. See CHANGELOG.md.
License
來源:README.md,提交 9c43dc5
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分