@onlyflows/servicenow-mcp 1.0.0 → 2.1.0
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/.env.example +56 -0
- package/CHANGELOG.md +214 -0
- package/README.md +939 -101
- package/dist/auth.d.ts +88 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +396 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +111 -17
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +554 -79
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +41 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +44 -34
- package/dist/config.js.map +1 -1
- package/dist/encoded-query-policy.d.ts +72 -0
- package/dist/encoded-query-policy.d.ts.map +1 -0
- package/dist/encoded-query-policy.js +409 -0
- package/dist/encoded-query-policy.js.map +1 -0
- package/dist/execution-context.d.ts +235 -0
- package/dist/execution-context.d.ts.map +1 -0
- package/dist/execution-context.js +441 -0
- package/dist/execution-context.js.map +1 -0
- package/dist/field-policy.d.ts +117 -0
- package/dist/field-policy.d.ts.map +1 -0
- package/dist/field-policy.js +1684 -0
- package/dist/field-policy.js.map +1 -0
- package/dist/http-auth.d.ts +131 -0
- package/dist/http-auth.d.ts.map +1 -0
- package/dist/http-auth.js +347 -0
- package/dist/http-auth.js.map +1 -0
- package/dist/http-entrypoint.d.ts +26 -0
- package/dist/http-entrypoint.d.ts.map +1 -0
- package/dist/http-entrypoint.js +255 -0
- package/dist/http-entrypoint.js.map +1 -0
- package/dist/http-observability.d.ts +147 -0
- package/dist/http-observability.d.ts.map +1 -0
- package/dist/http-observability.js +711 -0
- package/dist/http-observability.js.map +1 -0
- package/dist/http-request-policy.d.ts +72 -0
- package/dist/http-request-policy.d.ts.map +1 -0
- package/dist/http-request-policy.js +463 -0
- package/dist/http-request-policy.js.map +1 -0
- package/dist/http-request-signal.d.ts +12 -0
- package/dist/http-request-signal.d.ts.map +1 -0
- package/dist/http-request-signal.js +39 -0
- package/dist/http-request-signal.js.map +1 -0
- package/dist/http-runtime.d.ts +77 -0
- package/dist/http-runtime.d.ts.map +1 -0
- package/dist/http-runtime.js +1321 -0
- package/dist/http-runtime.js.map +1 -0
- package/dist/incident-journal-policy.d.ts +22 -0
- package/dist/incident-journal-policy.d.ts.map +1 -0
- package/dist/incident-journal-policy.js +115 -0
- package/dist/incident-journal-policy.js.map +1 -0
- package/dist/index.d.ts +14 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +140 -36
- package/dist/index.js.map +1 -1
- package/dist/metadata-cache.d.ts +71 -0
- package/dist/metadata-cache.d.ts.map +1 -0
- package/dist/metadata-cache.js +397 -0
- package/dist/metadata-cache.js.map +1 -0
- package/dist/profile-admin.d.ts +64 -0
- package/dist/profile-admin.d.ts.map +1 -0
- package/dist/profile-admin.js +351 -0
- package/dist/profile-admin.js.map +1 -0
- package/dist/profile-credentials.d.ts +68 -0
- package/dist/profile-credentials.d.ts.map +1 -0
- package/dist/profile-credentials.js +329 -0
- package/dist/profile-credentials.js.map +1 -0
- package/dist/profile-manager.d.ts +187 -0
- package/dist/profile-manager.d.ts.map +1 -0
- package/dist/profile-manager.js +1026 -0
- package/dist/profile-manager.js.map +1 -0
- package/dist/record-identifier-policy.d.ts +39 -0
- package/dist/record-identifier-policy.d.ts.map +1 -0
- package/dist/record-identifier-policy.js +203 -0
- package/dist/record-identifier-policy.js.map +1 -0
- package/dist/runtime-environment.d.ts +23 -0
- package/dist/runtime-environment.d.ts.map +1 -0
- package/dist/runtime-environment.js +58 -0
- package/dist/runtime-environment.js.map +1 -0
- package/dist/server.d.ts +33 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +73 -0
- package/dist/server.js.map +1 -0
- package/dist/servicenow-identifiers.d.ts +8 -0
- package/dist/servicenow-identifiers.d.ts.map +1 -0
- package/dist/servicenow-identifiers.js +22 -0
- package/dist/servicenow-identifiers.js.map +1 -0
- package/dist/setup-prompts.d.ts +7 -0
- package/dist/setup-prompts.d.ts.map +1 -0
- package/dist/setup-prompts.js +123 -0
- package/dist/setup-prompts.js.map +1 -0
- package/dist/setup.d.ts +109 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +1903 -0
- package/dist/setup.js.map +1 -0
- package/dist/startup.d.ts +43 -0
- package/dist/startup.d.ts.map +1 -0
- package/dist/startup.js +75 -0
- package/dist/startup.js.map +1 -0
- package/dist/stdio-runtime.d.ts +106 -0
- package/dist/stdio-runtime.d.ts.map +1 -0
- package/dist/stdio-runtime.js +231 -0
- package/dist/stdio-runtime.js.map +1 -0
- package/dist/structured-query.d.ts +187 -0
- package/dist/structured-query.d.ts.map +1 -0
- package/dist/structured-query.js +503 -0
- package/dist/structured-query.js.map +1 -0
- package/dist/table-defaults.d.ts +28 -0
- package/dist/table-defaults.d.ts.map +1 -0
- package/dist/table-defaults.js +85 -0
- package/dist/table-defaults.js.map +1 -0
- package/dist/table-policy.d.ts +71 -0
- package/dist/table-policy.d.ts.map +1 -0
- package/dist/table-policy.js +290 -0
- package/dist/table-policy.js.map +1 -0
- package/dist/tool-error.d.ts +48 -0
- package/dist/tool-error.d.ts.map +1 -0
- package/dist/tool-error.js +139 -0
- package/dist/tool-error.js.map +1 -0
- package/dist/tool-table-access.d.ts +19 -0
- package/dist/tool-table-access.d.ts.map +1 -0
- package/dist/tool-table-access.js +388 -0
- package/dist/tool-table-access.js.map +1 -0
- package/dist/tools/aggregate.d.ts +22 -42
- package/dist/tools/aggregate.d.ts.map +1 -1
- package/dist/tools/aggregate.js +103 -47
- package/dist/tools/aggregate.js.map +1 -1
- package/dist/tools/all-fields-cap.d.ts +45 -0
- package/dist/tools/all-fields-cap.d.ts.map +1 -0
- package/dist/tools/all-fields-cap.js +151 -0
- package/dist/tools/all-fields-cap.js.map +1 -0
- package/dist/tools/atf.d.ts +21 -60
- package/dist/tools/atf.d.ts.map +1 -1
- package/dist/tools/atf.js +180 -116
- package/dist/tools/atf.js.map +1 -1
- package/dist/tools/attach.d.ts +31 -45
- package/dist/tools/attach.d.ts.map +1 -1
- package/dist/tools/attach.js +175 -137
- package/dist/tools/attach.js.map +1 -1
- package/dist/tools/batch.d.ts +78 -42
- package/dist/tools/batch.d.ts.map +1 -1
- package/dist/tools/batch.js +172 -68
- package/dist/tools/batch.js.map +1 -1
- package/dist/tools/catalog.d.ts +6 -0
- package/dist/tools/catalog.d.ts.map +1 -0
- package/dist/tools/catalog.js +203 -0
- package/dist/tools/catalog.js.map +1 -0
- package/dist/tools/codesearch.d.ts +14 -25
- package/dist/tools/codesearch.d.ts.map +1 -1
- package/dist/tools/codesearch.js +60 -48
- package/dist/tools/codesearch.js.map +1 -1
- package/dist/tools/create-module.d.ts +48 -0
- package/dist/tools/create-module.d.ts.map +1 -0
- package/dist/tools/create-module.js +98 -0
- package/dist/tools/create-module.js.map +1 -0
- package/dist/tools/create.d.ts +2 -38
- package/dist/tools/create.d.ts.map +1 -1
- package/dist/tools/create.js +9 -41
- package/dist/tools/create.js.map +1 -1
- package/dist/tools/delete.d.ts +13 -23
- package/dist/tools/delete.d.ts.map +1 -1
- package/dist/tools/delete.js +30 -33
- package/dist/tools/delete.js.map +1 -1
- package/dist/tools/discover.d.ts +15 -27
- package/dist/tools/discover.d.ts.map +1 -1
- package/dist/tools/discover.js +103 -60
- package/dist/tools/discover.js.map +1 -1
- package/dist/tools/get-module.d.ts +85 -0
- package/dist/tools/get-module.d.ts.map +1 -0
- package/dist/tools/get-module.js +221 -0
- package/dist/tools/get-module.js.map +1 -0
- package/dist/tools/get.d.ts +2 -51
- package/dist/tools/get.d.ts.map +1 -1
- package/dist/tools/get.js +9 -49
- package/dist/tools/get.js.map +1 -1
- package/dist/tools/handler-result.d.ts +14 -0
- package/dist/tools/handler-result.d.ts.map +1 -0
- package/dist/tools/handler-result.js +177 -0
- package/dist/tools/handler-result.js.map +1 -0
- package/dist/tools/health.d.ts +12 -15
- package/dist/tools/health.d.ts.map +1 -1
- package/dist/tools/health.js +55 -36
- package/dist/tools/health.js.map +1 -1
- package/dist/tools/incident-journal-module.d.ts +12 -0
- package/dist/tools/incident-journal-module.d.ts.map +1 -0
- package/dist/tools/incident-journal-module.js +61 -0
- package/dist/tools/incident-journal-module.js.map +1 -0
- package/dist/tools/index.d.ts +47 -36
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +814 -35
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/nl.d.ts +10 -24
- package/dist/tools/nl.d.ts.map +1 -1
- package/dist/tools/nl.js +37 -147
- package/dist/tools/nl.js.map +1 -1
- package/dist/tools/profile.d.ts +37 -0
- package/dist/tools/profile.d.ts.map +1 -0
- package/dist/tools/profile.js +39 -0
- package/dist/tools/profile.js.map +1 -0
- package/dist/tools/query-module.d.ts +119 -0
- package/dist/tools/query-module.d.ts.map +1 -0
- package/dist/tools/query-module.js +324 -0
- package/dist/tools/query-module.js.map +1 -0
- package/dist/tools/query.d.ts +2 -72
- package/dist/tools/query.d.ts.map +1 -1
- package/dist/tools/query.js +8 -72
- package/dist/tools/query.js.map +1 -1
- package/dist/tools/record-write-shared.d.ts +7 -0
- package/dist/tools/record-write-shared.d.ts.map +1 -0
- package/dist/tools/record-write-shared.js +65 -0
- package/dist/tools/record-write-shared.js.map +1 -0
- package/dist/tools/relationships.d.ts +21 -42
- package/dist/tools/relationships.d.ts.map +1 -1
- package/dist/tools/relationships.js +70 -56
- package/dist/tools/relationships.js.map +1 -1
- package/dist/tools/result-envelope.d.ts +603 -0
- package/dist/tools/result-envelope.d.ts.map +1 -0
- package/dist/tools/result-envelope.js +770 -0
- package/dist/tools/result-envelope.js.map +1 -0
- package/dist/tools/schema-module.d.ts +64 -0
- package/dist/tools/schema-module.d.ts.map +1 -0
- package/dist/tools/schema-module.js +367 -0
- package/dist/tools/schema-module.js.map +1 -0
- package/dist/tools/schema.d.ts +2 -37
- package/dist/tools/schema.d.ts.map +1 -1
- package/dist/tools/schema.js +6 -57
- package/dist/tools/schema.js.map +1 -1
- package/dist/tools/script.d.ts +33 -27
- package/dist/tools/script.d.ts.map +1 -1
- package/dist/tools/script.js +43 -37
- package/dist/tools/script.js.map +1 -1
- package/dist/tools/syslog.d.ts +19 -46
- package/dist/tools/syslog.d.ts.map +1 -1
- package/dist/tools/syslog.js +101 -67
- package/dist/tools/syslog.js.map +1 -1
- package/dist/tools/tool-module.d.ts +143 -0
- package/dist/tools/tool-module.d.ts.map +1 -0
- package/dist/tools/tool-module.js +1095 -0
- package/dist/tools/tool-module.js.map +1 -0
- package/dist/tools/update-module.d.ts +51 -0
- package/dist/tools/update-module.d.ts.map +1 -0
- package/dist/tools/update-module.js +111 -0
- package/dist/tools/update-module.js.map +1 -0
- package/dist/tools/update.d.ts +2 -45
- package/dist/tools/update.d.ts.map +1 -1
- package/dist/tools/update.js +9 -41
- package/dist/tools/update.js.map +1 -1
- package/dist/utils.d.ts +68 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +114 -16
- package/dist/utils.js.map +1 -1
- package/dist/version.d.ts +10 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +13 -0
- package/dist/version.js.map +1 -0
- package/dist/write-value-policy.d.ts +56 -0
- package/dist/write-value-policy.d.ts.map +1 -0
- package/dist/write-value-policy.js +310 -0
- package/dist/write-value-policy.js.map +1 -0
- package/docs/ADDING-TOOLS.md +227 -0
- package/docs/CLIENT-SETUP.md +914 -0
- package/docs/CONTAINER-DEPLOYMENT.md +310 -0
- package/docs/CROSS-CLIENT-RELEASE-MATRIX.md +63 -0
- package/docs/ENTERPRISE-RELEASE-BOUNDARY.md +149 -0
- package/docs/OPERATIONS-RUNBOOK.md +383 -0
- package/docs/PRIVATE-CHATGPT-CONNECTIVITY.md +347 -0
- package/docs/PRODUCTION-SECURITY.md +368 -0
- package/docs/PROFILE-CREDENTIALS.md +126 -0
- package/docs/RELEASE-VALIDATION.md +140 -0
- package/docs/TESTING-OAUTH.md +101 -0
- package/docs/V2-MIGRATION.md +493 -0
- package/package.json +60 -13
- package/scripts/inspector.mjs +140 -0
- package/scripts/release-validate.mjs +201 -0
- package/scripts/smoke-test.mjs +274 -0
- package/tools/inspector/package-lock.json +3812 -0
- package/tools/inspector/package.json +12 -0
package/.env.example
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# ServiceNow MCP V2 configuration inventory.
|
|
2
|
+
#
|
|
3
|
+
# This committed file contains non-secret placeholders only. Do not put a
|
|
4
|
+
# bearer token, password, OAuth client secret, API key, encryption key, or
|
|
5
|
+
# provider credential here or in another repository dotenv file. Leave every
|
|
6
|
+
# secret assignment below empty and inject its value at process start through
|
|
7
|
+
# an approved supervisor, orchestrator, OS keychain, or secret manager.
|
|
8
|
+
|
|
9
|
+
# The transport is stdio. An MCP client spawns `servicenow-mcp` and speaks
|
|
10
|
+
# JSON-RPC over that process's stdin/stdout, so there is no host, no port, and
|
|
11
|
+
# no endpoint to configure here.
|
|
12
|
+
#
|
|
13
|
+
# The server also reads ~/.servicenow-mcp/server.env at startup, because the
|
|
14
|
+
# client that spawns it supplies its own environment. Values already present in
|
|
15
|
+
# the environment always win over that file.
|
|
16
|
+
|
|
17
|
+
# Owner identity: non-secret labels that appear in audit records. They are not
|
|
18
|
+
# credentials and are never checked; `servicenow-mcp-setup` generates a
|
|
19
|
+
# per-install pair so records from two installs stay distinguishable.
|
|
20
|
+
MCP_OWNER_ID=example-owner
|
|
21
|
+
MCP_CLIENT_ID=example-client
|
|
22
|
+
|
|
23
|
+
# The boundary is the client list and the grants below, not a network one.
|
|
24
|
+
# Every MCP client registered to spawn this server can read and write whatever
|
|
25
|
+
# the profiles allow, as the configured ServiceNow account. Nothing listens on
|
|
26
|
+
# a port, so nothing off this machine can reach it.
|
|
27
|
+
|
|
28
|
+
# Deny-by-default example policy. This permits only bounded incident reads.
|
|
29
|
+
# For local exploratory read-only testing, SN_ALLOWED_READ_TABLES=* plus the
|
|
30
|
+
# SN_FIELD_POLICY_DEFINITIONS wildcard below allows all non-hard-denied readable
|
|
31
|
+
# tables/fields. Keep writes exact unless you intentionally want broad mutation
|
|
32
|
+
# access.
|
|
33
|
+
SN_ALLOWED_READ_TABLES=incident
|
|
34
|
+
SN_ALLOWED_WRITE_TABLES=
|
|
35
|
+
SN_TABLE_ACCESS_TARGETS=[{"table":"incident","kind":"canonical","tools":["sn_query","sn_get"],"closureComplete":true,"relatedTables":["incident"]}]
|
|
36
|
+
# SN_FIELD_POLICY_DEFINITIONS={"*":{"defaults":["sys_id"],"readable":"*","writable":[]}}
|
|
37
|
+
# SN_ENCODED_QUERY_READ_POLICY is intentionally unset, so raw reads are denied.
|
|
38
|
+
|
|
39
|
+
# One explicit environment-only compatibility profile. Every tool invocation
|
|
40
|
+
# must pass profile="example-dev". For two or more profiles, use the protected
|
|
41
|
+
# out-of-band config/CLI workflow in docs/CLIENT-SETUP.md instead of duplicating
|
|
42
|
+
# plaintext SN_* values in dotenv files.
|
|
43
|
+
SN_PROFILE_NAME=example-dev
|
|
44
|
+
SN_INSTANCE=https://example.invalid
|
|
45
|
+
SN_AUTH_TYPE=oauth
|
|
46
|
+
SN_GRANT_TYPE=client_credentials
|
|
47
|
+
SN_CLIENT_ID=example-non-secret-oauth-client-id
|
|
48
|
+
SN_USER=
|
|
49
|
+
SN_PASSWORD=
|
|
50
|
+
SN_CLIENT_SECRET=
|
|
51
|
+
SN_API_KEY=
|
|
52
|
+
SN_PROFILE_ENCRYPTION_KEY=
|
|
53
|
+
SN_ALLOWED_INSTANCE_HOSTS=example.invalid
|
|
54
|
+
SN_TIMEOUT_MS=30000
|
|
55
|
+
SN_DISPLAY_VALUE=true
|
|
56
|
+
SN_REL_DEPTH=3
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [2.1.0] — 2026-09
|
|
9
|
+
|
|
10
|
+
> **Read this before upgrading if any profile grants `writeTables: ["*"]`, or
|
|
11
|
+
> names a table other than `incident`.** In 2.0.0 a hardcoded gate confined
|
|
12
|
+
> `sn_create` and `sn_update` to the `incident` table no matter what a profile
|
|
13
|
+
> granted, and the README documented them that way. That gate is gone: those
|
|
14
|
+
> tools now write any table the profile grants. If you granted a wide write
|
|
15
|
+
> allowlist while relying on the documented incident-only behaviour to keep
|
|
16
|
+
> single-record writes narrow, that assumption no longer holds — **review the
|
|
17
|
+
> `writeTables` allowlist and `targets` on every profile before upgrading.**
|
|
18
|
+
> This ships as a minor because the grant was always the operator's, and the
|
|
19
|
+
> gate was a defect that stopped it taking effect; the effective write surface
|
|
20
|
+
> can still widen without any configuration change on your side.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **`sn_create` and `sn_update` are no longer restricted to `incident`.** They
|
|
25
|
+
write to any table the profile grants, so the configured `tableAccess` and
|
|
26
|
+
field policies are now the only thing deciding which tables are writable —
|
|
27
|
+
the same boundary `sn_batch` and `sn_delete` already answered to. Previously
|
|
28
|
+
a hardcoded gate rejected every other table regardless of configuration,
|
|
29
|
+
which both blocked granted work and left the restriction unenforced on
|
|
30
|
+
`sn_batch`. **A profile granting `writeTables: ["*"]` (or naming other
|
|
31
|
+
tables) now permits single-record writes to those tables through
|
|
32
|
+
`sn_create`/`sn_update`; narrow the grant if that is wider than intended.**
|
|
33
|
+
`incident` keeps its bounded typed value policy (approved ordinary fields,
|
|
34
|
+
required `short_description` on create, range-checked `impact`/`urgency`/
|
|
35
|
+
`priority`/`state`); other tables get generic value bounds — scalar values
|
|
36
|
+
only, no control characters, at most 100,000 characters. The `sn_create`
|
|
37
|
+
result's `table` is now the table written rather than the literal
|
|
38
|
+
`"incident"`.
|
|
39
|
+
- **Policy denials are classified separately in errors and audit records.** A
|
|
40
|
+
bounded-value rejection is reported as such and audited as
|
|
41
|
+
`write_value_denied`, instead of being reported as "Table access was denied
|
|
42
|
+
by policy" and audited as `table_access_denied`. The previous message named
|
|
43
|
+
`tableAccess.writeTables` — a key that could not affect the outcome — and
|
|
44
|
+
sent operators to re-issue grants that were already correct. Structured HTTP
|
|
45
|
+
tool events also accept every policy-rejection reason now; previously any
|
|
46
|
+
reason other than `table_access_denied` threw while the event was built.
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- A write denied by the bounded value policy was reported as
|
|
51
|
+
`ERROR: Table access was denied by policy.` — naming `tableAccess.writeTables`,
|
|
52
|
+
a per-profile key that was already correct and could not affect the outcome.
|
|
53
|
+
Operators re-issued grants against a restriction no configuration could lift.
|
|
54
|
+
Each failure reason now has its own message, and the four
|
|
55
|
+
reasons (`unsupported_table`, `missing_short_description`, `invalid_value`,
|
|
56
|
+
`invalid_mode`) are no longer flattened into one misleading string.
|
|
57
|
+
- The incident restriction was not a boundary: `sn_batch` reached the same
|
|
58
|
+
`PATCH /api/now/table/{table}/{sys_id}` endpoint for any table, on a bulk
|
|
59
|
+
surface, so the gate blocked the documented path while leaving the
|
|
60
|
+
undocumented one open. See **Changed** above for how this was resolved.
|
|
61
|
+
- Structured HTTP tool events accepted only `table_access_denied` for a policy
|
|
62
|
+
rejection. Any other reason — including the existing `field_access_denied` —
|
|
63
|
+
threw a `TypeError` while the event was being built.
|
|
64
|
+
- The 50,000-envelope validation gate asserted a single wall-clock reading
|
|
65
|
+
against a 1000ms ceiling, which measured CI runner load as much as this code
|
|
66
|
+
and failed at 1117ms while passing locally. It now takes the best of three
|
|
67
|
+
rounds against a ceiling set to catch an order-of-magnitude regression.
|
|
68
|
+
|
|
69
|
+
## [2.0.0] — 2026-09
|
|
70
|
+
|
|
71
|
+
2.0 is a local, single-owner stdio server. Your client spawns it and speaks
|
|
72
|
+
over that process's stdin and stdout; nothing listens on a port.
|
|
73
|
+
|
|
74
|
+
**The transport is unchanged from 1.0.0.** A client entry that launches the
|
|
75
|
+
package still launches it. If you configured against a 2.0 pre-release that
|
|
76
|
+
served Streamable HTTP, see [Migrating to 2.0](docs/V2-MIGRATION.md#1-transport-unchanged).
|
|
77
|
+
|
|
78
|
+
Upgrading from 1.0.0 requires two changes on every install: name a profile on
|
|
79
|
+
every tool call, and grant table access. Everything else applies only if you
|
|
80
|
+
used the affected surface.
|
|
81
|
+
|
|
82
|
+
### Breaking
|
|
83
|
+
|
|
84
|
+
- **Every tool call must name a `profile`.** There is no default, active, or
|
|
85
|
+
session-selected profile and no switch operation. Missing, empty, unknown or
|
|
86
|
+
invalid names fail before credential resolution or client construction.
|
|
87
|
+
Bare `SN_*` environment configuration now requires `SN_PROFILE_NAME` rather
|
|
88
|
+
than inferring a single implicit connection.
|
|
89
|
+
- **Table access is deny-by-default per profile.** A profile with no rules
|
|
90
|
+
denies every call. Grant with `servicenow-mcp-setup grant`. In 1.0.0 a tool
|
|
91
|
+
could reach any table the credential could.
|
|
92
|
+
- **`sn_attach` no longer accepts host filesystem paths.** `file_path` and
|
|
93
|
+
`output_path` are removed with no flag to restore them; uploads take
|
|
94
|
+
`content_base64` and downloads return inline base64. The server touches no
|
|
95
|
+
host filesystem, so behavior is identical whether run locally or in a
|
|
96
|
+
sandbox.
|
|
97
|
+
- **`sn_script` is withdrawn.** It was never functional — it returned "not yet
|
|
98
|
+
supported" while being advertised as destructive. It remains in the tree as
|
|
99
|
+
future work (SNS-39) and is not registered. `tools/list` returns 19 tools.
|
|
100
|
+
- **Incident journal fields moved to dedicated tools.** `sn_update`,
|
|
101
|
+
`sn_create` and `sn_batch` reject generic `comments` and `work_notes` writes
|
|
102
|
+
and point at `sn_incident_add_comment` / `sn_incident_add_work_note`, which
|
|
103
|
+
are append-only.
|
|
104
|
+
- **Raw encoded queries are opt-in per tool and table.** Structured filters are
|
|
105
|
+
the default path.
|
|
106
|
+
- **`MAX_FIELDS_PER_OPERATION` raised from `32` to `10_000`**, and
|
|
107
|
+
`excessive_field_selection` is removed from the exported
|
|
108
|
+
`FieldPolicyFailureReason` union.
|
|
109
|
+
- **One `bin` becomes three**: `servicenow-mcp`, `servicenow-mcp-profile`,
|
|
110
|
+
`servicenow-mcp-setup`.
|
|
111
|
+
|
|
112
|
+
### Added
|
|
113
|
+
|
|
114
|
+
- **Multi-instance profiles.** Named connections with credentials encrypted at
|
|
115
|
+
rest (AES-256-GCM) in an owner-only `~/.servicenow-mcp`, or referenced from
|
|
116
|
+
the environment.
|
|
117
|
+
- **OAuth 2.0 (`client_credentials` and `password`) and API-key
|
|
118
|
+
authentication**, alongside basic.
|
|
119
|
+
- **`servicenow-mcp-setup`.** Run bare on a terminal it walks through one
|
|
120
|
+
connection end to end: instance, credential, live verification against that
|
|
121
|
+
instance, table grants, profile write, and client registration. Nothing is
|
|
122
|
+
written to the profile until ServiceNow accepts the credential, and the
|
|
123
|
+
profile and its grants are written together so there is no window where a
|
|
124
|
+
profile exists that denies everything.
|
|
125
|
+
- **`servicenow-mcp-setup doctor`.** Diagnoses an install and prints a specific
|
|
126
|
+
remedy per failure — Node version, `servicenow-mcp` resolving on `PATH`, file
|
|
127
|
+
modes, profile completeness, credential resolution, table access.
|
|
128
|
+
- **`servicenow-mcp-setup grant`.** Writes least-privilege table rules onto a
|
|
129
|
+
profile, validated by the same loader the server uses at request time, so a
|
|
130
|
+
bad grant fails at the CLI rather than at the first tool call.
|
|
131
|
+
- **`sn_profile` tool** and the `servicenow-mcp.add-profile` prompt, adding the
|
|
132
|
+
`prompts` capability.
|
|
133
|
+
- **Metadata caching** for dictionary and schema reads, keyed by instance *and*
|
|
134
|
+
credential identity. Off by default for tables you do not name. Requires a
|
|
135
|
+
resolvable session timezone, so it is disabled for OAuth `client_credentials`
|
|
136
|
+
and API-key profiles, which carry no username.
|
|
137
|
+
- **Token-efficient responses** — compact JSON, bounded default field
|
|
138
|
+
selection, pagination metadata, `response_format`, and a
|
|
139
|
+
`max_response_bytes` truncation guard.
|
|
140
|
+
- **MCP tool annotations and display titles** on every tool.
|
|
141
|
+
- **Per-request failures surface as warnings** rather than being swallowed.
|
|
142
|
+
|
|
143
|
+
### Changed
|
|
144
|
+
|
|
145
|
+
- **`fields=all` and `response_format: "detailed"` are capped at 100 columns**
|
|
146
|
+
rather than dropping `sysparm_fields`, which could exceed the response budget
|
|
147
|
+
and fail the call outright. Columns resolve from `sys_dictionary` including
|
|
148
|
+
inherited fields; sensitive names are excluded from the request rather than
|
|
149
|
+
scrubbed from the response. `sn_query` and `sn_get` both report truncation.
|
|
150
|
+
- **Journal content is readable on request.** `comments` and `work_notes` are
|
|
151
|
+
returned by `fields=all`, `response_format: "detailed"`, an explicit
|
|
152
|
+
`fields=comments`, and `sn_schema`. The default projection still excludes
|
|
153
|
+
them. Journal content routinely contains customer PII, so asking for all
|
|
154
|
+
fields on `incident` now returns customer-visible commentary.
|
|
155
|
+
- **`sn_attach` has no transport size ceiling.** The former ~760 KiB practical
|
|
156
|
+
limit came from the HTTP body cap; the tool's own 10 MiB bound is the only
|
|
157
|
+
one in force.
|
|
158
|
+
- **HTTP authentication is opt-in and off by default**, for the dormant
|
|
159
|
+
transport only. An empty `MCP_BEARER_TOKEN` is a startup failure rather than
|
|
160
|
+
a way to disable it, so a half-applied env file stops the service instead of
|
|
161
|
+
silently opening the port. A non-loopback `MCP_HOST` with no token refuses to
|
|
162
|
+
start.
|
|
163
|
+
|
|
164
|
+
### Security
|
|
165
|
+
|
|
166
|
+
- **Field policy cannot be widened by configuration into a fail-open.** A
|
|
167
|
+
profile-scoped policy previously discarded the built-in table policies
|
|
168
|
+
wholesale, permitting writes to `sys_script` — arbitrary server-side
|
|
169
|
+
JavaScript executed as the integration account. Configuration now layers onto
|
|
170
|
+
the built-ins and an unspecified `writable` denies rather than permits.
|
|
171
|
+
- **`tableAccess` is the sole table-level authority.** The hard-deny list is
|
|
172
|
+
removed; a profile's grants plus ServiceNow's per-user ACLs decide access.
|
|
173
|
+
Deliberate, and documented in [PRODUCTION-SECURITY.md](docs/PRODUCTION-SECURITY.md).
|
|
174
|
+
- **Sensitive field names are refused for read, write, schema enumeration and
|
|
175
|
+
query filtering.** Filtering was previously reachable under a wildcard
|
|
176
|
+
readable set, which leaks a value one comparison at a time through row counts.
|
|
177
|
+
- **Metadata cache is keyed by credential identity**, so two profiles against
|
|
178
|
+
one instance no longer share cached rows and bypass per-user ACLs.
|
|
179
|
+
- **Setup never echoes a typed secret**, and never places one in argv, shell
|
|
180
|
+
history or a client configuration file.
|
|
181
|
+
- **`--force` no longer regenerates `SN_PROFILE_ENCRYPTION_KEY`**, which
|
|
182
|
+
silently made every stored credential undecryptable. Rotation is a separate,
|
|
183
|
+
explicit flag, refused while a profile file exists.
|
|
184
|
+
- **File modes are repaired on every write**, not only at creation, so a
|
|
185
|
+
pre-existing world-readable env file cannot receive fresh secrets.
|
|
186
|
+
- **`http://` endpoints are restricted to loopback** unless explicitly allowed.
|
|
187
|
+
|
|
188
|
+
### Fixed
|
|
189
|
+
|
|
190
|
+
- `sn_aggregate` dropped ungrouped `COUNT` results from the Stats API.
|
|
191
|
+
- `sn_syslog` level names did not map to numeric values, and query values were
|
|
192
|
+
not escaped.
|
|
193
|
+
- The metadata cache freshness probe compared `sys_updated_on` in UTC while
|
|
194
|
+
ServiceNow evaluates it in the session user's timezone, so on a non-UTC
|
|
195
|
+
account an updated record could appear unchanged for a full TTL. The zone
|
|
196
|
+
name is now resolved and cached, and the offset computed per instant so DST
|
|
197
|
+
transitions are correct.
|
|
198
|
+
- Inline base64 was decoded before its size was checked, and invalid base64
|
|
199
|
+
raised an internal error rather than a correctable one. Line-wrapped base64
|
|
200
|
+
— what `base64 file.pdf` produces — was rejected.
|
|
201
|
+
- `file_name` accepted Unicode bidirectional overrides, so
|
|
202
|
+
`invoicegnp.exe` rendered as `invoiceexe.gnp`.
|
|
203
|
+
- Field-policy denials were reported and audited as table denials, on tables
|
|
204
|
+
the operator had just granted, with the fix in a configuration key the
|
|
205
|
+
message never named.
|
|
206
|
+
- The compiled `bin` entrypoints were not executable, so a globally linked
|
|
207
|
+
install failed with "permission denied" after any rebuild.
|
|
208
|
+
- HTTP rate-limit rejections returned an empty body, which benchmarks could not
|
|
209
|
+
distinguish from a fast success.
|
|
210
|
+
|
|
211
|
+
## [1.0.0] — 2026-07
|
|
212
|
+
|
|
213
|
+
Initial public release. 17 tools over stdio, single instance configured from
|
|
214
|
+
`SN_*` environment variables.
|