ServiceNow PDI MCP Server
Click on "Deploy 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 PDI MCP Server test the connection to my ServiceNow instance"
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 PDI MCP Server
A TypeScript MCP stdio server that connects to a ServiceNow Personal Developer Instance with OAuth 2.0 and PKCE.
Setup
Install Node.js 20 or newer.
Copy
.env.exampleto.envand set the PDI URL, public OAuth client ID, redirect URI, and scope.Ensure the ServiceNow OAuth application has this exact redirect URI:
http://127.0.0.1:33418.Run the one-time browser authorization flow:
npm run authSign in to ServiceNow and approve the useraccount scope. The command exchanges the authorization code with PKCE and saves the refresh token to .env.
5. Install dependencies and compile:
npm install
npm run buildRelated MCP server: ServiceNow MCP Server
MCP tool
servicenow_test_connection calls the ServiceNow Table API for sys_properties and returns up to 10 sample records. Its optional limit argument defaults to 1.
The server requests tokens from /oauth_token.do using the saved refresh token. Public clients do not require a client secret.
CRUD tools
Generic Table API tools work with any ServiceNow table:
servicenow_list_recordswithtable, optional encodedquery,fields, andlimitservicenow_get_recordwithtableandsysIdservicenow_create_recordwithtableand afieldsobjectservicenow_update_recordwithtable,sysId, and afieldsobjectservicenow_delete_recordwithtableandsysId
Table names are restricted to letters, numbers, and underscores. ServiceNow ACLs still control which tables and fields the OAuth user can access.
Flow tools operate on the sys_hub_flow table and use sys_id:
servicenow_create_flowwith afieldsobjectservicenow_get_flowwithsysIdservicenow_update_flowwithsysIdand afieldsobjectservicenow_delete_flowwithsysId
These operations use the ServiceNow Table API and require the OAuth user to have the corresponding table and field permissions.
Run the server directly with:
npm run devThe VS Code MCP configuration is in .vscode/mcp.json. Open the MCP view, start servicenow-pdi, and invoke servicenow_test_connection after the environment variables are available to VS Code.
Security
Do not commit .env or place credentials in mcp.json. The .gitignore file excludes .env and build output.
References
Available Tools
10 toolsservicenow_create_flowC
Create a ServiceNow Flow record in sys_hub_flow.
Inputs: fields (required).
servicenow_create_recordC
Create a record in any ServiceNow table.
Inputs: table (required), fields (required).
servicenow_delete_flowB
Delete one ServiceNow Flow record by sys_id.
Inputs: sysId (required).
servicenow_delete_recordB
Delete one record from any ServiceNow table by sys_id.
Inputs: sysId (required), table (required).
servicenow_get_flowC
Retrieve one ServiceNow Flow record by sys_id.
Inputs: sysId (required).
servicenow_get_recordA
Retrieve one record from any ServiceNow table by sys_id.
Inputs: sysId (required), table (required), fields.
servicenow_list_recordsC
List records from any ServiceNow table using an optional encoded query and field list.
Inputs: table (required), limit, query, fields, +1 more.
servicenow_test_connectionA
Verify OAuth access to a ServiceNow PDI and return a small sample from sys_properties.
Inputs: limit.
servicenow_update_flowC
Update one ServiceNow Flow record by sys_id.
Inputs: sysId (required), fields (required).
servicenow_update_recordC
Update a record in any ServiceNow table by sys_id.
Inputs: sysId (required), table (required), fields (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct resource and action: record operations are for any table, flow operations are specifically for sys_hub_flow, and test_connection is a diagnostic. The boundaries between tools are clear and unlikely to be confused.
All tool names follow a consistent verb_noun pattern with a 'servicenow_' prefix, e.g., servicenow_list_records, servicenow_create_flow. This predictable structure makes the set easy to navigate.
Ten tools provide comprehensive coverage for generic record operations and specialized flow operations without unnecessary bloat. The count is well-scoped for a ServiceNow integration.
The server offers complete CRUD for records and flows, plus connection testing, covering core lifecycle operations. However, it lacks bulk operations, attachment handling, or advanced query features that might be needed for full ServiceNow automation.
Related MCP Connectors
Manage tickets, run agents and workflows, query tables, and search workspace knowledge.
Create, edit, save and export native flowcharts through OAuth with your FlowchartAI account.
Notes, kanban tasks, and a capture inbox: read and create Flow data with a personal token.
Manage Static Forms (staticforms.dev) form endpoints, form rules and submissions over OAuth.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables authenticated interaction with ServiceNow via its REST API using per-user OAuth 2.0 tokens. It provides tools for managing incidents, tasks, knowledge articles, and service catalog requests while maintaining user-specific permissions.4-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with ServiceNow instances for data retrieval, record management, and workflow execution via the ServiceNow API.MIT
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants to a ServiceNow instance, providing tools for Table API CRUD, incident lifecycle, CMDB queries, knowledge search, and user lookup.MIT
- AlicenseNot gradedqualityCmaintenanceEnables MCP-capable AI agents to safely read and write ServiceNow records via the Table API, including querying, creating, updating records, running server-side scripts, and triggering CI/CD tests and scans.MIT