@qase/mcp-server 2.7.5 → 3.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 +52 -0
- package/README.md +17 -11
- package/build/auth/mcp-guard.d.ts.map +1 -1
- package/build/auth/mcp-guard.js +1 -1
- package/build/auth/mcp-guard.js.map +1 -1
- package/build/cache/metrics.js +2 -0
- package/build/cache/metrics.js.map +1 -1
- package/build/index.js +27 -5
- package/build/index.js.map +1 -1
- package/build/operations-v2/composites/ci-report.js +3 -5
- package/build/operations-v2/composites/ci-report.js.map +1 -1
- package/build/operations-v2/composites/regression-run.js +2 -1
- package/build/operations-v2/composites/regression-run.js.map +1 -1
- package/build/operations-v2/composites/triage-defect.js +5 -7
- package/build/operations-v2/composites/triage-defect.js.map +1 -1
- package/build/operations-v2/escape/api.js +11 -4
- package/build/operations-v2/escape/api.js.map +1 -1
- package/build/operations-v2/index.d.ts +1 -0
- package/build/operations-v2/index.d.ts.map +1 -1
- package/build/operations-v2/index.js +1 -0
- package/build/operations-v2/index.js.map +1 -1
- package/build/operations-v2/meta/discover.d.ts +5 -4
- package/build/operations-v2/meta/discover.d.ts.map +1 -1
- package/build/operations-v2/meta/discover.js +13 -32
- package/build/operations-v2/meta/discover.js.map +1 -1
- package/build/operations-v2/meta/tool-help.d.ts +10 -0
- package/build/operations-v2/meta/tool-help.d.ts.map +1 -0
- package/build/operations-v2/meta/tool-help.js +42 -0
- package/build/operations-v2/meta/tool-help.js.map +1 -0
- package/build/operations-v2/qql/index.js +15 -9
- package/build/operations-v2/qql/index.js.map +1 -1
- package/build/operations-v2/read/get.js +2 -1
- package/build/operations-v2/read/get.js.map +1 -1
- package/build/operations-v2/read/project-context.js +5 -6
- package/build/operations-v2/read/project-context.js.map +1 -1
- package/build/operations-v2/write/attachments.js +16 -21
- package/build/operations-v2/write/attachments.js.map +1 -1
- package/build/operations-v2/write/case-fields.d.ts +26 -215
- package/build/operations-v2/write/case-fields.d.ts.map +1 -1
- package/build/operations-v2/write/case-fields.js +28 -24
- package/build/operations-v2/write/case-fields.js.map +1 -1
- package/build/operations-v2/write/cases-bulk.js +2 -1
- package/build/operations-v2/write/cases-bulk.js.map +1 -1
- package/build/operations-v2/write/cases.js +4 -3
- package/build/operations-v2/write/cases.js.map +1 -1
- package/build/operations-v2/write/custom-fields.js +13 -10
- package/build/operations-v2/write/custom-fields.js.map +1 -1
- package/build/operations-v2/write/defects.js +7 -9
- package/build/operations-v2/write/defects.js.map +1 -1
- package/build/operations-v2/write/environments.js +5 -5
- package/build/operations-v2/write/environments.js.map +1 -1
- package/build/operations-v2/write/external-issues.js +2 -2
- package/build/operations-v2/write/external-issues.js.map +1 -1
- package/build/operations-v2/write/milestones.js +6 -6
- package/build/operations-v2/write/milestones.js.map +1 -1
- package/build/operations-v2/write/plans.js +5 -5
- package/build/operations-v2/write/plans.js.map +1 -1
- package/build/operations-v2/write/projects.js +9 -8
- package/build/operations-v2/write/projects.js.map +1 -1
- package/build/operations-v2/write/results.js +7 -12
- package/build/operations-v2/write/results.js.map +1 -1
- package/build/operations-v2/write/reviews.js +18 -18
- package/build/operations-v2/write/reviews.js.map +1 -1
- package/build/operations-v2/write/runs.js +8 -6
- package/build/operations-v2/write/runs.js.map +1 -1
- package/build/operations-v2/write/shared-steps.js +5 -8
- package/build/operations-v2/write/shared-steps.js.map +1 -1
- package/build/operations-v2/write/suites.js +4 -3
- package/build/operations-v2/write/suites.js.map +1 -1
- package/build/server-instructions.d.ts +1 -1
- package/build/server-instructions.d.ts.map +1 -1
- package/build/server-instructions.js +4 -4
- package/build/server.d.ts.map +1 -1
- package/build/server.js +154 -104
- package/build/server.js.map +1 -1
- package/build/transports/body-limit.d.ts +9 -17
- package/build/transports/body-limit.d.ts.map +1 -1
- package/build/transports/body-limit.js +18 -2
- package/build/transports/body-limit.js.map +1 -1
- package/build/transports/rate-limit.d.ts +1 -1
- package/build/transports/rate-limit.js +1 -1
- package/build/transports/sse.js +1 -1
- package/build/transports/sse.js.map +1 -1
- package/build/transports/streamableHttp.d.ts.map +1 -1
- package/build/transports/streamableHttp.js +83 -171
- package/build/transports/streamableHttp.js.map +1 -1
- package/build/utils/auth-context.d.ts +30 -0
- package/build/utils/auth-context.d.ts.map +1 -1
- package/build/utils/auth-context.js +33 -0
- package/build/utils/auth-context.js.map +1 -1
- package/build/utils/errors.js +3 -3
- package/build/utils/errors.js.map +1 -1
- package/build/utils/protocol-telemetry.d.ts +62 -0
- package/build/utils/protocol-telemetry.d.ts.map +1 -0
- package/build/utils/protocol-telemetry.js +123 -0
- package/build/utils/protocol-telemetry.js.map +1 -0
- package/build/utils/registry.d.ts +28 -34
- package/build/utils/registry.d.ts.map +1 -1
- package/build/utils/registry.js +107 -102
- package/build/utils/registry.js.map +1 -1
- package/build/utils/request-state.d.ts +71 -0
- package/build/utils/request-state.d.ts.map +1 -0
- package/build/utils/request-state.js +108 -0
- package/build/utils/request-state.js.map +1 -0
- package/build/utils/server-context.d.ts +53 -16
- package/build/utils/server-context.d.ts.map +1 -1
- package/build/utils/server-context.js +147 -39
- package/build/utils/server-context.js.map +1 -1
- package/build/utils/validation.d.ts +12 -25
- package/build/utils/validation.d.ts.map +1 -1
- package/build/utils/validation.js +2 -2
- package/build/utils/validation.js.map +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/docs/connect.md +23 -7
- package/docs/migration.md +182 -10
- package/docs/self-run.md +50 -7
- package/docs/tools.md +54 -60
- package/docs/troubleshooting.md +43 -16
- package/package.json +11 -12
- package/server.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../../../src/operations-v2/write/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,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;IACtB,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,gBAAgB;IAC7B,2EAA2E;IAC3E,4EAA4E;CAC7E,CAAC,CAAC;AAEH,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,iBAAiB;IACxB,WAAW,EACT,2RAA2R;IAC7R,IAAI,EACF,yFAAyF;QACzF,6FAA6F;QAC7F,sFAAsF;QACtF,2FAA2F;QAC3F,4FAA4F;QAC5F,OAAO;IACT,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,GAAG;IACZ,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC"}
|
|
@@ -7,10 +7,7 @@ const StepContentSchema = z.object({
|
|
|
7
7
|
action: z.string().describe('Step action description'),
|
|
8
8
|
expected_result: z.string().optional().describe('Expected result'),
|
|
9
9
|
data: z.string().optional().describe('Test data'),
|
|
10
|
-
attachments: z
|
|
11
|
-
.array(z.string())
|
|
12
|
-
.optional()
|
|
13
|
-
.describe('Attachment hashes from qase_attachment_upload'),
|
|
10
|
+
attachments: z.array(z.string()).optional().describe('Hashes from qase_attachment_upload'),
|
|
14
11
|
});
|
|
15
12
|
const UpsertSchema = z.object({
|
|
16
13
|
code: ProjectCodeSchema,
|
|
@@ -46,7 +43,8 @@ async function del(args) {
|
|
|
46
43
|
toolRegistry.register({
|
|
47
44
|
name: 'qase_shared_step_upsert',
|
|
48
45
|
title: 'Create or update shared step',
|
|
49
|
-
description:
|
|
46
|
+
description: "Create or update a shared step — a block of steps written once and reused across cases. With `hash` it updates, without it creates; shared steps are identified by hash, which qase_case_upsert takes in a step's `shared` field. Updating changes every referencing case. Cost: one API call, about 0.5s.",
|
|
47
|
+
help: 'Create or update a shared step — a block of steps written once and reused across many cases, ' +
|
|
50
48
|
'so a change to a login flow is made in one place. Without `hash` it creates, with `hash` it ' +
|
|
51
49
|
'updates. Shared steps are identified by hash, not by numeric ID, and that hash is what ' +
|
|
52
50
|
"qase_case_upsert takes in a step's `shared` field. Updating a shared step changes every case " +
|
|
@@ -54,12 +52,12 @@ toolRegistry.register({
|
|
|
54
52
|
schema: UpsertSchema,
|
|
55
53
|
handler: upsert,
|
|
56
54
|
annotations: CreateAnnotation,
|
|
57
|
-
visibility: 'discoverable',
|
|
58
55
|
});
|
|
59
56
|
toolRegistry.register({
|
|
60
57
|
name: 'qase_shared_step_delete',
|
|
61
58
|
title: 'Delete shared step',
|
|
62
|
-
description: 'Delete a shared step by project code and hash. Every case
|
|
59
|
+
description: 'Delete a shared step by project code and hash. Every case referencing it loses those steps, so the reach is far wider than one record; check references first. Cannot be undone; to change content use qase_shared_step_upsert instead. Asks the user for confirmation first. Cost: one API call, about 0.4s.',
|
|
60
|
+
help: 'Delete a shared step by project code and hash. Every case that referenced it loses those ' +
|
|
63
61
|
'steps, so the deletion reaches much further than the one record named here — check what ' +
|
|
64
62
|
'references it before calling. This cannot be undone. To change the content instead, use ' +
|
|
65
63
|
'qase_shared_step_upsert with the same hash. Identified by hash, not numeric ID. Deletion ' +
|
|
@@ -68,6 +66,5 @@ toolRegistry.register({
|
|
|
68
66
|
schema: DeleteSchema,
|
|
69
67
|
handler: del,
|
|
70
68
|
annotations: DeleteAnnotation,
|
|
71
|
-
visibility: 'discoverable',
|
|
72
69
|
});
|
|
73
70
|
//# sourceMappingURL=shared-steps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-steps.js","sourceRoot":"","sources":["../../../src/operations-v2/write/shared-steps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE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IACZ,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC"}
|
|
@@ -52,7 +52,8 @@ async function del(args) {
|
|
|
52
52
|
toolRegistry.register({
|
|
53
53
|
name: 'qase_suite_upsert',
|
|
54
54
|
title: 'Create or update suite',
|
|
55
|
-
description: 'Create or update a test suite — the folder cases live in.
|
|
55
|
+
description: 'Create or update a test suite — the folder cases live in. With `id` it updates, without it creates; nest with `parent_id`. The existing tree comes back from qase_project_context, so read it rather than guess parent IDs. Cost: one API call, about 0.5s.',
|
|
56
|
+
help: 'Create or update a test suite — the folder cases live in. Without `id` it creates, with `id` ' +
|
|
56
57
|
'it updates. Nest a suite by passing `parent_id`; the whole existing tree comes back from ' +
|
|
57
58
|
'qase_project_context, so read that first rather than guessing at parent IDs. Building a deep ' +
|
|
58
59
|
'tree means one call per node, so create parents before children and reuse the IDs returned. ' +
|
|
@@ -66,7 +67,8 @@ toolRegistry.register({
|
|
|
66
67
|
toolRegistry.register({
|
|
67
68
|
name: 'qase_suite_delete',
|
|
68
69
|
title: 'Delete suite',
|
|
69
|
-
description: 'Delete a test suite by project code and
|
|
70
|
+
description: 'Delete a test suite by project code and ID. WARNING: the cases inside, and any child suites, are deleted with it along with their history, and `delete_cases` currently has no effect. Read the tree from qase_project_context and move what matters first. Asks the user for confirmation. Cost: one API call, about 0.4s.',
|
|
71
|
+
help: 'Delete a test suite by project code and suite ID. WARNING: the cases inside are deleted with ' +
|
|
70
72
|
'it, along with their history, and this cannot be undone. Deleting a suite with children ' +
|
|
71
73
|
'takes the whole subtree and everything in it, so read the tree from qase_project_context and ' +
|
|
72
74
|
'move anything worth keeping — qase_case_upsert with a different suite_id — before calling. ' +
|
|
@@ -79,6 +81,5 @@ toolRegistry.register({
|
|
|
79
81
|
schema: DeleteSchema,
|
|
80
82
|
handler: del,
|
|
81
83
|
annotations: DeleteAnnotation,
|
|
82
|
-
visibility: 'discoverable',
|
|
83
84
|
});
|
|
84
85
|
//# sourceMappingURL=suites.js.map
|
|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AAQ,CAAC;IACpB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,6PAA6P;IAC/P,IAAI,EACF,+FAA+F;QAC/F,2FAA2F;QAC3F,+FAA+F;QAC/F,8FAA8F;QAC9F,iCAAiC;IACnC,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,MAAM;IACf,WAAW,EAAE,gBAAgB;IAC7B,4EAA4E;IAC5E,gDAAgD;CACjD,CAAC,CAAC;AAEH,YAAY,CAAC,QAAQ,CAAC;IACpB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,cAAc;IACrB,WAAW,EACT,6TAA6T;IAC/T,IAAI,EACF,+FAA+F;QAC/F,0FAA0F;QAC1F,+FAA+F;QAC/F,6FAA6F;QAC7F,+FAA+F;QAC/F,wFAAwF;QACxF,6FAA6F;QAC7F,qFAAqF;QACrF,6FAA6F;QAC7F,gBAAgB;IAClB,MAAM,EAAE,YAAY;IACpB,OAAO,EAAE,GAAG;IACZ,WAAW,EAAE,gBAAgB;CAC9B,CAAC,CAAC"}
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* chosen. This is the cheapest place to answer "which tool for this job" —
|
|
6
6
|
* cheaper than the agent discovering it by making the wrong call first.
|
|
7
7
|
*/
|
|
8
|
-
export declare const SERVER_INSTRUCTIONS = "Qase is a test management platform: test cases, suites, runs, results, defects, plans, milestones, environments, and reviews, organized by project code. This server reads and writes all of it, and reports CI results directly.\n\nStart any new project with qase_project_context: one call returns the suite tree, milestones, environments, custom fields, and users, instead of six separate list calls. For a single known record, use qase_get. For anything filtered, cross-project, or aggregated (\"failed results this week\", \"open blockers\"), use qql_search, backed by qql_help for syntax and field references per entity.\n\
|
|
8
|
+
export declare const SERVER_INSTRUCTIONS = "Qase is a test management platform: test cases, suites, runs, results, defects, plans, milestones, environments, and reviews, organized by project code. This server reads and writes all of it, and reports CI results directly.\n\nStart any new project with qase_project_context: one call returns the suite tree, milestones, environments, custom fields, and users, instead of six separate list calls. For a single known record, use qase_get. For anything filtered, cross-project, or aggregated (\"failed results this week\", \"open blockers\"), use qql_search, backed by qql_help for syntax and field references per entity.\n\nBefore the first call of a tool you have not used in this session, read qase_tool_help for it: descriptions are kept short, and the argument semantics, limits and what cannot be undone live there. Reach for the batch call before the loop. One qql_search returns ten cases about four times faster than ten qase_get calls, and one qase_case_bulk_create writes ten cases about four times faster than ten qase_case_upsert calls. Every tool's description ends with what the call costs; read it before fetching or writing records one at a time.\n\nWriting follows one pattern throughout: qase_case_upsert, qase_run_upsert, qase_suite_upsert, qase_defect_upsert all create when `id` is omitted and update when it's given, as do every other upsert tool. A case describes what to test; a result (qase_result_record) describes what happened when it ran, into an existing run. For CI, qase_ci_report collapses create-run, record-results, and complete-run into one call. qase_regression_run builds a run from a suite, plan, or explicit case list in one step. Attachments upload separately via qase_attachment_upload \u2014 its `files` argument sends up to 20 in one request \u2014 and are referenced by hash.\n\nTest plans, milestones, environments, shared steps, projects and workspace-wide custom fields are managed here too \u2014 search qase_discover_tools with \"plan\", \"milestone\", \"environment\", \"shared step\", \"project\" or \"custom field\" if you do not know the tool's name. A project has no update endpoint, and a custom field's entity and type are fixed once it is created.\n\nEvery tool is listed from the first request \u2014 deletes, test plans, milestones, environments, shared steps, external issue links, case reviews, and project and custom-field management included. Nothing has to be activated, and the list does not change while the server runs. If you do not know which tool fits, search with qase_discover_tools rather than concluding a capability is absent.\n\nEnum fields (priority, severity, status, type, automation) accept a label or the project's numeric ID, either works.";
|
|
9
9
|
//# sourceMappingURL=server-instructions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,wqFAYqF,CAAC"}
|
|
@@ -9,13 +9,13 @@ export const SERVER_INSTRUCTIONS = `Qase is a test management platform: test cas
|
|
|
9
9
|
|
|
10
10
|
Start any new project with qase_project_context: one call returns the suite tree, milestones, environments, custom fields, and users, instead of six separate list calls. For a single known record, use qase_get. For anything filtered, cross-project, or aggregated ("failed results this week", "open blockers"), use qql_search, backed by qql_help for syntax and field references per entity.
|
|
11
11
|
|
|
12
|
-
Reach for the batch call before the loop. One qql_search returns ten cases about four times faster than ten qase_get calls, and one qase_case_bulk_create writes ten cases about four times faster than ten qase_case_upsert calls. Every tool's description ends with what the call costs; read it before fetching or writing records one at a time.
|
|
12
|
+
Before the first call of a tool you have not used in this session, read qase_tool_help for it: descriptions are kept short, and the argument semantics, limits and what cannot be undone live there. Reach for the batch call before the loop. One qql_search returns ten cases about four times faster than ten qase_get calls, and one qase_case_bulk_create writes ten cases about four times faster than ten qase_case_upsert calls. Every tool's description ends with what the call costs; read it before fetching or writing records one at a time.
|
|
13
13
|
|
|
14
|
-
Writing follows one pattern throughout: qase_case_upsert, qase_run_upsert, qase_suite_upsert, qase_defect_upsert all create when \`id\` is omitted and update when it's given, as do
|
|
14
|
+
Writing follows one pattern throughout: qase_case_upsert, qase_run_upsert, qase_suite_upsert, qase_defect_upsert all create when \`id\` is omitted and update when it's given, as do every other upsert tool. A case describes what to test; a result (qase_result_record) describes what happened when it ran, into an existing run. For CI, qase_ci_report collapses create-run, record-results, and complete-run into one call. qase_regression_run builds a run from a suite, plan, or explicit case list in one step. Attachments upload separately via qase_attachment_upload — its \`files\` argument sends up to 20 in one request — and are referenced by hash.
|
|
15
15
|
|
|
16
|
-
Test plans, milestones, environments, shared steps, projects and workspace-wide custom fields are managed here too
|
|
16
|
+
Test plans, milestones, environments, shared steps, projects and workspace-wide custom fields are managed here too — search qase_discover_tools with "plan", "milestone", "environment", "shared step", "project" or "custom field" if you do not know the tool's name. A project has no update endpoint, and a custom field's entity and type are fixed once it is created.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Every tool is listed from the first request — deletes, test plans, milestones, environments, shared steps, external issue links, case reviews, and project and custom-field management included. Nothing has to be activated, and the list does not change while the server runs. If you do not know which tool fits, search with qase_discover_tools rather than concluding a capability is absent.
|
|
19
19
|
|
|
20
20
|
Enum fields (priority, severity, status, type, automation) accept a label or the project's numeric ID, either works.`;
|
|
21
21
|
//# sourceMappingURL=server-instructions.js.map
|
package/build/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAoC,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAoC,MAAM,8BAA8B,CAAC;AAwBxF,OAAO,0BAA0B,CAAC;AAalC;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,MAAM,CA6OrC"}
|
package/build/server.js
CHANGED
|
@@ -6,15 +6,18 @@
|
|
|
6
6
|
* transport on import.
|
|
7
7
|
*/
|
|
8
8
|
import { Server, ProtocolError, ProtocolErrorCode } from '@modelcontextprotocol/server';
|
|
9
|
+
import { getMetrics } from './cache/index.js';
|
|
9
10
|
import { toolRegistry } from './utils/registry.js';
|
|
10
11
|
import { formatApiError, ToolExecutionError } from './utils/errors.js';
|
|
11
12
|
import { compactResponse } from './utils/response-shape.js';
|
|
12
13
|
import { isRichResult } from './utils/rich-response.js';
|
|
13
|
-
import { serverStorage, confirmDestructiveAction, describeRefusal, } from './utils/server-context.js';
|
|
14
|
+
import { serverStorage, requestContextStorage, InputRequiredSignal, confirmDestructiveAction, describeRefusal, } from './utils/server-context.js';
|
|
15
|
+
import { getRequestStateCodec } from './utils/request-state.js';
|
|
14
16
|
import { extractCallMarkers } from './utils/call-markers.js';
|
|
15
17
|
import { parseProducerMarker } from './utils/producer-marker.js';
|
|
16
18
|
import { producerStorage } from './utils/producer-context.js';
|
|
17
19
|
import { callIntegrationStorage } from './utils/integration-context.js';
|
|
20
|
+
import { describeCaller, recordProtocolRequest } from './utils/protocol-telemetry.js';
|
|
18
21
|
import { VERSION } from './version.js';
|
|
19
22
|
import { listPrompts, getPrompt } from './prompts/index.js';
|
|
20
23
|
import { SERVER_INSTRUCTIONS } from './server-instructions.js';
|
|
@@ -55,10 +58,27 @@ export function createServer() {
|
|
|
55
58
|
],
|
|
56
59
|
}, {
|
|
57
60
|
capabilities: {
|
|
58
|
-
tools: {
|
|
61
|
+
tools: {},
|
|
59
62
|
prompts: {},
|
|
60
63
|
},
|
|
61
64
|
instructions: SERVER_INSTRUCTIONS,
|
|
65
|
+
// `requestState` is minted by the destructive-action gate and echoed
|
|
66
|
+
// back by the client, so it re-enters as attacker-controlled input. The
|
|
67
|
+
// seam runs this hook before the handler and answers a frozen -32602
|
|
68
|
+
// when it throws, so the handler only ever sees state this process
|
|
69
|
+
// signed, for this caller and this method.
|
|
70
|
+
requestState: { verify: getRequestStateCodec().verify },
|
|
71
|
+
cacheHints: {
|
|
72
|
+
// Same as the SDK default, written down on purpose: the tool list now
|
|
73
|
+
// depends on who is asking, so the day someone makes it cacheable to
|
|
74
|
+
// save a round trip, they have to delete this line and answer for it.
|
|
75
|
+
// A shared cache here would show an agent another caller's tools.
|
|
76
|
+
'tools/list': { ttlMs: 0, cacheScope: 'private' },
|
|
77
|
+
// The prompt catalog is static — the same for every caller, and we
|
|
78
|
+
// declare no prompts.listChanged — so it is the one list worth letting
|
|
79
|
+
// a shared cache hold.
|
|
80
|
+
'prompts/list': { ttlMs: 300_000, cacheScope: 'public' },
|
|
81
|
+
},
|
|
62
82
|
});
|
|
63
83
|
/**
|
|
64
84
|
* Handler: List all available tools
|
|
@@ -66,7 +86,8 @@ export function createServer() {
|
|
|
66
86
|
* Returns all tools registered in the tool registry.
|
|
67
87
|
* Called when the MCP client wants to discover available tools.
|
|
68
88
|
*/
|
|
69
|
-
server.setRequestHandler('tools/list', async (request) => {
|
|
89
|
+
server.setRequestHandler('tools/list', async (request, ctx) => {
|
|
90
|
+
recordProtocolRequest(ctx);
|
|
70
91
|
rejectUnknownCursor(request.params?.cursor);
|
|
71
92
|
const tools = toolRegistry.getTools();
|
|
72
93
|
console.error(`[Server] Listing ${tools.length} tools`);
|
|
@@ -75,7 +96,8 @@ export function createServer() {
|
|
|
75
96
|
/**
|
|
76
97
|
* Handler: List available prompts (workflow templates)
|
|
77
98
|
*/
|
|
78
|
-
server.setRequestHandler('prompts/list', async (request) => {
|
|
99
|
+
server.setRequestHandler('prompts/list', async (request, ctx) => {
|
|
100
|
+
recordProtocolRequest(ctx);
|
|
79
101
|
rejectUnknownCursor(request.params?.cursor);
|
|
80
102
|
const prompts = listPrompts();
|
|
81
103
|
console.error(`[Server] Listing ${prompts.length} prompts`);
|
|
@@ -84,7 +106,8 @@ export function createServer() {
|
|
|
84
106
|
/**
|
|
85
107
|
* Handler: Get a specific prompt with arguments
|
|
86
108
|
*/
|
|
87
|
-
server.setRequestHandler('prompts/get', async (request) => {
|
|
109
|
+
server.setRequestHandler('prompts/get', async (request, ctx) => {
|
|
110
|
+
recordProtocolRequest(ctx);
|
|
88
111
|
const { name, arguments: args } = request.params;
|
|
89
112
|
console.error(`[Server] Getting prompt: ${name}`);
|
|
90
113
|
return getPrompt(name, args);
|
|
@@ -95,120 +118,147 @@ export function createServer() {
|
|
|
95
118
|
* Executes the specified tool with provided arguments.
|
|
96
119
|
*/
|
|
97
120
|
server.setRequestHandler('tools/call', async (request, ctx) => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
// The
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
121
|
+
recordProtocolRequest(ctx);
|
|
122
|
+
try {
|
|
123
|
+
return await // The handler's context travels via AsyncLocalStorage rather than as
|
|
124
|
+
|
|
125
|
+
// a parameter: the destructive-action gate reads the retry's answers
|
|
126
|
+
// and the verified request state off it, and is called from places
|
|
127
|
+
// with no ctx of their own — see server-context.ts.
|
|
128
|
+
requestContextStorage.run(ctx, () => serverStorage.run(server, async () => {
|
|
129
|
+
const { name, arguments: rawArgs } = request.params;
|
|
130
|
+
// The two hidden attribution arguments never reach a tool handler — see
|
|
131
|
+
// call-markers.ts for why they travel as arguments rather than a header.
|
|
132
|
+
const markers = extractCallMarkers(rawArgs);
|
|
133
|
+
const args = markers.rest;
|
|
134
|
+
console.error(`[Server] Executing tool: ${name}`);
|
|
135
|
+
getMetrics().incCounter('qase_mcp_tool_calls_total', { tool: name });
|
|
136
|
+
const runCall = async () => {
|
|
137
|
+
// Get tool handler from registry
|
|
138
|
+
const handler = toolRegistry.getHandler(name);
|
|
139
|
+
if (!handler) {
|
|
140
|
+
throw new Error(`Unknown tool: ${name}. Use list_tools to see available tools.`);
|
|
141
|
+
}
|
|
142
|
+
// Confirm destructive actions before execution. The gate is
|
|
143
|
+
// fail-closed — an unconfirmed deletion does not happen. On the
|
|
144
|
+
// first round it signals an input-required result instead of
|
|
145
|
+
// returning a verdict; the catch at the bottom of this handler
|
|
146
|
+
// turns that into the call's result.
|
|
147
|
+
const toolDef = toolRegistry.getTool(name);
|
|
148
|
+
if (toolDef?.annotations?.destructiveHint === true) {
|
|
149
|
+
const confirmation = await confirmDestructiveAction(name, args || {});
|
|
150
|
+
if (!confirmation.allowed) {
|
|
151
|
+
// The client is named because the reason alone does not say
|
|
152
|
+
// whose client behaved this way, and `declined` vs `cancelled`
|
|
153
|
+
// is the difference between a person saying no and a client
|
|
154
|
+
// dropping the question — which is what has to be chased.
|
|
155
|
+
console.error(`[Server] Refused destructive tool '${name}': ${confirmation.reason} ` +
|
|
156
|
+
`(client: ${describeCaller(ctx)})`);
|
|
157
|
+
return {
|
|
158
|
+
content: [
|
|
159
|
+
{ type: 'text', text: describeRefusal(name, confirmation.reason) },
|
|
160
|
+
],
|
|
161
|
+
// A decline is the user's decision, not a tool failure; the other
|
|
162
|
+
// reasons are something the caller has to act on.
|
|
163
|
+
...(confirmation.reason !== 'declined' && { isError: true }),
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
try {
|
|
168
|
+
// Execute the tool handler with provided arguments
|
|
169
|
+
const result = await handler(args || {});
|
|
170
|
+
// Rich results: pass through pre-formatted content blocks directly
|
|
171
|
+
if (isRichResult(result)) {
|
|
172
|
+
return {
|
|
173
|
+
content: result.content,
|
|
174
|
+
...(result.structuredContent && {
|
|
175
|
+
structuredContent: result.structuredContent,
|
|
176
|
+
}),
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
// Default: wrap in compact JSON text block
|
|
180
|
+
const compacted = compactResponse(result);
|
|
120
181
|
return {
|
|
121
182
|
content: [
|
|
122
|
-
{
|
|
183
|
+
{
|
|
184
|
+
type: 'text',
|
|
185
|
+
text: JSON.stringify(compacted),
|
|
186
|
+
},
|
|
123
187
|
],
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
|
|
188
|
+
// Attached for every object result, not only where an
|
|
189
|
+
// outputSchema used to say so: the wire no longer carries
|
|
190
|
+
// outputSchema at all (see registry.ts toWire), and a client
|
|
191
|
+
// that reads structured data gains nothing from its absence.
|
|
192
|
+
...(compacted !== null &&
|
|
193
|
+
typeof compacted === 'object' &&
|
|
194
|
+
!Array.isArray(compacted) && {
|
|
195
|
+
structuredContent: compacted,
|
|
196
|
+
}),
|
|
127
197
|
};
|
|
128
198
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
catch (error) {
|
|
155
|
-
// Handle tool execution errors (expected failures like validation, API errors)
|
|
156
|
-
// These are returned with isError: true so the LLM can understand and recover
|
|
157
|
-
if (error instanceof ToolExecutionError) {
|
|
158
|
-
console.error(`[Server] Tool '${name}' execution error:`, error.message);
|
|
199
|
+
catch (error) {
|
|
200
|
+
// Not a failure: the gate inside a tool handler (qase_api's
|
|
201
|
+
// DELETE branch) is asking for confirmation. Let it past the
|
|
202
|
+
// error mapping below, to the catch that returns it.
|
|
203
|
+
if (error instanceof InputRequiredSignal)
|
|
204
|
+
throw error;
|
|
205
|
+
// Handle tool execution errors (expected failures like validation, API errors)
|
|
206
|
+
// These are returned with isError: true so the LLM can understand and recover
|
|
207
|
+
if (error instanceof ToolExecutionError) {
|
|
208
|
+
console.error(`[Server] Tool '${name}' execution error:`, error.message);
|
|
209
|
+
return {
|
|
210
|
+
content: [
|
|
211
|
+
{
|
|
212
|
+
type: 'text',
|
|
213
|
+
text: error.toUserMessage(),
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
isError: true,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
// Handle unexpected errors (protocol-level failures)
|
|
220
|
+
// Format error message using our error utilities
|
|
221
|
+
const errorMessage = formatApiError(error);
|
|
222
|
+
console.error(`[Server] Tool '${name}' unexpected error:`, errorMessage);
|
|
223
|
+
// Return as tool execution error with isError: true for better LLM recovery
|
|
159
224
|
return {
|
|
160
225
|
content: [
|
|
161
226
|
{
|
|
162
227
|
type: 'text',
|
|
163
|
-
text:
|
|
228
|
+
text: errorMessage,
|
|
164
229
|
},
|
|
165
230
|
],
|
|
166
231
|
isError: true,
|
|
167
232
|
};
|
|
168
233
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return markers.integration
|
|
190
|
-
? callIntegrationStorage.run(markers.integration, withProducer)
|
|
191
|
-
: withProducer();
|
|
192
|
-
});
|
|
193
|
-
});
|
|
194
|
-
// Wire tool discovery notifications: when tools are activated via qase_discover_tools,
|
|
195
|
-
// notify the client so it re-queries the tool list.
|
|
196
|
-
//
|
|
197
|
-
// Subscribe rather than assign: the registry is a process-wide singleton but
|
|
198
|
-
// createServer runs once per session on the HTTP transports, and a single
|
|
199
|
-
// callback slot meant each new session silently replaced the previous one's
|
|
200
|
-
// — every older session then went unnotified and its client kept calling a
|
|
201
|
-
// tools/list it had cached before discovery ran.
|
|
202
|
-
const unsubscribe = toolRegistry.subscribeToolsChanged(() => {
|
|
203
|
-
server.sendToolListChanged().catch((err) => {
|
|
204
|
-
console.error('[Server] Failed to send tool list changed notification:', err);
|
|
205
|
-
});
|
|
234
|
+
};
|
|
235
|
+
// Both scopes stay open for the whole call, so the outbound interceptor
|
|
236
|
+
// sees them however deep in the handler the API request is made.
|
|
237
|
+
const producer = parseProducerMarker(markers.producer);
|
|
238
|
+
const withProducer = producer ? () => producerStorage.run(producer, runCall) : runCall;
|
|
239
|
+
return markers.integration
|
|
240
|
+
? callIntegrationStorage.run(markers.integration, withProducer)
|
|
241
|
+
: withProducer();
|
|
242
|
+
}));
|
|
243
|
+
}
|
|
244
|
+
catch (error) {
|
|
245
|
+
// Multi-round-trip: the destructive-action gate does not return a verdict
|
|
246
|
+
// on the first round, it signals a request for confirmation from wherever
|
|
247
|
+
// it was called. This catch sits ABOVE the one that maps errors onto
|
|
248
|
+
// `isError` results, so the request reaches the client as the result of
|
|
249
|
+
// the call rather than as the text of a failure.
|
|
250
|
+
if (error instanceof InputRequiredSignal)
|
|
251
|
+
return error.result;
|
|
252
|
+
throw error;
|
|
253
|
+
}
|
|
206
254
|
});
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
255
|
+
// Tool-list-changed push notifications used to be wired here through the
|
|
256
|
+
// registry's process-wide listener set (toolRegistry.subscribeToolsChanged),
|
|
257
|
+
// which assumed one activation event visible to every session. Activation
|
|
258
|
+
// is per-caller state now (see src/tools/activation.ts), so that mechanism
|
|
259
|
+
// is gone along with it; the 2026-07-28 era replaces the push with a client
|
|
260
|
+
// pull via `subscriptions/listen` over a `ServerEventBus`, which a later
|
|
261
|
+
// task in this migration wires in.
|
|
212
262
|
return server;
|
|
213
263
|
}
|
|
214
264
|
//# sourceMappingURL=server.js.map
|
package/build/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,eAAe,GAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,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CACE,IAAI,EAAE,MAAe;oCACrB,IAAI,EAAE,YAAY;iCACnB;6BACF;4BACD,OAAO,EAAE,IAAI;yBACd,CAAC;oBACJ,CAAC;gBACH,CAAC,CAAC;gBAEF,wEAAwE;gBACxE,iEAAiE;gBACjE,MAAM,QAAQ,GAAG,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBACvD,MAAM,YAAY,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;gBAEvF,OAAO,OAAO,CAAC,WAAW;oBACxB,CAAC,CAAC,sBAAsB,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,YAAY,CAAC;oBAC/D,CAAC,CAAC,YAAY,EAAE,CAAC;YACrB,CAAC,CAAC,CACH,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,0EAA0E;YAC1E,0EAA0E;YAC1E,qEAAqE;YACrE,wEAAwE;YACxE,iDAAiD;YACjD,IAAI,KAAK,YAAY,mBAAmB;gBAAE,OAAO,KAAK,CAAC,MAAM,CAAC;YAC9D,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,yEAAyE;IACzE,6EAA6E;IAC7E,0EAA0E;IAC1E,2EAA2E;IAC3E,4EAA4E;IAC5E,yEAAyE;IACzE,mCAAmC;IAEnC,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
+
export declare function readBodyLimit(env?: Record<string, string | undefined>): string;
|
|
1
2
|
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
4
|
-
* It exists because `qase_attachment_upload` sends file content as base64
|
|
5
|
-
* inside the JSON-RPC body — on a network transport that is the only option,
|
|
6
|
-
* since the server cannot see the caller's filesystem. express defaults to
|
|
7
|
-
* 100kb, which silently capped uploads at roughly 75kb of file while the tool
|
|
8
|
-
* advertised far more.
|
|
3
|
+
* The same cap as `readBodyLimit()`, in bytes.
|
|
9
4
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* the cap: an unlimited body on a public endpoint is a memory-exhaustion knob,
|
|
17
|
-
* so this one does not offer an off switch (unlike the rate limiter, where 0
|
|
18
|
-
* is a legitimate choice for a private deployment).
|
|
5
|
+
* `express.json()` takes the human string; the MCP handler and the Node
|
|
6
|
+
* adapter take a number of bytes and default to 4 MiB of their own. Left at
|
|
7
|
+
* that default they would answer 413 long before express ever saw the body,
|
|
8
|
+
* silently undoing the 10 MB limit release 2.7.5 set for attachment uploads —
|
|
9
|
+
* so both sides are fed from this one function, and a test pins them to each
|
|
10
|
+
* other.
|
|
19
11
|
*/
|
|
20
|
-
export declare function
|
|
12
|
+
export declare function bodyLimitBytes(env?: Record<string, string | undefined>): number;
|
|
21
13
|
//# sourceMappingURL=body-limit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body-limit.d.ts","sourceRoot":"","sources":["../../src/transports/body-limit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"body-limit.d.ts","sourceRoot":"","sources":["../../src/transports/body-limit.ts"],"names":[],"mappings":"AA4BA,wBAAgB,aAAa,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,MAAM,CAE3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,MAAM,CAE5F"}
|