QA MCP Server
QA MCP Server
一个可扩展的模型上下文协议(MCP)服务器,旨在成为一个统一的 AI 驱动的 QA 平台。
当前状态
阶段 1 — 基础与 QA 智能
已完成
步骤 | 能力 | 状态 |
1 | 项目基础 | 已完成 |
2 | MCP 服务器 + 健康检查 | 已完成 |
3 | LLM 提供商抽象 | 已完成 |
4 | 需求分析器 | 已完成 |
5 | 测试用例生成器 | 已完成 |
6 | 测试用例审查器 | 已完成 |
7 | 端到端 QA 工作流 | 已完成 |
阶段 2 — 项目上下文、持久化、版本控制与可移植性
步骤 | 能力 | 状态 |
1 | QA 项目上下文 | 已完成 |
2 | SQLite 持久化 | 已完成 |
3 | QA 套件版本控制 | 已完成 |
4 | 导入 / 导出 | 已完成 |
1. 愿景
长期目标是构建一个可复用的 QA MCP 平台,向兼容 MCP 的 AI 客户端暴露 QA 能力。
MCP Client / AI Assistant
|
v
QA MCP Server
|
+------+------+------+
| | |
v v v
QA Intelligence Connectors Automation
| | |
Analyze Jira UI
Generate GitHub API
Review Slack Mobile
Performance
|
v
QA Agent
|
v
Persistent QA Context
|
v
Project / Requirement / Suite Versions
|
v
Import / Export2. 阶段 1 架构
Requirement
|
v
Requirement Analyzer
|
v
RequirementAnalysis
|
v
Test Case Generator
|
v
TestCaseResponse
|
v
Test Case Reviewer
|
v
TestCaseReview
|
v
QASuiteResult核心 MCP 能力:
analyze_requirement
generate_test_cases
review_test_cases
generate_qa_suite3. LLM 架构
LLMProvider
|
+---- MockLLM
|
+---- BedrockLLMLLM 访问与提供商无关,因此 QA 工具可以在本地测试,之后连接到 AWS Bedrock 或其他提供商。
AI 输出在进入下游处理之前使用 Pydantic 模型进行验证。
4. 阶段 2 步骤 1 — QA 项目上下文
状态:已完成
一个 QA 项目包含:
QAProject
|
+-- project_id
+-- name
+-- description
+-- application
+-- environment
+-- metadata核心服务:
ProjectContext
|
+-- create_project()
+-- get_project()MCP 工具:
create_qa_project
get_qa_project5. 阶段 2 步骤 2 — SQLite 持久化
状态:已完成
项目持久化存储于:
data/qa_mcp.dbSQLite 表:
qa_projects架构:
ProjectContext
|
v
ProjectRepository
|
v
SQLiteProjectRepository
|
v
SQLite核心上下文不直接依赖 SQLite。
持久化已在独立的 Python 进程之间得到验证。
6. 阶段 2 步骤 3 — QA 套件版本控制
状态:已完成
QA 需求和生成的套件被独立地进行版本控制和持久化。
Related MCP server: test-case-generator-ai-mcp
需求版本
QA Project
|
+-- Requirement v1
+-- Requirement v2
+-- Requirement v3每个需求版本包含:
version_idproject_idversionrequirementapplicationenvironmentcreated_at
版本按项目独立维护。
套件版本
每个套件记录生成它的需求版本:
Requirement v1
|
v
Suite v1
Requirement v2
|
v
Suite v2每个套件版本包含:
suite_idproject_idrequirement_version_idversiontest_casesreviewcreated_at
架构
core/
└── versioning/
└── service.py
|
v
infrastructure/
└── versioning/
├── repositories.py
└── sqlite_version_repository.py
|
v
SQLite两个 versioning 文件夹是有意设计的:
core/versioning包含业务逻辑。infrastructure/versioning包含仓库接口和 SQLite 实现。
核心服务
QARequirementVersioningService
QASuiteVersioningService仓库接口
RequirementVersionRepository
SuiteVersionRepositorySQLite 实现
SQLiteRequirementVersionRepository
SQLiteSuiteVersionRepositoryMCP 工具
需求:
create_requirement_version
get_requirement_version
list_requirement_versions套件:
create_suite_version
get_suite_version
list_suite_versions7. 阶段 2 步骤 4 — 导入 / 导出
状态:已完成
QA MCP 服务器现在支持包含以下内容的可移植项目工件:
QA Project
|
+-- Requirement Versions
|
+-- Suite Versions导出
导出流程为:
SQLite
|
+-- Project
+-- Requirement Versions
+-- Suite Versions
|
v
QAImportExportService
|
v
QAProjectExport
|
v
JSON导出基于已持久化的数据,而非调用方组装的对象。
MCP 工具:
export_qa_project输入:
project_id输出:
{
"project_id": "...",
"export_version": "1.0",
"payload": "..."
}导入
导入流程为:
JSON
|
v
Parse
|
v
QAProjectExport validation
|
v
Relationship validation
|
v
Duplicate project check
|
v
SQLite persistenceMCP 工具:
import_qa_project导入验证:
导出 JSON
导出结构
项目身份
需求 → 项目关系
套件 → 项目关系
套件 → 需求版本关系
重复项目保护
现有项目不会被静默覆盖。
往返验证
完整的往返流程已得到验证:
SQLite DB A
|
v
EXPORT
|
v
JSON
|
v
IMPORT
|
v
SQLite DB B
|
v
Compare已验证的工件:
Project ✅
Requirements ✅
Suites ✅
Relationships ✅测试隔离
MCP 导入/导出测试使用隔离的临时 SQLite 数据库。
这防止测试执行污染:
data/qa_mcp.db并允许重复执行测试,而无需依赖之前的测试状态。
P2-S4 验证基线
Import/Export focused tests: 7 passed
MCP Import/Export tests: 2 passed
Full regression: 49 passed
Application-code warnings: 0
Known external warning: 1剩余的警告是已知的外部 pydantic_settings 警告,涉及 lifespan 字段未解析的前向引用。
8. 项目结构
当前重要的源码结构:
qa-mcp/
|
+-- src/
| +-- qa_mcp/
| |
| +-- core/
| | +-- config.py
| | +-- llm.py
| | +-- project/
| | | +-- context.py
| | |
| | +-- versioning/
| | | +-- service.py
| | |
| | +-- import_export/
| | +-- service.py
| |
| +-- infrastructure/
| | +-- project_repository.py
| | +-- sqlite_project_repository.py
| | |
| | +-- versioning/
| | +-- repositories.py
| | +-- sqlite_version_repository.py
| |
| +-- models/
| | +-- schemas.py
| |
| +-- tools/
| | +-- requirement/
| | +-- testcase/
| | +-- workflow/
| |
| +-- server.py
|
+-- tests/
+-- config/
+-- data/
| +-- qa_mcp.db
|
+-- README.md9. 本地设置
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt运行测试:
pytest -q当前已验证基线:
49 passed运行 MCP 服务器:
python -m qa_mcp.server验证服务器导入:
python -c "from qa_mcp.server import mcp; print('MCP server imports OK')"10. 开发指南
我们在每个实现步骤中遵循以下工作流:
IMPLEMENT
|
v
FOCUSED TESTS
|
v
FULL REGRESSION
|
v
RUNTIME / MCP VERIFICATION
|
v
FIX / REFINE
|
v
MARK STEP COMPLETE
|
v
UPDATE README
|
v
DOWNLOAD NEW README CHECKPOINT
|
v
NEXT STEP规则:
一次只实现一个步骤。
测试每个功能。
现有测试必须保持通过。
在本地验证之前,任何步骤都不算完成。
在每个已验证的里程碑更新 README。
核心业务逻辑必须保持与 MCP 传输无关。
持久化和外部集成保持在接口之后。
LLM 提供商保持可替换。
AI 输出必须经过验证。
测试必须能够针对持久化存储重复运行。
不要仅仅为了让测试通过而删除持久化数据库。
对以持久化为中心的测试使用隔离数据库。
不要手动将助手对话复制到 README 中。
README 是权威的开发检查点。
在 MCP/运行时路径得到验证之前,任何主要功能都不算完成。
11. 架构原则
核心业务逻辑属于
core。持久化属于
infrastructure。MCP 传输属于
server.py和面向 MCP 的工具。领域/数据模型属于
models。核心服务不得直接依赖 SQLite 实现。
外部集成必须隔离在接口之后。
LLM 提供商保持可替换。
AI 生成的输出必须在下游使用前经过验证。
持久化数据不得与测试夹具混淆。
测试必须可重复。
导入操作必须在持久化之前验证关系。
导入不得静默覆盖现有项目。
已完成的里程碑需要回归验证。
README 更新是里程碑完成的一部分。
12. 阶段 2 路线图
步骤 | 能力 | 状态 |
1 | QA 项目上下文 | 已完成 |
2 | SQLite 持久化 | 已完成 |
3 | QA 套件版本控制 | 已完成 |
4 | 导入 / 导出 | 已完成 |
5 | Jira 连接器 | 下一步 |
6 | Jira → QA 工作流 | 已计划 |
7 | 自动化用例生成器 | 已计划 |
8 | QA 智能体 | 已计划 |
9 | GitHub / CI 集成 | 已计划 |
10 | 互联网部署 | 已计划 |
13. 计划的最终架构
MCP CLIENT / AI ASSISTANT
|
v
+-------------+
| QA MCP |
| Server |
+------+------+
|
+---------------+----------------+
| | |
v v v
QA Intelligence Connectors Automation
| | |
+-----+-----+ +---+---+ +----+----+
| | | | | | | | |
Analyze Gen Review Jira GitHub UI API Perf
Mobile
|
v
QA Agent
|
v
Persistent Context
|
v
Project / Requirement
/ Suite Versions
|
v
Import / Export14. 当前基线
Phase 1
Steps 1–7 COMPLETED
Phase 2
Step 1 — QA Project Context COMPLETED
Step 2 — SQLite Persistence COMPLETED
Step 3 — QA Suite Versioning COMPLETED
Step 4 — Import / Export COMPLETED当前验证:
49 tests passed
SQLite persistence verified
Requirement versioning verified
Suite versioning verified
Import/export contract verified
Import validation verified
Round-trip persistence verified
MCP import/export verified
MCP server imports successfully
Test isolation verified已知警告:
pydantic_settings
IncompleteFieldDefinitionWarning
Field 'lifespan'这是一个外部依赖警告,目前不会阻塞功能或测试。
15. 下一个开发步骤
Phase 2 → Step 5
|
v
Jira Connector只有在保留此 README 检查点之后,才能开始下一阶段的实现。
16. 里程碑历史
Phase 1
|
+-- Foundation
+-- LLM abstraction
+-- Requirement analysis
+-- Test generation
+-- Test review
+-- QA suite workflow
+-- MCP integration
|
v
Phase 1 COMPLETE
Phase 2
|
+-- QA Project Context
+-- SQLite Persistence
+-- Requirement/Suite Versioning
+-- Import / Export
|
v
Phase 2 Step 4 COMPLETE此 README 表示在成功验证阶段 2 → 步骤 4 — 导入 / 导出之后的项目状态。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Official MCP server for Qase — manage test cases, runs, suites, defects via AI tools.
Project management shared by people and AI agents, with persistent project state through MCP.
Free test management over MCP: projects, test cases, plans, runs, environments and tasks.
MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with TestOps 5.25 for managing projects, test runs, test plans, and test cases via MCP tools.3142 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables generation of test cases, edge cases, and test matrices for software testing, integrated with MCP protocol and EU AI Act compliance.7 npm33 PyPIMIT
- AlicenseBqualityDmaintenanceMCP server for AI-powered QA analysis. It enables analyzing test failures, identifying root causes, suggesting fixes, classifying defects, detecting flaky tests, and generating test cases and bug reports.10ISC
- AlicenseNot gradedqualityBmaintenanceEnables AI builders to approve requirements, replay browser checks, and return regression evidence through MCP, supporting acceptance testing without code modification.MIT