LabscoMCP early access ↗
XerrionMCP SERVER

ServiceNow Platform MCP

Query, describe and safely change ServiceNow records from an assistant, with writes previewed first and blocked in production.

by Xerrion ↗ERP & Vertical Business SystemsCommunity

LABSCO 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 — describe for a table's schema and query for records using ServiceNow encoded query strings, with field selection, label resolution, display values, pagination and sorting
  • Record changes through record_write and record_apply, with record_read to 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 with record_apply. Script fields are discovered at runtime from sys_dictionary rather than a hardcoded list, and describe(action='list_script_fields', table='<table>') enumerates them
  • Attachments split read from write: attachment for reads, attachment_write for mutations
  • investigate for automated analysis of system health, stale automations and performance bottlenecks; resolve_choice to map human-readable choice labels onto their underlying values; service_catalog for browsing and ordering
  • flow to inspect flows, code_search to search ServiceNow code and cmdb for the CMDB, alongside audit and analysis; all five are in the readonly package
  • A tool surface you choose with MCP_TOOL_PACKAGE: full (every tool, and the default), readonly (12), core_readonly (4 — query, describe, read-only attachment and list_tool_packages) or none (1 — just list_tool_packages). Of the presets, only full loads the record and attachment write tools. Custom packages take a comma-separated list of tool groups, such as MCP_TOOL_PACKAGE=query,describe,record_read,attachment. The project's own setup examples start with readonly
  • 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 to full

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 URL http://127.0.0.1:8765/oauth/callback, then copy its client ID.
  • Two required environment variables: SERVICENOW_INSTANCE_URL (must start with https://) and SERVICENOW_OAUTH_CLIENT_ID.
  • Leave SERVICENOW_USERNAME, SERVICENOW_PASSWORD and SERVICENOW_API_KEY unset: 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_ENV labels the instance and blocks every mutation when set to prod or production, MAX_ROW_LIMIT caps rows per query (1–10000, default 100), and LARGE_TABLE_NAMES_CSV lists tables that require a date filter.
  • .env and .env.local are 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