@onlyflows/servicenow-mcp 2.2.0-dev.1 → 2.2.0-dev.2
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 +32 -0
- package/README.md +14 -8
- package/dist/atf-form.d.ts +27 -0
- package/dist/atf-form.d.ts.map +1 -0
- package/dist/atf-form.js +110 -0
- package/dist/atf-form.js.map +1 -0
- package/dist/atf-policy.d.ts +1 -1
- package/dist/atf-policy.d.ts.map +1 -1
- package/dist/atf-policy.js +2 -0
- package/dist/atf-policy.js.map +1 -1
- package/dist/atf-result-cache.d.ts +10 -6
- package/dist/atf-result-cache.d.ts.map +1 -1
- package/dist/atf-result-cache.js +14 -1
- package/dist/atf-result-cache.js.map +1 -1
- package/dist/client.d.ts +6 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +35 -7
- package/dist/client.js.map +1 -1
- package/dist/field-policy.d.ts.map +1 -1
- package/dist/field-policy.js +6 -1
- package/dist/field-policy.js.map +1 -1
- package/dist/metadata-cache.d.ts.map +1 -1
- package/dist/metadata-cache.js +1 -0
- package/dist/metadata-cache.js.map +1 -1
- package/dist/setup.js +3 -3
- package/dist/setup.js.map +1 -1
- package/dist/structured-query.d.ts +2 -2
- package/dist/tool-table-access.js +2 -4
- package/dist/tool-table-access.js.map +1 -1
- package/dist/tools/aggregate.d.ts +1 -1
- package/dist/tools/atf-author-module.d.ts +67 -4
- package/dist/tools/atf-author-module.d.ts.map +1 -1
- package/dist/tools/atf-author-module.js +25 -10
- package/dist/tools/atf-author-module.js.map +1 -1
- package/dist/tools/atf-contracts.d.ts +734 -0
- package/dist/tools/atf-contracts.d.ts.map +1 -0
- package/dist/tools/atf-contracts.js +30 -0
- package/dist/tools/atf-contracts.js.map +1 -0
- package/dist/tools/atf-readiness-module.d.ts +2 -0
- package/dist/tools/atf-readiness-module.d.ts.map +1 -0
- package/dist/tools/atf-readiness-module.js +153 -0
- package/dist/tools/atf-readiness-module.js.map +1 -0
- package/dist/tools/atf-renderers.d.ts +2 -0
- package/dist/tools/atf-renderers.d.ts.map +1 -0
- package/dist/tools/atf-renderers.js +39 -0
- package/dist/tools/atf-renderers.js.map +1 -0
- package/dist/tools/atf-results-module.d.ts +2 -0
- package/dist/tools/atf-results-module.d.ts.map +1 -0
- package/dist/tools/atf-results-module.js +58 -0
- package/dist/tools/atf-results-module.js.map +1 -0
- package/dist/tools/atf-run-module.d.ts +3 -0
- package/dist/tools/atf-run-module.d.ts.map +1 -0
- package/dist/tools/atf-run-module.js +96 -0
- package/dist/tools/atf-run-module.js.map +1 -0
- package/dist/tools/atf-shared.d.ts +31 -0
- package/dist/tools/atf-shared.d.ts.map +1 -0
- package/dist/tools/atf-shared.js +182 -0
- package/dist/tools/atf-shared.js.map +1 -0
- package/dist/tools/atf-step-catalog.d.ts +96 -0
- package/dist/tools/atf-step-catalog.d.ts.map +1 -0
- package/dist/tools/atf-step-catalog.js +237 -0
- package/dist/tools/atf-step-catalog.js.map +1 -0
- package/dist/tools/atf-step-definitions.json +533 -0
- package/dist/tools/atf.d.ts +4 -4
- package/dist/tools/atf.d.ts.map +1 -1
- package/dist/tools/atf.js +4 -234
- package/dist/tools/atf.js.map +1 -1
- package/dist/tools/attach.d.ts +1 -1
- package/dist/tools/batch.d.ts +2 -2
- package/dist/tools/catalog.d.ts +2 -3
- package/dist/tools/catalog.d.ts.map +1 -1
- package/dist/tools/catalog.js +7 -2
- package/dist/tools/catalog.js.map +1 -1
- package/dist/tools/discover.d.ts +1 -1
- package/dist/tools/index.d.ts +3 -3
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3 -10
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/relationships.d.ts +2 -2
- package/dist/tools/result-envelope.d.ts +763 -33
- package/dist/tools/result-envelope.d.ts.map +1 -1
- package/dist/tools/result-envelope.js +20 -6
- package/dist/tools/result-envelope.js.map +1 -1
- package/dist/tools/syslog.d.ts +2 -2
- package/dist/tools/tool-module.d.ts +2 -0
- package/dist/tools/tool-module.d.ts.map +1 -1
- package/dist/tools/tool-module.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/ATF-WORKFLOW.md +115 -0
- package/docs/CLIENT-SETUP.md +2 -2
- package/docs/CONTAINER-DEPLOYMENT.md +2 -2
- package/docs/CROSS-CLIENT-RELEASE-MATRIX.md +1 -1
- package/docs/PROFILE-CREDENTIALS.md +14 -12
- package/docs/RELEASE-VALIDATION.md +2 -2
- package/docs/TESTING-OAUTH.md +1 -1
- package/docs/V2-MIGRATION.md +4 -4
- package/package.json +4 -2
package/docs/CLIENT-SETUP.md
CHANGED
|
@@ -415,7 +415,7 @@ runtime and immutable image. See `CROSS-CLIENT-RELEASE-MATRIX.md`.
|
|
|
415
415
|
|
|
416
416
|
## 5. Profile selection, results, and audit evidence
|
|
417
417
|
|
|
418
|
-
All
|
|
418
|
+
All 23 tools require a non-empty `profile`. Missing, empty, unknown, or invalid
|
|
419
419
|
names fail before credentials or a ServiceNow client. There is no default,
|
|
420
420
|
active, current, selected-session, or switch-profile operation. To work across
|
|
421
421
|
instances, make separate calls and include the intended name each time:
|
|
@@ -659,7 +659,7 @@ have been separately authorized. The current official OpenAI flow is:
|
|
|
659
659
|
create a developer-mode app, choose **Tunnel** under **Connection**, and
|
|
660
660
|
select the associated tunnel. Do not enter a public MCP URL or a second
|
|
661
661
|
Authorization value in the app.
|
|
662
|
-
4. Scan tools and compare the
|
|
662
|
+
4. Scan tools and compare the 23 names, schemas, and annotations with the
|
|
663
663
|
frozen release manifest. Keep the app private and draft-only.
|
|
664
664
|
5. On every use, name the profile in the request. For example, instruct the
|
|
665
665
|
app to invoke `sn_query` with these exact non-secret arguments:
|
|
@@ -317,5 +317,5 @@ owned by the runtime user with mode 0700; files are written atomically at 0600.
|
|
|
317
317
|
It rejects symlink cache files/directories and does not change permissions on
|
|
318
318
|
an existing shared directory. On a read-only or unavailable filesystem it
|
|
319
319
|
warns once on stderr and uses bounded memory until restart. Corrupt or oversized
|
|
320
|
-
files are discarded with a warning.
|
|
321
|
-
|
|
320
|
+
files are discarded with a warning. Completed, verified runs from `sn_atf_run` and `sn_atf_results get` populate
|
|
321
|
+
the cache. History and comparison read it without ServiceNow requests.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This is the release contract for the HTTP MCP surface. A release must expose
|
|
4
4
|
one immutable server artifact at `/mcp` and pass the same contract through both
|
|
5
5
|
the official Model Context Protocol SDK client and an independent Fetch
|
|
6
|
-
JSON-RPC client. The required production catalog contains exactly
|
|
6
|
+
JSON-RPC client. The required production catalog contains exactly 23 tools.
|
|
7
7
|
User-facing configuration and examples for both clients are in
|
|
8
8
|
`docs/CLIENT-SETUP.md`.
|
|
9
9
|
|
|
@@ -127,8 +127,8 @@ credential through the protected administration entry point.
|
|
|
127
127
|
|
|
128
128
|
## ATF authoring and result cache
|
|
129
129
|
|
|
130
|
-
`sn_atf_author` supports `create_test`, `create_suite`,
|
|
131
|
-
`add_tests_to_suite`. A profile needs explicit writes for the corresponding
|
|
130
|
+
`sn_atf_author` supports `create_test`, `create_suite`,
|
|
131
|
+
`add_tests_to_suite`, `list_step_types`, and `add_steps`. A profile needs explicit writes for the corresponding
|
|
132
132
|
`sys_atf_test`, `sys_atf_test_suite`, or `sys_atf_test_suite_test` table and
|
|
133
133
|
field grants for the values being written. For example:
|
|
134
134
|
|
|
@@ -137,14 +137,17 @@ servicenow-mcp-setup grant --profile pdi --atf --dry-run
|
|
|
137
137
|
servicenow-mcp-setup grant --profile pdi --atf
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
The preset binds
|
|
141
|
-
plus `sys_atf_step` and `
|
|
140
|
+
The preset binds six authoring tables to `sn_atf_author`: the three above,
|
|
141
|
+
plus `sys_atf_step`, `sys_variable_value`, and `sys_element_mapping` for step
|
|
142
|
+
authoring. Inputs and output mappings are saved through the authenticated native
|
|
143
|
+
ATF form with stored-value verification; no ACL changes or installed app are required.
|
|
144
|
+
It also grants the metadata and read-back tables needed by `add_steps`.
|
|
142
145
|
It does not enable execution or script authoring, and does not add authoring
|
|
143
146
|
to unrelated table targets. Existing grants remain in place.
|
|
144
147
|
|
|
145
148
|
Create a test with `{"profile":"pdi","action":"create_test","name":"Example"}`.
|
|
146
149
|
Creation accepts optional `description`, `active` (default true), and
|
|
147
|
-
`application_scope` (a scope sys_id). Membership accepts `suite_sys_id`,
|
|
150
|
+
`application_scope` (a scope sys_id, or `"global"` for Global). Membership accepts `suite_sys_id`,
|
|
148
151
|
`test_sys_ids` (1–100 unique IDs), and optional `start_order` (default 100).
|
|
149
152
|
Orders increment by one; existing memberships are not deduplicated or reordered.
|
|
150
153
|
The instance enforces reference integrity, application scope, and ACLs.
|
|
@@ -174,16 +177,15 @@ and `SN_ATF_RESULT_CACHE_DIR`. `SN_ATF_EXECUTE` and
|
|
|
174
177
|
`SN_ATF_ALLOW_SCRIPT_STEPS` grant permissions only to an environment-only
|
|
175
178
|
profile, never to stored profiles.
|
|
176
179
|
|
|
177
|
-
|
|
178
|
-
|
|
180
|
+
`sn_atf_run` and `sn_atf_results get` cache completed, verified suite runs.
|
|
181
|
+
The cache stores compact run summaries and
|
|
179
182
|
at most 500 characters of the first failure per test, without raw step output.
|
|
180
183
|
Files default to `~/.servicenow-mcp/atf-results/<sha256-profile-name>.json`;
|
|
181
184
|
hashed profile names prevent path traversal. Each file is bound to the
|
|
182
|
-
instance origin and
|
|
185
|
+
instance origin, credential fingerprint and effective policy, with up to 200 suites and a 16 MiB
|
|
183
186
|
file cap. Least-recently-used suites are evicted when those bounds are reached.
|
|
184
|
-
Changing instance or
|
|
187
|
+
Changing instance, credentials or policy discards the old history. Cache directories
|
|
185
188
|
and files must be private (0700/0600 on POSIX).
|
|
186
189
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
Legacy `sn_atf run` and `run-suite` remain policy-denied even with `execute: true`.
|
|
190
|
+
See [ATF workflow](ATF-WORKFLOW.md) for readiness, execution, results and typed
|
|
191
|
+
step authoring. Legacy execution actions return migration guidance.
|
|
@@ -26,7 +26,7 @@ npm audit --omit=dev --audit-level=moderate
|
|
|
26
26
|
|
|
27
27
|
The unit and protocol commands are deliberately separate release records even
|
|
28
28
|
though the complete unit suite contains the focused protocol cases. The
|
|
29
|
-
protocol gate includes the all-
|
|
29
|
+
protocol gate includes the all-23-tool missing-profile rejection matrix through
|
|
30
30
|
the official SDK and independent Fetch clients, plus the catalog-wide resolved
|
|
31
31
|
profile/result/audit contract. The profile gate covers encryption,
|
|
32
32
|
secret-reference resolution, operator administration, and profile isolation.
|
|
@@ -68,7 +68,7 @@ bearer header in argv. In the local UI:
|
|
|
68
68
|
|
|
69
69
|
1. Select Streamable HTTP and enter the exact `MCP_URL` shown by the launcher.
|
|
70
70
|
2. Enter the bearer directly from the approved secret store in the local UI.
|
|
71
|
-
3. Run `tools/list`; verify exactly
|
|
71
|
+
3. Run `tools/list`; verify exactly 23 tools and required non-empty `profile`
|
|
72
72
|
schemas.
|
|
73
73
|
4. Call `sn_profile` once without `profile` and verify rejection.
|
|
74
74
|
5. Call it again with the exact `MCP_PROFILE`; verify
|
package/docs/TESTING-OAUTH.md
CHANGED
|
@@ -60,7 +60,7 @@ npm run smoke
|
|
|
60
60
|
The smoke client uses the official MCP Streamable HTTP client and verifies:
|
|
61
61
|
|
|
62
62
|
- initialization and discovery over `/mcp`;
|
|
63
|
-
- exactly
|
|
63
|
+
- exactly 23 tools;
|
|
64
64
|
- every discovered schema requires a non-empty `profile`;
|
|
65
65
|
- `sn_profile` returns `structuredContent.profile` without credentials;
|
|
66
66
|
- a version health check and a bounded incident query return that same resolved
|
package/docs/V2-MIGRATION.md
CHANGED
|
@@ -446,10 +446,10 @@ refuse any particular table: since 2.0 there is no built-in deny list, so a
|
|
|
446
446
|
credential, authentication, or role-grant table configured in `tableAccess` is
|
|
447
447
|
granted, bounded only by the integration account's ServiceNow roles.
|
|
448
448
|
Multi-table tools must have their complete operation plan authorized before the
|
|
449
|
-
first ServiceNow client access. `sn_nl`
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
449
|
+
first ServiceNow client access. `sn_nl` remains denied without a complete typed
|
|
450
|
+
side-effect plan. Legacy ATF execution actions return migration guidance; use
|
|
451
|
+
`sn_atf_run` with the explicit `atf.execute` profile grant. See
|
|
452
|
+
[ATF workflow](ATF-WORKFLOW.md).
|
|
453
453
|
|
|
454
454
|
### Incident journal migration
|
|
455
455
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlyflows/servicenow-mcp",
|
|
3
|
-
"version": "2.2.0-dev.
|
|
4
|
-
"description": "stdio ServiceNow MCP server with
|
|
3
|
+
"version": "2.2.0-dev.2",
|
|
4
|
+
"description": "stdio ServiceNow MCP server with 23 tools for CRUD, CMDB traversal, ATF testing, and explicit multi-instance profiles.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@hono/node-server": "2.0.12",
|
|
61
61
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
62
|
+
"parse5": "7.3.0",
|
|
62
63
|
"zod": "^3.25.76"
|
|
63
64
|
},
|
|
64
65
|
"overrides": {
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
".env.example",
|
|
79
80
|
"dist",
|
|
80
81
|
"docs/ADDING-TOOLS.md",
|
|
82
|
+
"docs/ATF-WORKFLOW.md",
|
|
81
83
|
"docs/CLIENT-SETUP.md",
|
|
82
84
|
"docs/CONTAINER-DEPLOYMENT.md",
|
|
83
85
|
"docs/CROSS-CLIENT-RELEASE-MATRIX.md",
|