QTM4J MCP Server
The QTM4J MCP Server provides 42 tools to interact with QMetry Test Management for Jira (QTM4J), enabling full lifecycle management of test assets. All tools support pagination, input validation, automatic retry on rate limits, and optional markdown response format.
Test Cases
Create, retrieve, search, update, delete, and clone test cases
Create and update individual test steps (with step details, expected results, and test data)
Test Cycles
Create, retrieve, search, update, and delete test cycles
Test Executions
List all executions within a test cycle
Update a single execution result (Pass, Fail, Blocked, WIP, Not Executed)
Update step-level execution results
Bulk update multiple executions with the same result, environment, or build
Test Plans
Create, retrieve, search, update, and delete test plans
Link/unlink test cycles to a plan and retrieve all linked cycles
Folders
List folders by type (TESTCASE, TESTCYCLE, TESTPLAN) as a nested tree
Create new folders under a parent or at root level
Automation
Link/unlink automation rules to test cycles
Trigger automation rules against a specific test cycle
Metadata (Read-only)
Retrieve projects, priorities, statuses, environments, builds, labels, components, execution results, custom fields, parameters, and user permissions
Mentions that the Swagger spec does not currently document a framework-style automation import-result endpoint for Cucumber ingestion, indicating awareness of but not direct integration with Cucumber test automation framework.
Provides tools for interacting with QMetry Test Management for Jira Cloud (QTM4J) REST API, enabling AI agents to manage test cases, test cycles, test executions, test plans, folders, and automation rules within QMetry's test management platform.
Integrates with QMetry Test Management for Jira Cloud (QTM4J), providing tools to manage test cases, test cycles, test executions, test plans, and automation rules that are linked to Jira projects. Note: projectId must be the numeric Jira project ID, not the project key.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@QTM4J MCP Server search for test cases in project 10011 with status Approved"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
QTM4J MCP Server
An MCP server with 87 tools for QMetry Test Management for Jira (QTM4J). Search and manage test cases, cycles, executions, plans, folders, comments, defects, automation rules, and project metadata from Claude Desktop, Claude Code, VS Code Copilot, Cursor, or any MCP-compatible client.
Distribution:
npm:
qtm4j-mcp-serverMCP Registry:
io.github.salehrifai42/qtm4j-mcp-serverGitHub:
salehrifai42/qmetrymcp
Quick start (no clone required)
You need a QMetry API key (QMetry → API Keys) and Node.js 18+.
Claude Desktop
Edit your config file and restart Claude:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"qtm4j": {
"command": "npx",
"args": ["-y", "qtm4j-mcp-server@^0.1"],
"env": {
"QTM4J_API_KEY": "your-api-key-here",
"QTM4J_REGION": "US"
}
}
}
}Claude Code (CLI)
claude mcp add qtm4j -e QTM4J_API_KEY=your-api-key-here -e QTM4J_REGION=US -- npx -y qtm4j-mcp-server@^0.1VS Code (GitHub Copilot Agent mode)
Create .vscode/mcp.json in your workspace:
{
"servers": {
"qtm4j": {
"type": "stdio",
"command": "npx",
"args": ["-y", "qtm4j-mcp-server@^0.1"],
"env": {
"QTM4J_API_KEY": "${env:QTM4J_API_KEY}",
"QTM4J_REGION": "US"
}
}
}
}Switch Copilot Chat to Agent mode and the qtm4j_* tools appear automatically.
Cursor
Add to ~/.cursor/mcp.json (or <project>/.cursor/mcp.json for project-level):
{
"mcpServers": {
"qtm4j": {
"command": "npx",
"args": ["-y", "qtm4j-mcp-server@^0.1"],
"env": { "QTM4J_API_KEY": "your-api-key-here" }
}
}
}The example configs above pin the package to
^0.1so a future breaking release won't auto-upgrade you. Drop the@^0.1suffix if you'd rather always run the latest.
Global install (faster startup)
npx re-resolves the package on every launch, which adds a few seconds of startup latency. If you use the server frequently, install it globally and point your client at the binary directly:
npm install -g qtm4j-mcp-serverThen in your client config, replace the npx command:
{
"mcpServers": {
"qtm4j": {
"command": "qtm4j-mcp-server",
"env": {
"QTM4J_API_KEY": "your-api-key-here",
"QTM4J_REGION": "US"
}
}
}
}Tradeoff: instant startup and works offline, but you'll need to run npm update -g qtm4j-mcp-server to get new versions.
Related MCP server: qtm4j-mcp-server
Configuration
Variable | Required | Default | Description |
| yes | — | QMetry API key, sent on every request as the |
| no |
|
|
💡 Set
QTM4J_REGION=AUif your QMetry instance is on the Sydney cluster.
Tools
All tools are prefixed with qtm4j_ to avoid collisions with other MCP servers.
Area | Tools |
Test Cases |
|
Test Cycles |
|
Test Executions |
|
Test Plans |
|
Comments |
|
Defects |
|
Folders |
|
Automation |
|
Metadata (read-only) |
|
See docs/TOOLS.md for the full reference and docs/COOKBOOK.md for example prompts colleagues can paste into any MCP client.
Every tool ships with annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so clients can decide whether to ask for confirmation. Read tools accept a response_format parameter (json default, or markdown for human-readable output). Large responses are automatically truncated at 25k characters with a hint to narrow the query.
All tools validate inputs with Zod, paginate via startAt/maxResults, and automatically retry rate-limited (HTTP 429) responses with exponential back-off (up to 3 attempts).
Trying it out
Once connected, ask your assistant something like:
Search QMetry project
<your project ID>for test cases with status "To Do" and show me the first 5.
The client will call qtm4j_search_test_cases and render the response.
Get all executions in test cycle
<KEY>-TR-747and mark any unexecuted ones as Pass.
Example tool calls
Replace
<projectId>and<KEY>with your tenant's numeric Jira project ID and project key. Find them in the project URL:…?projectId=<projectId>&projectKey=<KEY>. Useqtm4j_get_execution_resultsto discover your tenant'sexecutionResultIdvalues.
// Search test cases
{
"name": "qtm4j_search_test_cases",
"arguments": {
"projectId": "<projectId>",
"status": ["Approved"],
"maxResults": 20,
"response_format": "markdown"
}
}
// Update an execution result
{
"name": "qtm4j_update_test_execution",
"arguments": {
"cycleId": "<internal-cycle-id>",
"testCaseExecutionId": "<internal-tc-execution-id>",
"executionResultId": "<pass-id>",
"comment": "Verified on staging"
}
}Troubleshooting
Tools don't appear in my client. Restart the client after editing config. Check
claude mcp list(Claude Code) or VS Code's MCP panel for connection status. On first run,npx -y qtm4j-mcp-servermay take a few seconds to download the package.401 Unauthorized. Your
QTM4J_API_KEYis invalid or expired. Generate a new one in QMetry → API Keys.404 on execution or search endpoints. Many endpoints want the internal numeric
id, not the human key like<KEY>-TR-747. Callqtm4j_get_test_cyclefirst to translate the key into the internal id.Empty or oversized folder response. Pass
folderIdtoqtm4j_list_foldersto scope to a subtree — full project trees on large projects can exceed the response size limit.projectIdrejected. Use the numeric Jira project ID, not the project key string. You can find it in the Jira project URL:…?projectId=<numeric-id>&projectKey=<KEY>.
Notes
Search endpoints use
POST /…/search— filters go in the body underfilter, pagination/sort on the query string. Tool handlers wrap this for you.204 No Contentresponses resolve as{ message: "…" }.The Swagger spec does not currently document a framework-style automation import-result endpoint (e.g. JUnit/TestNG/Cucumber ingestion); the automation tools cover the rules-run and rule-link flows exposed in the spec.
Development
Local setup if you want to modify the server:
git clone https://github.com/salehrifai42/qmetrymcp.git
cd qmetrymcp
npm install
npm run build
QTM4J_API_KEY=your-key npm startTest changes with the MCP Inspector:
QTM4J_API_KEY=your-key npx @modelcontextprotocol/inspector node dist/index.jsRun the unit tests (no API key or network needed — the HTTP client's transport is faked in-memory):
npm testReplicating the bulk xlsx import workflow
The repo ships a Claude Code skill (.claude/skills/xlsx-to-qmetry/) and a Python importer (scripts/import-xlsx-to-qmetry.py) for pushing folders of Excel test cases into QMetry. Tenant-specific IDs (project, parent folder, status, custom-field IDs, components) are kept out of git — you supply them in your own config.json.
First-run after cloning:
cp config.template.json config.json
# Edit config.json — fill in:
# connection.apiKey (QMetry → avatar → API Keys → Generate)
# connection.projectId (numeric Jira project ID)
# xlsxImport.parentFolderId (target folder for new test cases)
# xlsxImport.statusId (e.g. Draft / Approved)
# xlsxImport.apiTestFieldId (custom field ID for "API Test" toggle, if used)
# xlsxImport.options (Yes/No option IDs for that custom field)
# xlsxImport.componentIds (default components to attach; can be [])
cp .claude/commands/qtm4j.template.md .claude/commands/qtm4j.md
# Optional: populate qtm4j.md with your tenant's IDs using the GET endpoints listed inside.Discover the IDs you need with the running MCP server (qtm4j_get_projects, qtm4j_get_statuses, qtm4j_get_components, qtm4j_get_custom_fields, qtm4j_list_folders) or with node scripts/refresh-field-reference.mjs to dump everything to field_reference.json.
Then launch Claude Code from the repo root and the xlsx-to-qmetry skill auto-loads. Drop your workbooks under Input/<batch-name>/ and ask Claude to import them — see docs/EXCEL-IMPORT-GUIDE.md for the full workflow.
Bugs and contributions
Found a bug or want to suggest a feature? Open an issue at https://github.com/salehrifai42/qmetrymcp/issues. PRs welcome.
License
Available Tools
30 toolsbulk_update_test_executionsA
Apply the same execution result, environment, or build to multiple test case executions at once. Use testCycleTestCaseMapIds from get_test_cycle_executions (the 'testCycleTestCaseMapId' field). Returns 204 on success.
Inputs: cycleId (required), testCycleTestCaseMapIds (required), executionResultId, environmentId, +1 more.
clone_test_casesA
Bulk clone one or more test cases into a target project and optional folder. Returns a background task object with a taskId and progressUrl to poll for completion.
Inputs: testcaseIds (required), projectId (required), folderId.
create_folderA
Create a new folder under an existing parent folder. Use parentId=0 for root-level. folderName is required. Returns the created folder with its id. Use list_folders first to find valid parentId values.
Inputs: projectId (required), folderName (required), folderType (required), parentId (required), +1 more.
create_test_caseB
Create a new test case in QMetry. Returns the created test case object including its internal id and key (e.g. FS-TC-123). Priority, status, labels, and components use integer IDs — see field_reference.json for valid values.
Inputs: projectId (required), summary (required), precondition, priority, +7 more.
create_test_cycleA
Create a new test cycle in QMetry. Returns the created cycle with its internal id and key (e.g. FS-TR-123). Use list_folders with folderType=TESTCYCLE to find valid folderId values.
Inputs: projectId (required), summary (required), description, priority, +6 more.
create_test_planA
Create a new test plan in QMetry. Returns the created plan with its internal id and key (e.g. FS-TP-44). Use list_folders with folderType=TESTPLAN to find valid folderId values.
Inputs: projectId (required), summary (required), description, priority, +4 more.
create_test_stepsB
Add one or more test steps to a specific version of a test case. Each step has stepDetails (required), expectedResult, and testData. Returns the created step objects with their IDs.
Inputs: id (required), versionNo (required), steps (required).
delete_test_caseA
Permanently delete a specific version of a test case. If it is the only version, the test case is removed entirely. Returns 204 on success.
Inputs: id (required), versionNo (required).
delete_test_cycleA
Permanently delete a test cycle and all its execution records. This is irreversible. Returns 204 on success.
Inputs: id (required).
delete_test_planA
Permanently delete a test plan. This does not delete the linked test cycles. Returns 204 on success.
Inputs: id (required).
get_linked_test_cyclesA
List all test cycles currently linked to a test plan. Returns paginated list with id, key, status, priority per cycle. Use the plan's internal id (not key).
Inputs: id (required), startAt, maxResults, sort, +1 more.
get_test_caseA
Get a test case by its internal ID or key (e.g. FS-TC-31950). Returns an array of versions, each with versionNo, isLatestVersion, aiGenerated flag, and any test steps.
Inputs: id (required).
get_test_cycleA
Get a test cycle by its key (e.g. FS-TR-747) or internal id. Returns id, key, status, priority, projectId, archived flag. The internal 'id' returned here is required by get_test_cycle_executions and update_test_execution.
Inputs: id (required).
get_test_cycle_executionsA
List all test case executions linked to a test cycle. Requires the internal cycle id (from get_test_cycle, not the key). Returns testCycleTestCaseMapId (needed for bulk_update), testCaseExecutionId (needed for update_test_execution), key, status, and priority per test case.
Inputs: id (required), startAt, maxResults, sort, +1 more.
get_test_planA
Get a test plan by its key (e.g. FS-TP-43) or internal id. Returns id, key, projectId, archived flag. Use the internal 'id' when calling link/unlink/get_linked_test_cycles.
Inputs: id (required).
link_automation_ruleA
Associate an automation rule with a test cycle so it can be triggered for that cycle. automationRuleKey is the rule's string key from your QMetry automation config. Returns 200 on success.
Inputs: cycleId (required), automationRuleKey (required).
link_test_cycles_to_planA
Link one or more existing test cycles to a test plan. Use the plan's internal id (from get_test_plan or search_test_plans). testcycleIds are numeric integer IDs. Returns 204 on success.
Inputs: id (required), testcycleIds (required).
list_foldersA
List folders of a given type in a project as a nested tree with id, name, parentId, and children. Provide folderId to return only that subtree instead of the full project tree (recommended for large projects).
Inputs: projectId (required), folderType (required), folderId.
run_automation_rulesA
Trigger an automation rule to run against a specific test cycle. testCycleId is the internal id string (from get_test_cycle). Returns a background task object with taskId and progressUrl to poll for completion.
Inputs: automationRuleKey (required), projectId (required), testCycleId (required).
search_test_casesA
Search test cases in a project with optional filters. Returns total count and paginated data with id, key, version info, archived flag. Use status/priority name strings (e.g. 'To Do', 'High') not IDs. projectId must be numeric (10011). Set recursive=true with a folderId to count across all subfolders (returns total only, no data).
Inputs: projectId (required), labels, components, recursive, +9 more.
search_test_cyclesA
Search test cycles in a project. Returns total count and paginated list with id, key, status, priority, archived. The 'id' field in results is the internal ID needed for execution tools.
Inputs: projectId (required), folderId, status, priority, +6 more.
search_test_plansB
Search test plans in a project. Returns total count and paginated list with id, key, projectId, archived. The 'id' field is the internal ID needed for linking cycles.
Inputs: projectId (required), folderId, status, priority, +6 more.
unlink_automation_ruleA
Remove the association between an automation rule and a test cycle. Returns 200 on success.
Inputs: cycleId (required), automationRuleKey (required).
unlink_test_cycles_from_planA
Remove the link between one or more test cycles and a test plan. Does not delete the cycles themselves. Returns 204 on success.
Inputs: id (required), testcycleIds (required).
update_test_caseB
Update fields on a specific version of a test case. Requires both the test case id and versionNo (usually 1 for latest). Priority and status take integer IDs. Returns 204 on success.
Inputs: id (required), versionNo (required), summary, precondition, +7 more.
update_test_cycleA
Update a test cycle's metadata (summary, description, priority, status, dates, custom fields). Pass the internal id or key. Returns 204 on success.
Inputs: id (required), summary, description, priority, +5 more.
update_test_executionA
Update a single test case execution result inside a test cycle. Use testCaseExecutionId from get_test_cycle_executions. executionResultId: 239443=Not Executed, 239444=Pass, 239441=Fail, 239442=Work In Progress, 239440=Blocked. Returns 204 on success.
Inputs: cycleId (required), testCaseExecutionId (required), executionResultId, environmentId, +3 more.
update_test_planC
Update a test plan's priority or custom fields. Returns 204 on success.
Inputs: id (required), priority, customFields.
update_test_step_executionA
Update a single step-level execution result within a test case execution. testStepExecutionId comes from get_test_cycle_executions step data. Returns 200 with updated step data.
Inputs: cycleId (required), testStepExecutionId (required), executionResultId, actualResult, +1 more.
update_test_stepsA
Update existing test steps on a test case version. Each step must include its step id (from create_test_steps or get_test_case response). Returns the updated step objects.
Inputs: id (required), versionNo (required), steps (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 30 tools
Each tool targets a distinct entity or operation (folders, test cases, cycles, plans, executions, automation rules, linking). Despite high tool count, descriptions make purposes clear with no overlapping functionality.
All tools use a consistent verb_noun pattern in snake_case (e.g., create_folder, update_test_execution, search_test_plans). Variations between get/list/search are semantically justified by the operation type.
30 tools is on the high side, but the domain (test management) requires many entities and operations. While borderline heavy, most tools serve essential functions without redundancy.
Covers CRUD for core entities (test cases, cycles, plans, folders), steps, executions (single/bulk), linking, and automation. Missing delete for folders and some retrieval details, but core workflows are complete.
Maintenance
Related MCP Connectors
MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.
Official MCP server for Qase — manage test cases, runs, suites, defects via AI tools.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server to interact with the QMetry for Jira API, enabling management of test cases, test cycles, test plans, and more through well-defined tools.9388 npmApache 2.0
- AlicenseAqualityDmaintenanceMCP server for QTM4J (QMetry Test Management for Jira) Open API, enabling test case and cycle management via natural language.2139 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Zephyr Scale test management enabling test case, test run, folder, and assignment operations via natural language.2MIT
- AlicenseNot gradedqualityDmaintenanceAn 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