测试用例管理 MCP 服务器

用于与 Jira AIO 测试用例管理系统交互的模型上下文协议(MCP)服务器,提供获取、搜索、创建和更新测试用例、管理文件夹及关联 Jira 问题的功能。

  • by qamary666
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 qamary666/jira-aio-mcp-server

使用说明

AIO MCP Server

A Model Context Protocol (MCP) server for interacting with Jira AIO (All-in-One) Test Case Management System.

Features

  • Get test case details from AIO
  • Search test cases by project and/or folders
  • Get folder structure of a project
  • Get list of all projects in AIO
  • Create and update test cases (title, description, preconditions, steps, status, priority)
  • Link Jira issues as requirements when creating a case
  • Create folders and subfolders

Prerequisites

  • Node.js 18+
  • Access to a Jira instance with AIO Tests
  • Jira API token

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build

After npm run build, restart the jira-aio MCP server in Cursor (Settings → MCP → Restart). Cursor does not reload build/index.js automatically.

Configuration

The server reads JIRA_URL and JIRA_TOKEN from mcp.json:

  • ~/.cursor/mcp.json
  • or a mcp.json in the project root

Example:

{
  "mcpServers": {
    "jira-aio": {
      "command": "node",
      "args": ["C:/path/to/jira-aio-mcp-server/build/index.js"],
      "env": {
        "JIRA_URL": "https://your-jira-instance:port",
        "JIRA_TOKEN": "your-jira-token"
      }
    }
  }
}
  • JIRA_URL: Jira base URL, including port if needed
  • JIRA_TOKEN: Jira personal access token (Bearer)

Available Tools

1. get_aio_testcase

Get detailed information about a specific test case.

  • projectKey: Project key (e.g. BON, MSG)
  • testCaseKey: Test case key (e.g. BON-TC-170)

2. search_aio_testcase

Search for test cases within a project and optional folders.

  • projectId: Numeric Jira/AIO project ID (e.g. 11800)
  • folderIds: Optional array of folder IDs

3. get_aio_folders

Retrieve the folder tree of a project.

  • projectId: Numeric project ID (e.g. 11800)

4. get_aio_projects

List Jira projects available to the token.

  • No parameters

5. update_case

Update only the fields you pass. Other fields stay unchanged. The response includes rollback with previous values (especially steps).

  • projectKey, testCaseKey — required
  • title
  • description — empty string clears the field
  • precondition — empty string clears the field
  • status — Draft, Under Review, Published, Deprecated, Not integrated (IDs are read from the project config)
  • priority — Critical, High, Medium, Low, Lowest (IDs are read from the project config)
  • steps — full step list: { id?, step, expectedResult, data? }. Pass id to update an existing step. To undo, send rollback.steps from the previous response.

Plain URLs in description, preconditions, and steps are converted to clickable HTML links.

6. create_case

Create a test case. Steps and Jira requirements are saved after the case itself, same as the AIO UI.

  • projectKey, title — required
  • folderId or folder — folder ID, name, or path (e.g. 8616 or не актуально / тесты)
  • description, precondition
  • status — default Draft
  • priority
  • steps — [{ step, expectedResult, data? }]
  • requirements — Jira keys or IDs, e.g. ["BON-1642"]

Status, priority, and custom-field IDs are taken from the target project's AIO config. Do not hardcode BON IDs for other projects.

7. create_folder

Create a folder or subfolder.

  • projectKey, name — required
  • parentId or parent — parent folder ID, name, or path. Omit to create at the project root.

Notes

  • Status and priority IDs differ between projects (BON Draft is 61, MSG Draft is 49).
  • update_case currently does not change tags, case type, estimated effort, or custom fields.
  • After code changes: npm run build, then restart MCP jira-aio in Cursor.

Error Handling

The server handles:

  • API request failures
  • Authentication issues
  • Invalid configuration
  • Missing required parameters

Security

  • Bearer token authentication
  • HTTPS is supported
  • Tokens belong in mcp.json / environment variables, not in the repo

Development

npm run build
npm test
npm run lint

Stack: TypeScript, Model Context Protocol SDK, Axios.