servicenow-mcp-ai — Claude Code MCP server: setup & review
Connects AI assistants to ServiceNow REST APIs for table manipulation, CMDB records, script dependency checks, and environment drift detection.
claude mcp add --env SN_INSTANCE=<SN_INSTANCE> --env SN_USER=<SN_USER> --env SN_PASSWORD=<SN_PASSWORD> --env SN_AUTH=<SN_AUTH> --env SN_API_KEY=<SN_API_KEY> --transport stdio servicenow-mcp-ai -- npx -y servicenow-mcp-aiWhat servicenow-mcp-ai does
The server exposes instance endpoints via the Model Context Protocol using Node.js execution. It bridges assistant tools to the ServiceNow Table, Aggregate, Batch, Attachment, and Import Set interfaces. Support also covers CMDB configuration items, Change Management operations, and Service Catalog entries.
Built-in script intelligence tools scan instance logic. servicenow_where_used inspects business rules, client scripts, UI policies, and form definitions to trace field references. When debugging automation, servicenow_trace_table_event simulates trigger order across business rules and flows without executing mutations on target tables.
Destructive database writes require safety confirmation: the server generates a plan review unless passed apply: true. Instance connectivity depends on your instance URL and access tokens configured in client environment variables.
What it helps with
- Inspect field dependencies across business rules and form layouts
- Trace trigger sequences before updating incident table records
- Detect schema and script drift between dev and production instances
- Query and patch ServiceNow records using Table and Batch APIs
Example prompts for the agent
- Locate every script and UI policy referencing the
u_cost_centerfield. - Run
servicenow_trace_table_eventfor record updates on theincidenttable. - Search for occurrences of
GlideRecordinside business rules usingservicenow_search_code.
How to install servicenow-mcp-ai
Platform CLI
claude mcp add --env SN_INSTANCE=<SN_INSTANCE> --env SN_USER=<SN_USER> --env SN_PASSWORD=<SN_PASSWORD> --env SN_AUTH=<SN_AUTH> --env SN_API_KEY=<SN_API_KEY> --transport stdio servicenow-mcp-ai -- npx -y servicenow-mcp-aiReplace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
codex mcp add servicenow-mcp-ai --env SN_INSTANCE=<SN_INSTANCE> --env SN_USER=<SN_USER> --env SN_PASSWORD=<SN_PASSWORD> --env SN_AUTH=<SN_AUTH> --env SN_API_KEY=<SN_API_KEY> -- npx -y servicenow-mcp-aiReplace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"mcpServers": {
"servicenow-mcp-ai": {
"command": "npx",
"args": [
"-y",
"servicenow-mcp-ai"
],
"env": {
"SN_INSTANCE": "<SN_INSTANCE>",
"SN_USER": "<SN_USER>",
"SN_PASSWORD": "<SN_PASSWORD>",
"SN_AUTH": "<SN_AUTH>",
"SN_API_KEY": "<SN_API_KEY>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"servers": {
"servicenow-mcp-ai": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"servicenow-mcp-ai"
],
"env": {
"SN_INSTANCE": "<SN_INSTANCE>",
"SN_USER": "<SN_USER>",
"SN_PASSWORD": "<SN_PASSWORD>",
"SN_AUTH": "<SN_AUTH>",
"SN_API_KEY": "<SN_API_KEY>"
}
}
}
}Replace <…> with your own values. 1 more environment variable is in the server README
Platform CLI
gemini mcp add -e SN_INSTANCE=<SN_INSTANCE> -e SN_USER=<SN_USER> -e SN_PASSWORD=<SN_PASSWORD> -e SN_AUTH=<SN_AUTH> -e SN_API_KEY=<SN_API_KEY> servicenow-mcp-ai npx -y servicenow-mcp-aiReplace <…> with your own values. 1 more environment variable is in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about servicenow-mcp-ai
How do I install servicenow-mcp-ai in Claude Code?
Run `claude mcp add --env SN_INSTANCE=<SN_INSTANCE> --env SN_USER=<SN_USER> --env SN_PASSWORD=<SN_PASSWORD> --env SN_AUTH=<SN_AUTH> --env SN_API_KEY=<SN_API_KEY> --transport stdio servicenow-mcp-ai -- npx -y servicenow-mcp-ai`. Fill in your instance details and credentials in place of the placeholders.
What does servicenow-mcp-ai do?
It connects your coding agent to ServiceNow REST endpoints to manage records, audit CMDB assets, trace flow execution, and search scripts.
How does the server protect against unintended writes?
Mutation tools operate in plan mode by default, returning an execution preview that requires an explicit apply: true flag to perform database modifications.