Labsco
MCP SERVER

Servicenow Devtools MCP

by Xerrion

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

ERP & Vertical Business Systems
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
  • `build_query`, a stateless helper that compiles a JSON array of condition objects into an encoded query string, so an agent can express filters as structured JSON instead of learning the encoded-query mini-language; it touches no ServiceNow API and is available in the `full` package only
  • 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` with local script files and per-field targeting via `script_field`. 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
  • A tool surface you choose with `MCP_TOOL_PACKAGE`: `full` (15 tools, including `audit`, `flow`, `code_search` and `build_query`), `readonly` (11), `core_readonly` (5), or `none` (1 — just `list_tool_packages`). Custom packages take a comma-separated list such as `MCP_TOOL_PACKAGE="query,describe,attachment"`
Requirements

A ServiceNow instance and a username and password with the rights you intend to use. Three required environment variables: `SERVICENOW_INSTANCE_URL` (must start with `https://`), `SERVICENOW_USERNAME` and `SERVICENOW_PASSWORD`. Run it with `uvx servicenow-platform-mcp`; the PyPI package is `servicenow-platform-mcp`. 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`), `LARGE_TABLE_NAMES_CSV` lists tables that require a date filter, and `SCRIPT_ALLOWED_ROOT` is required before `script_path` can be used in an artifact write. `.env` and `.env.local` are read automatically. MIT licensed.

Setup effort

One command plus a key — uvx servicenow-platform-mcp, then supply credentials