list_tool_packagesLABSCO SUMMARY
Preview-then-apply, and a production switch that means it.
Two things here are unusual and worth the setup. Script fields are found at runtime from sys_dictionary, so writing a Business Rule or a Widget does not depend on someone maintaining an artifact catalogue. And the safety layer is real rather than advisory: sensitive system tables are denied, secrets are masked in responses, and labelling the instance production turns every write off. The author is careful to say these reduce risk rather than guarantee it — validate in a sub-production instance first.
What it is
An MCP server for the ServiceNow platform covering introspection, record management, script-bearing artifacts, attachments and automated investigations. Its distinguishing feature is the write path: every mutation goes through a mandatory preview-then-apply pattern, and all mutations are refused outright when the instance is labelled production.
What you get
- Table introspection and search —
describefor a table's schema andqueryfor records using ServiceNow encoded query strings, with field selection, label resolution, display values, pagination and sorting - Record changes through
record_writeandrecord_apply, withrecord_readto read the same surface back - Script-bearing records — Business Rules, Script Includes, UI Pages, Widgets, UI Macros, ACLs and any other table whose dictionary fields carry executable script — written through
record_write, previewed, then applied withrecord_apply. Script fields are discovered at runtime fromsys_dictionaryrather than a hardcoded list, anddescribe(action='list_script_fields', table='<table>')enumerates them - Attachments split read from write:
attachmentfor reads,attachment_writefor mutations investigatefor automated analysis of system health, stale automations and performance bottlenecks;resolve_choiceto map human-readable choice labels onto their underlying values;service_catalogfor browsing and orderingflowto inspect flows,code_searchto search ServiceNow code andcmdbfor the CMDB, alongsideauditandanalysis; all five are in thereadonlypackage- A tool surface you choose with
MCP_TOOL_PACKAGE:full(every tool, and the default),readonly(12),core_readonly(4 —query,describe, read-onlyattachmentandlist_tool_packages) ornone(1 — justlist_tool_packages). Of the presets, onlyfullloads the record and attachment write tools. Custom packages take a comma-separated list of tool groups, such asMCP_TOOL_PACKAGE=query,describe,record_read,attachment. The project's own setup examples start withreadonly - The Claude Code, VS Code and OpenCode setups in the Installation tab set
MCP_TOOL_PACKAGE=readonly, so they load those 12 read-only tools. To write records, change that value tofull
Requirements
- A ServiceNow instance, Python 3.12 or later, and
uv. - In ServiceNow, register a sign-in app for the server: a public OAuth application using authorization code with PKCE (
S256) and the redirect URLhttp://127.0.0.1:8765/oauth/callback, then copy its client ID. - Two required environment variables:
SERVICENOW_INSTANCE_URL(must start withhttps://) andSERVICENOW_OAUTH_CLIENT_ID. - Leave
SERVICENOW_USERNAME,SERVICENOW_PASSWORDandSERVICENOW_API_KEYunset: since version 2.0 the server refuses to start if any of them is set. - Run it with
uvx servicenow-platform-mcp. - The first request opens your browser to approve access, so run the browser and the server on the same machine; you sign in again each time the server restarts.
- Optional settings shape the guardrails:
SERVICENOW_ENVlabels the instance and blocks every mutation when set toprodorproduction,MAX_ROW_LIMITcaps rows per query (1–10000, default100), andLARGE_TABLE_NAMES_CSVlists tables that require a date filter. .envand.env.localare read automatically.- MIT licensed.
Setup effort
One command, then sign in — register a sign-in app in ServiceNow, add uvx servicenow-platform-mcp to your AI app, then approve access in your browser
USE CASES
Pulling a filtered set of records
Pass the filter as an encoded query, with just the fields you want, a row limit and display values.
Finding out what a table actually holds
Describe the table's schema, then list which of its fields carry executable script before touching anything.
Editing a Business Rule or Widget
Find which field holds the script, write the new script as a preview, apply it, and read the record back to confirm.
Giving an agent read access and nothing else
Set the tool package to a read-only preset so the write tools are never exposed to it in the first place.
Chasing down a slow or stale instance
Run the automated investigation for system health, stale automations and performance bottlenecks rather than hand-querying the log tables.
16 tools
Listed in project code.
querydescriberecord_writerecord_applyrecord_readattachmentattachment_writeinvestigateresolve_choiceservice_cataloganalysisauditflowcode_searchcmdbBEFORE YOU INSTALL
What to know first
Tools you get
16 tools registered in the project's code.
Requires
- uvx on PATH
- SERVICENOW_INSTANCE_URL in your environment
- SERVICENOW_OAUTH_CLIENT_ID in your environment
INSTALLATION
Connect your client
Server setup
uvx servicenow-platform-mcpMCP Clients
Claude Code
claude mcp add \
--scope user \
--transport stdio \
servicenow-platform \
--env SERVICENOW_INSTANCE_URL=https://your-instance.service-now.com \
--env SERVICENOW_OAUTH_CLIENT_ID=your-public-client-id \
--env MCP_TOOL_PACKAGE=readonly \
--env SERVICENOW_ENV=dev \
-- uvx servicenow-platform-mcpVS Code
{
"servers": {
"servicenow-platform": {
"type": "stdio",
"command": "uvx",
"args": [
"servicenow-platform-mcp"
],
"env": {
"SERVICENOW_INSTANCE_URL": "https://your-instance.service-now.com",
"SERVICENOW_OAUTH_CLIENT_ID": "your-public-client-id",
"MCP_TOOL_PACKAGE": "readonly",
"SERVICENOW_ENV": "dev"
}
}
}
}OpenCode
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servicenow-platform": {
"type": "local",
"command": [
"uvx",
"servicenow-platform-mcp"
],
"environment": {
"SERVICENOW_INSTANCE_URL": "https://your-instance.service-now.com",
"SERVICENOW_OAUTH_CLIENT_ID": "your-public-client-id",
"MCP_TOOL_PACKAGE": "readonly",
"SERVICENOW_ENV": "dev"
}
}
}
}