Skip to main content
Glama

QTM4J MCPサーバー

QMetry Test Management for Jira Cloud (QTM4J) REST APIを、Claude(またはその他のMCP互換クライアント)から呼び出せるツールとして公開するMCPサーバーです。

機能

主要なQTM4Jエンティティ全体で、最も一般的なCRUDフローをカバーするツールを提供します。

エリア

ツール

テストケース

create_test_case, get_test_case, search_test_cases, update_test_case, delete_test_case, clone_test_cases, create_test_steps, update_test_steps

テストサイクル

create_test_cycle, get_test_cycle, search_test_cycles, update_test_cycle, delete_test_cycle

テスト実行

get_test_cycle_executions, update_test_execution, update_test_step_execution, bulk_update_test_executions

テスト計画

create_test_plan, get_test_plan, search_test_plans, update_test_plan, delete_test_plan, link_test_cycles_to_plan, get_linked_test_cycles, unlink_test_cycles_from_plan

フォルダー

list_folders, create_folder

自動化

link_automation_rule, unlink_automation_rule, run_automation_rules

すべてのツールはZodで入力を検証し、startAt / maxResults を介してリストエンドポイントをページネーションします。また、レート制限(HTTP 429)が発生した応答に対しては、最大3回まで指数バックオフによる自動再試行を行います。

Related MCP server: qtm4j-mcp-server

要件

  • Node.js 18+ (ネイティブの fetch を使用)

  • QMetry APIキー (QMetry → API Keys から取得)

セットアップ (すべてのクライアントで共通)

1. クローン、インストール、ビルド:

git clone https://github.com/salehrifai42/qmetrymcp.git
cd qmetrymcp
npm install
npm run build

2. APIキーの追加 — 例をコピーしてキーを入力します:

cp .env.example .env

次に .env を編集します:

QTM4J_API_KEY=your-api-key-here
QTM4J_REGION=US

.env はgit-ignoredであり、コミットされることはありません。

3. リポジトリディレクトリでエディタ/IDEを開きます。 サーバーは起動時に自動的に .env を読み込むため、追加の設定は不要です:

  • Claude Code — このディレクトリで claude を実行します。.mcp.json は事前設定済みであり、qtm4j サーバーは自動的に接続されます。

  • GitHub Copilot (VS Code) — VS Codeでフォルダーを開き、Copilot Chatを Agent モードに切り替えます。.vscode/mcp.json は事前設定済みであり、qtm4j ツールが自動的に表示されます。

設定

サーバーは2つの環境変数を読み取ります:

変数

必須

デフォルト

説明

QTM4J_API_KEY

はい

—

QMetry APIキー。すべてのリクエストで apiKey ヘッダーとして送信されます

QTM4J_REGION

いいえ

US

US → https://qtmcloud.qmetry.com/rest/api/latest, AU → https://syd-qtmcloud.qmetry.com/rest/api/latest

ローカル設定リファレンス

一般的なフィールド値(プロジェクトID、ステータス、優先度、実行結果ID、フォルダーIDなど)を含む config.template.json が同梱されています。ローカル参照用にコピーしてください:

cp config.template.json config.json

config.json はgit-ignoredです。MCPサーバーは環境変数からのみ読み取ります。

手動での実行

QTM4J_API_KEY=your-key npm start

サーバーはstdio経由でMCPと通信します。通常は直接実行するのではなく、MCPクライアントが起動します。

MCPクライアントの設定

Claude Code (CLI)

.mcp.json はこのリポジトリに同梱されており、プロジェクトディレクトリでClaude Codeを開くと自動的に検出されます。確認方法:

claude mcp list

セッション内で /mcp を実行して、接続されているサーバーとそのツールを確認してください。

Claude Desktop

macOSの場合は ~/Library/Application Support/Claude/claude_desktop_config.json を編集し、Claude Desktopを再起動します:

{
  "mcpServers": {
    "qtm4j": {
      "command": "node",
      "args": ["/path/to/qmetrymcp/dist/index.js"],
      "env": {
        "QTM4J_API_KEY": "your-api-key-here",
        "QTM4J_REGION": "US"
      }
    }
  }
}

GitHub Copilot (VS Code)

.vscode/mcp.json はこのリポジトリに同梱されており、VS Codeでフォルダーを開くと自動的に検出されます。Copilot Chatを Agent モードに切り替えると、qtm4j ツールが自動的に表示されます。

試してみる

接続後、アシスタントに次のように尋ねてみてください:

QMetryプロジェクト10011でステータスが「To Do」のテストケースを検索し、最初の5件を表示して。

クライアントは { projectId: 10011, status: ["To Do"], maxResults: 5 } を指定して search_test_cases を呼び出し、応答を表示します。

テストサイクルFS-TR-747内のすべての実行を取得し、未実行のものをすべて「Pass」にマークして。

ツール呼び出しの例

// Search test cases in project with numeric ID 10011
{
  "name": "search_test_cases",
  "arguments": {
    "projectId": 10011,
    "status": ["Approved"],
    "maxResults": 20
  }
}

// Update an execution result (executionResultId: 239444=Pass, 239441=Fail, 239443=Not Executed)
{
  "name": "update_test_execution",
  "arguments": {
    "cycleId": "gxMbioKJsyEr3E",
    "testCaseExecutionId": 287595809,
    "executionResultId": 239444,
    "comment": "Verified on staging"
  }
}

エラーハンドリング

  • 2xx以外の応答は、HTTPステータスと解析されたAPIボディを含むツールエラーを返します。

  • ネットワークエラーは、説明的なエラーメッセージを返します。

  • 429応答は、指数バックオフ(合計最大3回)で自動的に再試行されます。

注意事項

  • projectId は数値のJiraプロジェクトID (例: 10011) である必要があり、プロジェクトキー (例: "FS") ではありません。JiraプロジェクトのURLから確認できます: …?projectId=10011&projectKey=FS。

  • 検索エンドポイントは POST /…/search を使用します。フィルターはボディの filter に、ページネーション/ソートはクエリ文字列に記述します。MCPハンドラーがこれを自動的にラップします。

  • 204 No Content を返す「更新」エンドポイントは、単純な { message: "…" } ペイロードで解決されます。

  • Swagger仕様には、現在フレームワーク形式の自動化インポート結果エンドポイント(例: JUnit/TestNG/Cucumberの取り込み)は記載されていません。ここでの自動化ツールは、仕様で公開されているルール実行およびルールリンクフローをカバーしています。

Available Tools

30 tools
bulk_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).

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.

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

    A3.7/5.0

    Scored across 30 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count3/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers