@cqsjjb/meter-sphere-mcp-server 1.0.3 → 2026.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mcp-server.mjs +10 -5
- package/package.json +1 -1
package/mcp-server.mjs
CHANGED
|
@@ -546,6 +546,11 @@ class MeterSphereMCPServer {
|
|
|
546
546
|
type: 'boolean',
|
|
547
547
|
description: '是否排除已完成的测试用例。默认为false(显示所有用例)。当用户要求继续测试、跳过已完成用例时,必须设置为true。设置为true后,返回的列表将只包含未完成的测试用例,方便继续测试工作。',
|
|
548
548
|
},
|
|
549
|
+
moduleIds: {
|
|
550
|
+
type: 'array',
|
|
551
|
+
items: { type: 'string' },
|
|
552
|
+
description: '模块ID列表,用于按模块筛选测试用例。可选,未传入时使用环境变量 PLATFORM_MODULE_IDS 的配置。',
|
|
553
|
+
},
|
|
549
554
|
},
|
|
550
555
|
required: [],
|
|
551
556
|
},
|
|
@@ -641,7 +646,7 @@ class MeterSphereMCPServer {
|
|
|
641
646
|
}
|
|
642
647
|
|
|
643
648
|
async handleGetTestList(args) {
|
|
644
|
-
const { excludeCompleted = false } = args || {};
|
|
649
|
+
const { excludeCompleted = false, moduleIds } = args || {};
|
|
645
650
|
|
|
646
651
|
// 从环境变量读取配置
|
|
647
652
|
const platformConfig = getPlatformConfig();
|
|
@@ -670,10 +675,10 @@ class MeterSphereMCPServer {
|
|
|
670
675
|
projectId: platformConfig.project,
|
|
671
676
|
};
|
|
672
677
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
if (
|
|
676
|
-
requestData.moduleIds =
|
|
678
|
+
// 优先从 args 获取 moduleIds,否则从 platformConfig 获取
|
|
679
|
+
const effectiveModuleIds = moduleIds || platformConfig.moduleIds;
|
|
680
|
+
if (effectiveModuleIds && effectiveModuleIds.length > 0) {
|
|
681
|
+
requestData.moduleIds = effectiveModuleIds;
|
|
677
682
|
}
|
|
678
683
|
|
|
679
684
|
const response = await httpPost(targetUrl, headers, requestData);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cqsjjb/meter-sphere-mcp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2026.3.17",
|
|
4
4
|
"description": "MCP server for MeterSphere test cases platform - Get test cases, generate AI test prompts, track testing progress, and execute browser automation tests",
|
|
5
5
|
"main": "mcp-server.mjs",
|
|
6
6
|
"type": "module",
|