ServiceNow Incident 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 Incident MCP Server search incidents about VPN"
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 Incident MCP Server
A production-ready Model Context Protocol (MCP) server that turns any MCP-compatible AI assistant (Claude, Cursor, etc.) into an AI-powered ServiceNow Incident Management Assistant. It exposes ServiceNow incidents, users, CMDB records, and knowledge articles through clean, validated MCP tools.
AI Assistant ──► MCP Server (Node.js + TypeScript) ──► ServiceNow REST API ──► ServiceNow InstanceFeatures
12 MCP tools across three phases (read, actions, AI-powered helpers).
Reusable ServiceNow REST client (Axios) with Basic auth, request timeout, and exponential-backoff retry on transient failures.
Zod-validated inputs for every tool.
Structured logging to stderr with automatic secret redaction — passwords and auth headers are never logged.
Self-contained, deterministic AI tools — no external LLM or API key required.
Modular, enterprise-grade architecture with a full unit-test suite (Vitest).
Related MCP server: snow-mcp
Project Structure
src/
├── clients/
│ └── servicenowClient.ts # Axios wrapper: GET/POST/PATCH, auth, retry, timeout, Table API helpers
├── config/
│ └── env.ts # Zod-validated environment configuration
├── schemas/
│ └── index.ts # Zod input schemas for every tool
├── services/
│ ├── incidentService.ts # incident reads/writes + journal (comments/work notes)
│ ├── userService.ts # sys_user lookups
│ ├── cmdbService.ts # cmdb_ci search
│ ├── knowledgeService.ts # kb_knowledge search
│ ├── aiService.ts # rule-based classification, routing, summaries
│ └── index.ts # service container
├── tools/
│ ├── phase1.read.ts # get_incident, search_incidents, get_user, search_cmdb, get_knowledge_article
│ ├── phase2.actions.ts # create_incident, update_incident, assign_incident, close_incident
│ ├── phase3.ai.ts # classify_incident, incident_summary, suggest_assignment_group
│ ├── helpers.ts # response builders + central error handling
│ └── index.ts # registers all tools
├── types/
│ └── servicenow.ts # shared TypeScript interfaces
├── utils/
│ ├── logger.ts # structured logger + redaction
│ ├── errors.ts # ServiceNowError + safe message mapping
│ └── format.ts # raw ServiceNow record → clean object mappers
├── server.ts # builds the MCP server (config → client → services → tools)
└── index.ts # entrypoint (stdio transport)
tests/ # Vitest unit testsSetup
Prerequisites
Node.js 18+
A ServiceNow instance and an account with Table API access.
Install & build
npm install
cp .env.example .env # then edit .env with your instance + credentials
npm run buildConfigure environment
Variable | Required | Default | Description |
| yes | — | Instance base URL, e.g. |
| yes | — | Basic auth username |
| yes | — | Basic auth password |
| no |
| Per-request timeout (ms) |
| no |
| Retry attempts on network/429/5xx errors |
| no |
| Default result count for search tools |
| no |
|
|
Run
npm start # run the built server (dist/index.js)
npm run dev # run from TypeScript with hot reloadThe server speaks MCP over stdio.
Tool Reference
Phase 1 — Read
Tool | Input | Returns |
|
| Number, state, priority, assignment group, assignee, descriptions, timestamps |
|
| Matching incidents (newest first) |
|
| User name, email, phone, title, department |
|
| Matching CMDB CIs |
|
| Matching published KB articles |
Phase 2 — Actions
Tool | Input | Effect |
|
| Creates an incident → |
|
| Appends work note / comment |
|
| Updates assignment |
|
| Resolves & closes the incident |
Phase 3 — AI-powered (deterministic, rule-based)
Tool | Input | Returns |
|
|
|
|
| Executive summary built from the incident + journal |
|
|
|
Classification Logic
classify_incident mirrors ServiceNow's Impact × Urgency → Priority matrix. It infers
impact from the scope of the issue and urgency from time-critical language, both via
documented keyword rules (case-insensitive, first match wins).
Scope detected in the issue text | Impact | Urgency | Priority |
Entire office / company / site / everyone | 1 | 1 | P1 |
Entire team / department / group / floor | 2 | 2 | P2 |
Single employee / one user / "my…" | 3 | 2 | P3 |
Minor / cosmetic / typo / question / slow | 3 | 3 | P4 |
Unrecognized (default) | 3 | 3 | P3 |
Time-critical words (urgent, critical, outage, down, blocked, cannot work,
production, emergency, …) escalate urgency → 1, and priority is recomputed from the matrix:
Impact \ Urgency 1 2 3
1 P1 P2 P3
2 P2 P3 P4
3 P3 P4 P4suggest_assignment_group uses a keyword→group routing table (VPN/network → Network
Operations, email/Outlook → Messaging & Collaboration, password/login → Identity & Access
Management, database/SQL → Database Team, laptop/printer → Desktop Support, phone/call
forwarding → Telephony, application/crash → Application Support), defaulting to Service Desk.
These rules live in
src/services/aiService.tsand are easy to tune for your org's groups.
Sample MCP Client Configuration
Add the server to your MCP client config. Use absolute paths and supply credentials via env.
Claude Desktop (claude_desktop_config.json) / Cursor (.cursor/mcp.json):
{
"mcpServers": {
"servicenow": {
"command": "node",
"args": ["/absolute/path/to/servicenow-mcp/dist/index.js"],
"env": {
"SNOW_INSTANCE": "https://dev12345.service-now.com",
"SNOW_USERNAME": "admin",
"SNOW_PASSWORD": "your-password",
"LOG_LEVEL": "info"
}
}
}
}Run npm run build first so dist/index.js exists.
Testing & Quality
npm test # run the unit test suite (Vitest)
npm run test:coverage
npm run typecheck # tsc --noEmit
npm run lint # eslintTests are fully offline — the ServiceNow client is mocked, and the AI tools are deterministic.
Manual smoke test with MCP Inspector
npm run build
npx @modelcontextprotocol/inspector node dist/index.jsThen list tools and try classify_incident / suggest_assignment_group (work offline) or a
read tool against your instance.
Security
Credentials are read only from environment variables;
.envis git-ignored.The logger redacts any
password/authorization/token/secretfield, and logs go to stderr only (keeping the MCP stdout channel clean).All HTTP requests use a configurable timeout and retry transient failures with exponential backoff; 4xx errors (other than 429) fail fast with safe messages.
License
MIT
Available Tools
12 toolsassign_incidentAssign IncidentA
Set the assignment group and/or assignee on an incident. Provide at least one of assignmentGroup or assignedTo.
Inputs: incidentNumber (required), assignmentGroup, assignedTo.
classify_incidentClassify IncidentA
Analyze a free-text issue and determine its impact, urgency and priority (P1–P4) using a documented scope-based rule engine. Returns {impact, urgency, priority, reason}.
Inputs: issue (required).
close_incidentClose IncidentA
Resolve and close an incident with the given close notes (and optional close code). Sets state to Closed.
Inputs: incidentNumber (required), closeNotes (required), closeCode.
create_incidentCreate IncidentA
Create a new ServiceNow incident. Requires shortDescription; description, caller, assignment group, impact and urgency are optional. Returns the new incident number and sysId.
Inputs: shortDescription (required), description, callerId, assignmentGroup, +2 more.
get_incidentGet IncidentA
Retrieve a single ServiceNow incident by its number (e.g. INC0012345). Returns number, state, priority, assignment group, assignee, descriptions and timestamps.
Inputs: incidentNumber (required).
get_knowledge_articleGet Knowledge ArticleA
Search published knowledge base articles by keyword (matches title and body). Returns the article number, title, category and a plain-text excerpt.
Inputs: keyword (required), limit.
get_userGet UserA
Look up a ServiceNow user by user_name. Returns name, email, phone, title, etc.
Inputs: userName (required).
incident_summaryIncident SummaryA
Retrieve an incident plus its comments and work notes, then generate a concise executive summary of the current status.
Inputs: incidentNumber (required).
search_cmdbSearch CMDBB
Search the CMDB (cmdb_ci) for configuration items whose name contains the given text. Returns name, class, category, status, IP and serial number.
Inputs: name (required), limit.
search_incidentsSearch IncidentsA
Search incidents by assignee (assignedTo), caller, priority, and/or state. All filters are optional and combined with AND. Results are newest-updated first.
Inputs: assignedTo, caller, priority, state, +1 more.
suggest_assignment_groupSuggest Assignment GroupA
Suggest the most likely assignment group for a free-text issue using a documented keyword-routing rule engine. Returns {assignmentGroup, reason}.
Inputs: issue (required).
update_incidentUpdate IncidentA
Append a work note (internal) and/or a customer-visible comment to an incident. Provide at least one of workNote or comment.
Inputs: incidentNumber (required), workNote, comment.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct operation or resource: incident lifecycle (create, get, update, assign, close, search), classification, assignment group suggestion, user lookup, knowledge articles, and CMDB search. No two tools have overlapping purposes, ensuring clear distinction.
Most tools follow a consistent verb_noun pattern (e.g., assign_incident, create_incident). However, 'incident_summary' deviates by using a noun-based name, and 'search_cmdb' uses an acronym. Overall, the pattern is largely consistent with minor exceptions.
With 12 tools, the server covers the essential operations for ServiceNow incident management without being excessive. Each tool serves a clear purpose, and the count is well-scoped for the domain.
The toolset covers core incident lifecycle (create, get, assign, close, search, update notes) and additional features like classification and CMDB search. However, it lacks direct field updates (e.g., priority, state) and free-text search of incidents, which are notable gaps for full incident management.
Maintenance
Related MCP Connectors
AI-powered incident management and server monitoring via MCP.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants and development tools to interact with ServiceNow instances, providing comprehensive API coverage for incident management, change management, CMDB, and other ServiceNow modules.3MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server for ServiceNow that provides over 60 pre-built tools for ITSM, ITOM, and App Dev operations, enabling AI agents to manage incidents, changes, users, service catalog, and projects through a unified interface.6MIT
- AlicenseAqualityBmaintenanceAn MCP server that enables AI assistants to interact with ServiceNow instances, allowing script execution, data querying, ATF tests, and log tailing through natural language commands.13564 npm16MIT
- FlicenseNot gradedqualityDmaintenanceMCP server that enables LLMs to interact with ServiceNow instances for managing incidents, users, stories, workflows, knowledge base articles, and script includes via the FastMCP framework.-