mcp-sentinel-qa 2.0.0 → 2.0.1
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/CHANGELOG.md +21 -0
- package/README.md +35 -12
- package/dist/lib/tool-result.d.ts +19 -0
- package/dist/lib/tool-result.js +18 -0
- package/dist/package.json +3 -3
- package/dist/server.js +2 -0
- package/dist/tools/functionalities.d.ts +2 -0
- package/dist/tools/functionalities.js +60 -0
- package/dist/tools/functionality-schemas.d.ts +43 -0
- package/dist/tools/functionality-schemas.js +77 -0
- package/dist/tools/test-cases.js +1 -55
- package/package.json +46 -52
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.1 — 2026-10-29
|
|
4
|
+
|
|
5
|
+
### Functionality management
|
|
6
|
+
|
|
7
|
+
- Prepare detail, partial update, delete, hierarchy move and test-case transfer
|
|
8
|
+
tools, bringing the source implementation to thirteen tools. Extend existing
|
|
9
|
+
functionality listing with pagination and parent details, and persist the
|
|
10
|
+
parent when creating a functionality.
|
|
11
|
+
- Support root/child hierarchy only, with same-project parents and validation
|
|
12
|
+
against cycles, self-parenting and moving a node with children under a parent.
|
|
13
|
+
- Preserve test cases on functionality deletion: unlink them or transfer them to
|
|
14
|
+
an active target in the same project. Promote direct children to roots rather
|
|
15
|
+
than cascading deletion.
|
|
16
|
+
- Transfer 1–100 unique test cases atomically to an active functionality in the
|
|
17
|
+
same project, enforcing current permissions, workspace and API-key project
|
|
18
|
+
restrictions.
|
|
19
|
+
|
|
20
|
+
These tools use the Sentinel functionality endpoints deployed to production.
|
|
21
|
+
Version 2.0.1 includes the five new tools and the updated functionality listing
|
|
22
|
+
and creation behavior.
|
|
23
|
+
|
|
3
24
|
## 2.0.0 — 2026-10-28
|
|
4
25
|
|
|
5
26
|
### Breaking change
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Add the following server entry to your MCP client's configuration:
|
|
|
27
27
|
"mcpServers": {
|
|
28
28
|
"sentinel": {
|
|
29
29
|
"command": "pnpm",
|
|
30
|
-
"args": ["dlx", "mcp-sentinel-qa@2.0.
|
|
30
|
+
"args": ["dlx", "mcp-sentinel-qa@2.0.1"],
|
|
31
31
|
"env": {
|
|
32
32
|
"SENTINEL_API_KEY": "YOUR_SENTINEL_API_KEY"
|
|
33
33
|
}
|
|
@@ -43,29 +43,51 @@ secret storage or environment-variable references, use those instead.
|
|
|
43
43
|
For a manual launch, provide the key through your environment and run:
|
|
44
44
|
|
|
45
45
|
```sh
|
|
46
|
-
pnpm dlx mcp-sentinel-qa@2.0.
|
|
46
|
+
pnpm dlx mcp-sentinel-qa@2.0.1
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
The process waits for MCP messages on stdin; it is not an interactive terminal UI
|
|
50
50
|
or an HTTP server. The API endpoint is currently fixed to
|
|
51
51
|
`https://sentinel-qa.vercel.app`; `SENTINEL_API_URL` is not supported.
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## Tools in 2.0.1
|
|
54
|
+
|
|
55
|
+
The package provides thirteen tools:
|
|
54
56
|
|
|
55
57
|
| Tool | Purpose |
|
|
56
58
|
| --- | --- |
|
|
57
59
|
| `sentinel_list_projects` | List projects available to the API key. Start here to obtain project IDs. |
|
|
58
|
-
| `sentinel_list_functionalities` | List
|
|
59
|
-
| `sentinel_create_functionality` | Create a
|
|
60
|
+
| `sentinel_list_functionalities` | List project functionalities with pagination and parent details. |
|
|
61
|
+
| `sentinel_create_functionality` | Create a root or child functionality. |
|
|
62
|
+
| `sentinel_get_functionality` | Retrieve a functionality's details, project and parent. |
|
|
63
|
+
| `sentinel_update_functionality` | Partially edit its name, description, color, status or parent. |
|
|
64
|
+
| `sentinel_move_functionality` | Move a functionality under another root or promote it to a root. |
|
|
65
|
+
| `sentinel_delete_functionality` | Delete a functionality while preserving its cases and children. |
|
|
66
|
+
| `sentinel_move_functionality_test_cases` | Atomically transfer selected test cases to another functionality. |
|
|
60
67
|
| `sentinel_list_test_cases` | Search and paginate test cases, with project, functionality, priority, status and type filters. |
|
|
61
68
|
| `sentinel_get_test_case` | Retrieve a test case by UUID. |
|
|
62
69
|
| `sentinel_create_test_case` | Create a test case with Gherkin, priority, platforms and automation details. |
|
|
63
70
|
| `sentinel_update_test_case` | Update only the fields supplied for an existing test case. |
|
|
64
71
|
| `sentinel_delete_test_case` | Permanently delete a test case by UUID. |
|
|
65
72
|
|
|
66
|
-
Tool
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
Tool schemas expose required fields and allowed values. Test-case lists support
|
|
74
|
+
`page` and `page_size` (maximum 100); functionality lists use the same pagination
|
|
75
|
+
with a default page size of 20.
|
|
76
|
+
|
|
77
|
+
Functionalities support a two-level root/child hierarchy. Parents must be roots
|
|
78
|
+
in the same project. A functionality with children cannot become a child, and
|
|
79
|
+
self-parenting or cycles are rejected. Editing preserves omitted fields. Moving
|
|
80
|
+
a functionality changes its parent; moving test cases changes their assignment.
|
|
81
|
+
Deleting a functionality unlinks its cases by default or transfers them to an
|
|
82
|
+
active target when `target_id` is provided. Direct children become roots and keep
|
|
83
|
+
their own cases.
|
|
84
|
+
|
|
85
|
+
Reading functionalities requires `features.view`; creation requires
|
|
86
|
+
`features.create`; edits and hierarchy changes require `features.edit`. Case
|
|
87
|
+
transfers require `features.edit` and `test_cases.edit`. Deletion requires
|
|
88
|
+
`features.delete` and `test_cases.edit`; transferring cases during deletion also
|
|
89
|
+
requires `features.edit` on the destination. Workspace and API-key project
|
|
90
|
+
restrictions apply to every operation.
|
|
69
91
|
|
|
70
92
|
## Access and authentication
|
|
71
93
|
|
|
@@ -91,10 +113,11 @@ replace it in your client configuration.
|
|
|
91
113
|
|
|
92
114
|
## Upgrade from 1.x
|
|
93
115
|
|
|
94
|
-
Version 2.0.0
|
|
95
|
-
supported.
|
|
96
|
-
|
|
97
|
-
|
|
116
|
+
Version 2.0.0 introduced the Node.js 22 minimum; Node.js 18 and 20 are not
|
|
117
|
+
supported. Version 2.0.1 keeps that requirement and adds functionality management
|
|
118
|
+
tools while preserving the existing eight tool names. Update a pinned
|
|
119
|
+
`mcp-sentinel-qa@2.0.0` configuration to `mcp-sentinel-qa@2.0.1`, then restart or
|
|
120
|
+
reconnect your MCP client. Older examples using `mcp-server-sentinel` should use
|
|
98
121
|
`mcp-sentinel-qa` instead.
|
|
99
122
|
|
|
100
123
|
## Development and release checks
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function errorResult(error: unknown): {
|
|
2
|
+
content: {
|
|
3
|
+
type: "text";
|
|
4
|
+
text: string;
|
|
5
|
+
}[];
|
|
6
|
+
isError: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function toolRequest(operation: () => Promise<unknown>): Promise<{
|
|
9
|
+
content: {
|
|
10
|
+
type: "text";
|
|
11
|
+
text: string;
|
|
12
|
+
}[];
|
|
13
|
+
isError: boolean;
|
|
14
|
+
} | {
|
|
15
|
+
content: {
|
|
16
|
+
type: "text";
|
|
17
|
+
text: string;
|
|
18
|
+
}[];
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ApiError } from './api-client.js';
|
|
2
|
+
export function errorResult(error) {
|
|
3
|
+
const message = error instanceof ApiError
|
|
4
|
+
? `Error ${error.status}: ${error.message}${error.details ? `\nDetails: ${JSON.stringify(error.details)}` : ''}`
|
|
5
|
+
: error instanceof Error
|
|
6
|
+
? error.message
|
|
7
|
+
: String(error);
|
|
8
|
+
return { content: [{ type: 'text', text: message }], isError: true };
|
|
9
|
+
}
|
|
10
|
+
export async function toolRequest(operation) {
|
|
11
|
+
try {
|
|
12
|
+
const result = await operation();
|
|
13
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
return errorResult(error);
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-sentinel-qa",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "MCP server for Sentinel QA — manage test cases from any AI assistant",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "MCP server for Sentinel QA — manage functionalities and test cases from any AI assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "João Vitor Matos",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"prepack": "pnpm --ignore-workspace run check",
|
|
28
28
|
"prepublishOnly": "pnpm --ignore-workspace audit --prod"
|
|
29
29
|
},
|
|
30
|
-
"keywords": ["mcp", "sentinel", "qa", "testing", "test-cases"],
|
|
30
|
+
"keywords": ["mcp", "sentinel", "qa", "testing", "functionalities", "test-cases"],
|
|
31
31
|
"homepage": "https://sentinel-qa.vercel.app",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@modelcontextprotocol/server": "^2.4.0",
|
package/dist/server.js
CHANGED
|
@@ -10,9 +10,11 @@
|
|
|
10
10
|
import { McpServer } from '@modelcontextprotocol/server';
|
|
11
11
|
import { serveStdio } from '@modelcontextprotocol/server/stdio';
|
|
12
12
|
import metadata from './package.json' with { type: 'json' };
|
|
13
|
+
import { registerFunctionalityTools } from './tools/functionalities.js';
|
|
13
14
|
import { registerTestCaseTools } from './tools/test-cases.js';
|
|
14
15
|
serveStdio(() => {
|
|
15
16
|
const server = new McpServer({ name: 'sentinel', version: metadata.version });
|
|
16
17
|
registerTestCaseTools(server);
|
|
18
|
+
registerFunctionalityTools(server);
|
|
17
19
|
return server;
|
|
18
20
|
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as api from '../lib/api-client.js';
|
|
2
|
+
import { toolRequest } from '../lib/tool-result.js';
|
|
3
|
+
import { createFunctionalitySchema, deleteFunctionalitySchema, getFunctionalitySchema, listFunctionalitiesSchema, moveFunctionalityCasesSchema, moveFunctionalitySchema, updateFunctionalitySchema, } from './functionality-schemas.js';
|
|
4
|
+
export function registerFunctionalityTools(server) {
|
|
5
|
+
registerReads(server);
|
|
6
|
+
registerCreate(server);
|
|
7
|
+
registerUpdate(server);
|
|
8
|
+
registerMove(server);
|
|
9
|
+
registerDelete(server);
|
|
10
|
+
registerCaseTransfer(server);
|
|
11
|
+
}
|
|
12
|
+
function registerReads(server) {
|
|
13
|
+
server.registerTool('sentinel_list_functionalities', {
|
|
14
|
+
description: 'List project functionalities with parent_id and pagination. Follow pagination to see the complete two-level hierarchy.',
|
|
15
|
+
inputSchema: listFunctionalitiesSchema,
|
|
16
|
+
annotations: { readOnlyHint: true },
|
|
17
|
+
}, ({ project_id, page = 1, page_size = 20 }) => toolRequest(() => api.get('/api/mcp/functionalities', {
|
|
18
|
+
project_id,
|
|
19
|
+
page: page?.toString(),
|
|
20
|
+
page_size: page_size?.toString(),
|
|
21
|
+
})));
|
|
22
|
+
server.registerTool('sentinel_get_functionality', {
|
|
23
|
+
description: 'Get functionality details, including its project and parent. Read before editing or deleting.',
|
|
24
|
+
inputSchema: getFunctionalitySchema,
|
|
25
|
+
annotations: { readOnlyHint: true },
|
|
26
|
+
}, ({ id }) => toolRequest(() => api.get(`/api/mcp/functionalities/${id}`)));
|
|
27
|
+
}
|
|
28
|
+
function registerCreate(server) {
|
|
29
|
+
server.registerTool('sentinel_create_functionality', {
|
|
30
|
+
description: 'Create a root or child functionality. parent_id must reference a root in the same project; omit it or use null for a root. Maximum depth is two levels.',
|
|
31
|
+
inputSchema: createFunctionalitySchema,
|
|
32
|
+
}, (params) => toolRequest(() => api.post('/api/mcp/functionalities', params)));
|
|
33
|
+
}
|
|
34
|
+
function registerUpdate(server) {
|
|
35
|
+
server.registerTool('sentinel_update_functionality', {
|
|
36
|
+
description: 'Partially edit name, description, color, status or parent_id. Omitted fields are preserved; null clears description/color or promotes to root. Cannot change project.',
|
|
37
|
+
inputSchema: updateFunctionalitySchema,
|
|
38
|
+
}, ({ id, ...changes }) => toolRequest(() => api.patch(`/api/mcp/functionalities/${id}`, changes)));
|
|
39
|
+
}
|
|
40
|
+
function registerMove(server) {
|
|
41
|
+
server.registerTool('sentinel_move_functionality', {
|
|
42
|
+
description: 'Move a functionality under another root in the same project, or promote it with parent_id:null. A functionality with children cannot become a child. Test cases stay attached.',
|
|
43
|
+
inputSchema: moveFunctionalitySchema,
|
|
44
|
+
}, ({ id, parent_id }) => toolRequest(() => api.patch(`/api/mcp/functionalities/${id}`, { parent_id })));
|
|
45
|
+
}
|
|
46
|
+
function registerDelete(server) {
|
|
47
|
+
server.registerTool('sentinel_delete_functionality', {
|
|
48
|
+
description: 'Delete a functionality after confirming the target. Preserve all test cases: unlink them by default or transfer to target_id, an active functionality in the same project. Direct children become roots.',
|
|
49
|
+
inputSchema: deleteFunctionalitySchema,
|
|
50
|
+
annotations: { destructiveHint: true },
|
|
51
|
+
}, ({ id, target_id }) => toolRequest(() => api.del(`/api/mcp/functionalities/${id}${target_id ? `?target_id=${encodeURIComponent(target_id)}` : ''}`)));
|
|
52
|
+
}
|
|
53
|
+
function registerCaseTransfer(server) {
|
|
54
|
+
server.registerTool('sentinel_move_functionality_test_cases', {
|
|
55
|
+
description: 'Atomically move 1–100 selected test cases to an active functionality in the same project. Rejects mixed projects, unauthorized cases and duplicate IDs; requires features.edit and test_cases.edit.',
|
|
56
|
+
inputSchema: moveFunctionalityCasesSchema,
|
|
57
|
+
}, ({ target_functionality_id, test_case_ids }) => toolRequest(() => api.post(`/api/mcp/functionalities/${target_functionality_id}/test-cases/move`, {
|
|
58
|
+
test_case_ids,
|
|
59
|
+
})));
|
|
60
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const listFunctionalitiesSchema: z.ZodObject<{
|
|
3
|
+
project_id: z.ZodString;
|
|
4
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
page_size: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
}, z.core.$strict>;
|
|
7
|
+
export declare const createFunctionalitySchema: z.ZodObject<{
|
|
8
|
+
project_id: z.ZodString;
|
|
9
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
10
|
+
Ativa: "Ativa";
|
|
11
|
+
Inativa: "Inativa";
|
|
12
|
+
}>>;
|
|
13
|
+
name: z.ZodString;
|
|
14
|
+
description: z.ZodOptional<z.ZodString>;
|
|
15
|
+
color: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
parent_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
}, z.core.$strict>;
|
|
18
|
+
export declare const getFunctionalitySchema: z.ZodObject<{
|
|
19
|
+
id: z.ZodString;
|
|
20
|
+
}, z.core.$strict>;
|
|
21
|
+
export declare const updateFunctionalitySchema: z.ZodObject<{
|
|
22
|
+
description: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
23
|
+
name: z.ZodOptional<z.ZodString>;
|
|
24
|
+
color: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
25
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
Ativa: "Ativa";
|
|
27
|
+
Inativa: "Inativa";
|
|
28
|
+
}>>;
|
|
29
|
+
parent_id: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
30
|
+
id: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export declare const moveFunctionalitySchema: z.ZodObject<{
|
|
33
|
+
id: z.ZodString;
|
|
34
|
+
parent_id: z.ZodNullable<z.ZodString>;
|
|
35
|
+
}, z.core.$strict>;
|
|
36
|
+
export declare const deleteFunctionalitySchema: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
target_id: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strict>;
|
|
40
|
+
export declare const moveFunctionalityCasesSchema: z.ZodObject<{
|
|
41
|
+
target_functionality_id: z.ZodString;
|
|
42
|
+
test_case_ids: z.ZodArray<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const fields = {
|
|
3
|
+
name: z.string().min(2).max(200).describe('Functionality name'),
|
|
4
|
+
description: z.string().optional().describe('Functionality description'),
|
|
5
|
+
color: z
|
|
6
|
+
.string()
|
|
7
|
+
.regex(/^#[0-9A-Fa-f]{6}$/)
|
|
8
|
+
.nullable()
|
|
9
|
+
.optional()
|
|
10
|
+
.describe('Hex color or null'),
|
|
11
|
+
status: z.enum(['Ativa', 'Inativa']).describe('Functionality status'),
|
|
12
|
+
parent_id: z.string().uuid().nullable().optional().describe('Root parent UUID; null for a root'),
|
|
13
|
+
};
|
|
14
|
+
export const listFunctionalitiesSchema = z
|
|
15
|
+
.object({
|
|
16
|
+
project_id: z.string().uuid().describe('Project UUID'),
|
|
17
|
+
page: z.number().int().min(1).max(1_000_000).default(1).describe('Page number (default: 1)'),
|
|
18
|
+
page_size: z
|
|
19
|
+
.number()
|
|
20
|
+
.int()
|
|
21
|
+
.min(1)
|
|
22
|
+
.max(100)
|
|
23
|
+
.default(20)
|
|
24
|
+
.describe('Page size (default: 20, max: 100)'),
|
|
25
|
+
})
|
|
26
|
+
.strict();
|
|
27
|
+
export const createFunctionalitySchema = z
|
|
28
|
+
.object({
|
|
29
|
+
...fields,
|
|
30
|
+
project_id: z.string().uuid().describe('Project UUID'),
|
|
31
|
+
status: fields.status.default('Ativa'),
|
|
32
|
+
})
|
|
33
|
+
.strict();
|
|
34
|
+
export const getFunctionalitySchema = z.object({ id: z.string().uuid() }).strict();
|
|
35
|
+
export const updateFunctionalitySchema = z
|
|
36
|
+
.object({
|
|
37
|
+
...fields,
|
|
38
|
+
description: z.string().nullable().optional().describe('Description; null clears it'),
|
|
39
|
+
})
|
|
40
|
+
.partial()
|
|
41
|
+
.extend({ id: z.string().uuid() })
|
|
42
|
+
.strict()
|
|
43
|
+
.refine(({ id, ...changes }) => Object.keys(changes).length > 0, 'Supply at least one changed field')
|
|
44
|
+
.refine(({ id, parent_id }) => id !== parent_id, 'A functionality cannot be its own parent');
|
|
45
|
+
export const moveFunctionalitySchema = z
|
|
46
|
+
.object({
|
|
47
|
+
id: z.string().uuid().describe('Functionality to move'),
|
|
48
|
+
parent_id: z
|
|
49
|
+
.string()
|
|
50
|
+
.uuid()
|
|
51
|
+
.nullable()
|
|
52
|
+
.describe('New root parent UUID, or null to promote to root'),
|
|
53
|
+
})
|
|
54
|
+
.strict()
|
|
55
|
+
.refine(({ id, parent_id }) => id !== parent_id, 'A functionality cannot be its own parent');
|
|
56
|
+
export const deleteFunctionalitySchema = z
|
|
57
|
+
.object({
|
|
58
|
+
id: z.string().uuid().describe('Functionality to delete'),
|
|
59
|
+
target_id: z
|
|
60
|
+
.string()
|
|
61
|
+
.uuid()
|
|
62
|
+
.optional()
|
|
63
|
+
.describe('Optional active destination for its cases; otherwise unlink'),
|
|
64
|
+
})
|
|
65
|
+
.strict()
|
|
66
|
+
.refine(({ id, target_id }) => id !== target_id, 'Destination must differ from source');
|
|
67
|
+
export const moveFunctionalityCasesSchema = z
|
|
68
|
+
.object({
|
|
69
|
+
target_functionality_id: z.string().uuid().describe('Active destination functionality UUID'),
|
|
70
|
+
test_case_ids: z
|
|
71
|
+
.array(z.string().uuid())
|
|
72
|
+
.min(1)
|
|
73
|
+
.max(100)
|
|
74
|
+
.refine((ids) => new Set(ids).size === ids.length, 'Duplicate case IDs are not allowed')
|
|
75
|
+
.describe('1–100 unique case UUIDs in the same project as the destination'),
|
|
76
|
+
})
|
|
77
|
+
.strict();
|
package/dist/tools/test-cases.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
import * as api from '../lib/api-client.js';
|
|
8
|
+
import { errorResult } from '../lib/tool-result.js';
|
|
8
9
|
export function registerTestCaseTools(server) {
|
|
9
10
|
// =========================================================================
|
|
10
11
|
// sentinel_list_projects
|
|
@@ -22,53 +23,6 @@ export function registerTestCaseTools(server) {
|
|
|
22
23
|
}
|
|
23
24
|
});
|
|
24
25
|
// =========================================================================
|
|
25
|
-
// sentinel_list_functionalities
|
|
26
|
-
// =========================================================================
|
|
27
|
-
server.registerTool('sentinel_list_functionalities', {
|
|
28
|
-
description: 'List functionalities (modules/features) for a project. Needed to get functionality_id when creating test cases.',
|
|
29
|
-
inputSchema: z.object({ project_id: z.string().uuid().describe('Project UUID') }),
|
|
30
|
-
}, async ({ project_id }) => {
|
|
31
|
-
try {
|
|
32
|
-
const result = await api.get('/api/mcp/functionalities', { project_id });
|
|
33
|
-
return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
return errorResult(error);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
// =========================================================================
|
|
40
|
-
// sentinel_create_functionality
|
|
41
|
-
// =========================================================================
|
|
42
|
-
server.registerTool('sentinel_create_functionality', {
|
|
43
|
-
description: 'Create a new functionality (module/feature) in a project. Needed before creating test cases if no functionality exists yet.',
|
|
44
|
-
inputSchema: z.object({
|
|
45
|
-
project_id: z.string().uuid().describe('Project UUID (required)'),
|
|
46
|
-
name: z.string().min(2).max(200).describe('Functionality name (min 2 chars)'),
|
|
47
|
-
status: z.enum(['Ativa', 'Inativa']).default('Ativa').describe('Status (default: Ativa)'),
|
|
48
|
-
description: z.string().optional().describe('Optional description'),
|
|
49
|
-
color: z
|
|
50
|
-
.string()
|
|
51
|
-
.regex(/^#[0-9A-Fa-f]{6}$/)
|
|
52
|
-
.optional()
|
|
53
|
-
.describe('Hex color code (e.g. #3B82F6)'),
|
|
54
|
-
}),
|
|
55
|
-
}, async (params) => {
|
|
56
|
-
try {
|
|
57
|
-
const result = await api.post('/api/mcp/functionalities', params);
|
|
58
|
-
return {
|
|
59
|
-
content: [
|
|
60
|
-
{
|
|
61
|
-
type: 'text',
|
|
62
|
-
text: `Functionality created successfully!\n${JSON.stringify(result.data, null, 2)}`,
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
return errorResult(error);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
// =========================================================================
|
|
72
26
|
// sentinel_list_test_cases
|
|
73
27
|
// =========================================================================
|
|
74
28
|
server.registerTool('sentinel_list_test_cases', {
|
|
@@ -268,11 +222,3 @@ export function registerTestCaseTools(server) {
|
|
|
268
222
|
}
|
|
269
223
|
});
|
|
270
224
|
}
|
|
271
|
-
function errorResult(error) {
|
|
272
|
-
const message = error instanceof api.ApiError
|
|
273
|
-
? `Error ${error.status}: ${error.message}${error.details ? `\nDetails: ${JSON.stringify(error.details)}` : ''}`
|
|
274
|
-
: error instanceof Error
|
|
275
|
-
? error.message
|
|
276
|
-
: String(error);
|
|
277
|
-
return { content: [{ type: 'text', text: message }], isError: true };
|
|
278
|
-
}
|
package/package.json
CHANGED
|
@@ -1,53 +1,47 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"test": "node --test tests/*.test.mjs && MCP_TEST_CLIENT=modern node --test tests/*.test.mjs",
|
|
49
|
-
"test:package": "node scripts/verify-package.mjs",
|
|
50
|
-
"check": "pnpm --ignore-workspace run type-check && pnpm --ignore-workspace run build && pnpm --ignore-workspace run test",
|
|
51
|
-
"dev": "tsx server.ts"
|
|
52
|
-
}
|
|
53
|
-
}
|
|
2
|
+
"name": "mcp-sentinel-qa",
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "MCP server for Sentinel QA — manage functionalities and test cases from any AI assistant",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "João Vitor Matos",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/JVMatos/sentinel.git",
|
|
11
|
+
"directory": "mcp"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/JVMatos/sentinel/issues"
|
|
15
|
+
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"mcp-sentinel-qa": "dist/server.js"
|
|
18
|
+
},
|
|
19
|
+
"files": ["dist", "CHANGELOG.md"],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc",
|
|
22
|
+
"type-check": "tsc --noEmit",
|
|
23
|
+
"test": "node --test tests/*.test.mjs && MCP_TEST_CLIENT=modern node --test tests/*.test.mjs",
|
|
24
|
+
"test:package": "node scripts/verify-package.mjs",
|
|
25
|
+
"check": "pnpm --ignore-workspace run type-check && pnpm --ignore-workspace run build && pnpm --ignore-workspace run test",
|
|
26
|
+
"dev": "tsx server.ts",
|
|
27
|
+
"prepack": "pnpm --ignore-workspace run check",
|
|
28
|
+
"prepublishOnly": "pnpm --ignore-workspace audit --prod"
|
|
29
|
+
},
|
|
30
|
+
"keywords": ["mcp", "sentinel", "qa", "testing", "functionalities", "test-cases"],
|
|
31
|
+
"homepage": "https://sentinel-qa.vercel.app",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@modelcontextprotocol/server": "^2.4.0",
|
|
34
|
+
"zod": "^4.6.7"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@modelcontextprotocol/client": "^2.4.0",
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
39
|
+
"@types/node": "^22.20.5",
|
|
40
|
+
"tsx": "^4.23.15",
|
|
41
|
+
"typescript": "~5.9.3"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=22"
|
|
45
|
+
},
|
|
46
|
+
"packageManager": "pnpm@11.20.0"
|
|
47
|
+
}
|