# servicenow-mcp-ai

Connects AI assistants to ServiceNow REST APIs for table manipulation, CMDB records, script dependency checks, and environment drift detection.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 9
- Author: IvanBBaev
- License: GPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/IvanBBaev/servicenow-mcp-ai
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/servicenow-mcp-ai

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `SN_INSTANCE`, `SN_USER`, `SN_PASSWORD`, `SN_AUTH`, `SN_API_KEY`, `SN_TOOL_PACKAGES` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: ServiceNow

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Codex

**Platform CLI**
```bash
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-ai
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-ai
```
Replace <…> with your own values. 1 more environment variable is in the server README

## When to use it
- 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
- Locate every script and UI policy referencing the `u_cost_center` field.
- Run `servicenow_trace_table_event` for record updates on the `incident` table.
- Search for occurrences of `GlideRecord` inside business rules using `servicenow_search_code`.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24271
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9369
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7548

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
