servicenow-platform-mcp
This MCP server provides a comprehensive interface for ServiceNow, enabling platform introspection, record management, automated investigations, and service catalog operations.
Platform Introspection & Data Querying
Query records, aggregates, or single records from any table using encoded queries, field filters, pagination, ordering, and aggregations (count, avg, sum, min, max).
Describe table schemas, retrieve field metadata, and identify script-bearing fields.
Build complex encoded query strings from structured JSON conditions (comparison, string, null, time, date, range, field comparison, reference, change detection, and logical operators).
Resolve human-readable choice labels (e.g., "high" priority) to their underlying system values.
Record Management
Create, update, or delete records with a mandatory preview-then-apply safety pattern (preview generates a token; a separate apply step commits the change).
Read records by
sys_idor name, with sensitive field masking and dynamic script field discovery.Write script content from local files into script-bearing fields.
Attachment Operations
List, get, download (by name or directly), upload (base64-encoded), or delete attachments on any record.
Automated Investigations
Run pre-defined investigations covering: stale automations, deprecated APIs, table health, ACL conflicts, error analysis, slow transactions, and performance bottlenecks.
Service Catalog
Browse catalogs, categories, and items; view item variables; order items directly or manage a cart.
Audit & Change Intelligence
Inspect audit configuration for tables and fields.
Retrieve audit trail history for specific records (default 90-day window).
Flow Designer
Inspect Flow Designer flows, triggers, and decode gzip/base64 value blobs (read-only).
Safety Features
Write operations are blocked in production (
SERVICENOW_ENV=prod).Sensitive fields (passwords, tokens, secrets) are automatically masked.
Access to sensitive system tables is blocked via a deny list.
Row limits and mandatory date filters are enforced on high-volume tables.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@servicenow-platform-mcpshow me all open incidents with high priority"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
servicenow-platform-mcp
A comprehensive Model Context Protocol (MCP) server for ServiceNow. Provides 12 unified tools for platform introspection, change intelligence, debugging, record management, and automated investigations.
Quick Start
1. Set environment variables:
export SERVICENOW_INSTANCE_URL=https://your-instance.service-now.com
export SERVICENOW_USERNAME=admin
export SERVICENOW_PASSWORD=your-password2. Run the server:
uvx servicenow-platform-mcp3. Connect your MCP client (see Configuration below).
Related MCP server: snow-mcp
Configuration
OpenCode
Add to ~/.config/opencode/opencode.json:
{
"mcp": {
"servicenow": {
"type": "local",
"command": ["uvx", "servicenow-platform-mcp"],
"environment": {
"SERVICENOW_INSTANCE_URL": "https://your-instance.service-now.com",
"SERVICENOW_USERNAME": "admin",
"SERVICENOW_PASSWORD": "your-password"
}
}
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"servicenow": {
"command": "uvx",
"args": ["servicenow-platform-mcp"],
"env": {
"SERVICENOW_INSTANCE_URL": "https://your-instance.service-now.com",
"SERVICENOW_USERNAME": "admin",
"SERVICENOW_PASSWORD": "your-password"
}
}
}
}VS Code / Cursor
Add to .vscode/mcp.json:
{
"servers": {
"servicenow": {
"command": "uvx",
"args": ["servicenow-platform-mcp"],
"env": {
"SERVICENOW_INSTANCE_URL": "https://your-instance.service-now.com",
"SERVICENOW_USERNAME": "admin",
"SERVICENOW_PASSWORD": "your-password"
}
}
}
}Generic stdio
SERVICENOW_INSTANCE_URL=https://your-instance.service-now.com \
SERVICENOW_USERNAME=admin \
SERVICENOW_PASSWORD=your-password \
uvx servicenow-platform-mcpEnvironment Variables
Variable | Description | Default | Required |
| Full URL (must start with | - | Yes |
| ServiceNow username | - | Yes |
| ServiceNow password | - | Yes |
| Tool package to load ( |
| No |
| Environment label ( |
| No |
| Max rows per query (1-10000) |
| No |
| Tables requiring date filters |
| No |
| Root dir for |
| When using |
| Sentry DSN for error reporting |
| No |
| Sentry environment label | Falls back to | No |
The server reads from .env and .env.local files automatically.
AI Agent Setup
Copy and paste this prompt to your AI agent (Claude Code, Cursor, OpenCode, etc.):
Install and configure servicenow-platform-mcp by following the instructions here:
https://raw.githubusercontent.com/Xerrion/servicenow-platform-mcp/refs/heads/main/INSTALL.mdOr read the Installation Guide directly. For usage examples and patterns, see Agent Recipes.
Key Features
Platform Introspection - Describe table schemas with
describeand query records withqueryusing encoded queries.Record Management - Unified
record_writeandrecord_applytools for create, update, and delete with a mandatory preview-then-apply safety pattern.Script-Bearing Records - Write Business Rules, Script Includes, UI Pages, Widgets, UI Macros, ACLs, and any other table whose dictionary fields carry executable script or markup, all via
record_writewith local script file support and per-field targeting (script_field). Script fields are discovered at runtime fromsys_dictionary— no hardcoded artifact catalog. Read the same surface back viarecord_read, or enumerate a table's script fields withdescribe(action='list_script_fields', table='<table>').Attachment Operations - Unified
attachmentfor read operations andattachment_writefor mutations.Investigations - Automated analysis of system health, stale automations, performance bottlenecks, and more via
investigate.Label Resolution - Map human-readable choice labels to underlying values automatically with
resolve_choice.Service Catalog - Dispatcher-based
service_catalogtool for browsing and ordering.
Example Usage
Describe a Table
await describe(table="incident")Query Records
# Fetch high priority incidents using an encoded query
await query(
table="incident",
encoded_query="active=true^priority=1",
fields="number,short_description,priority"
)Tool Packages
Control which tools are loaded with MCP_TOOL_PACKAGE.
Package | Tools | Description |
| 15 | All unified tools, including |
| 11 | Includes |
| 5 | Minimal read surface (includes |
| 1 | Just |
Custom packages are supported via comma-separated tool names: MCP_TOOL_PACKAGE="query,describe,attachment".
Safety
Table Deny List - Blocks access to sensitive system tables (
sys_user_has_password,sys_credentials, etc.).Sensitive Field Masking - Passwords, tokens, and secrets are automatically masked in responses.
Write Gating - All mutations are blocked when
SERVICENOW_ENVis set toprodorproduction.Query Safety - Enforces row limits and mandatory date filters on high-volume system tables.
These guardrails reduce risk but are not a guarantee - always validate in a sub-production environment.
See the Safety & Policy wiki page for complete details.
Development
git clone https://github.com/Xerrion/servicenow-platform-mcp.git
cd servicenow-platform-mcp
uv sync --group dev
uv run pytest # Run tests
uv run ruff check . # Lint
uv run ruff format . # Format
uv run mypy src/ # Type checkLicense
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Xerrion/servicenow-platform-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server