Get the FREE Ultimate OpenClaw Setup Guide →

servicenow

The most comprehensive ServiceNow MCP server. 17 tools for full CRUD, CMDB graph traversal, background scripts, ATF testing, and more.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio onlyflowstech-servicenow-mcp npx -y @onlyflows/servicenow-mcp \
  --env SN_USER="your_username" \
  --env SN_INSTANCE="https://yourinstance.service-now.com" \
  --env SN_PASSWORD="your_password" \
  --env SN_REL_DEPTH="3" \
  --env SN_DISPLAY_VALUE="true"

How to use

The @onlyflows/servicenow-mcp server exposes a comprehensive suite of ServiceNow tools to an AI-assisted workflow. It enables full CRUD operations across tables, CMDB graph traversal with configurable depth, attachment handling, health checks, and a broad set of automation and testing capabilities (ATF, code search, background scripts, and natural language interface). You can query, create, update, and delete records (with safety checks), perform bulk operations with dry-run safeguards, inspect schemas, examine CMDB relationships, and run background scripts or ATF tests. The tools are designed to be invoked through your MCP client (Claude Desktop, Cursor, Windsurf, VS Code Copilot, etc.) using the standard MCP server configuration, with environment variables supplying instance credentials and context.

To use the tools, connect to your ServiceNow instance by configuring SN_INSTANCE, SN_USER, and SN_PASSWORD. Then call specific tools such as sn_query to fetch records, sn_create to add new items, sn_update or sn_delete for changes, sn_relationships to traverse CMDB graphs, sn_attach to manage attachments, sn_atf to run automated tests, sn_nl for natural language-driven API calls, and sn_schema or sn_health for introspection and health checks. For example, you can ask the AI to “query incidents with priority 1” (sn_query), or “show upstream dependencies for CI X” (sn_relationships), or “run ATF suite ABC” (sn_atf). The environment also supports optional depth and display-value settings to tailor results and readability.

How to install

Prerequisites:

  • Node.js environment for MCP (recommended via npm).
  • Access to a ServiceNow instance with appropriate permissions for the desired operations.
  1. Install and configure the MCP server:
  • Ensure you have Node.js and npm installed.
  • Install the MCP client tooling as needed by your environment (per your MCP platform).
  1. Run the MCP server locally (example shown mirrors readme guidance):
# Install dependencies and build if required
npm install
npm run build  # if build step exists

# Run locally with your ServiceNow credentials
SN_INSTANCE=https://yourinstance.service-now.com \
SN_USER=your_username \
SN_PASSWORD=your_password \
node dist/index.js
  1. Verify the server starts and is reachable from your MCP client. You should see the servicenow MCP server registered under the name "servicenow" with the provided environment context.

  2. Optional: For development or testing, use MCP Inspector or equivalent tooling to validate that the server responds to tool invocations and returns structured outputs.

Additional notes

Tips and caveats:

  • Always keep SN_PASSWORD secure; use environment variable injection and avoid embedding credentials in code.
  • By default, CMDB traversal depth is configurable (SN_REL_DEPTH). Start with a conservative depth to prevent long-running queries.
  • Delete and bulk operations require explicit confirmation (confirm: true) and, in some cases, force or additional safety flags.
  • If you enable SN_DISPLAY_VALUE, results will include human-readable display values where applicable.
  • Ensure the ServiceNow instance URL uses the correct domain and that API access is enabled for the user account.
  • For tooling outside of the MCP client (e.g., Playwright-related background scripts), ensure proper permissions and test in a non-production environment first.
  • When using sn_batch for bulk updates/deletes, rely on the dry-run behavior by default to validate impact before execution.

Related MCP Servers

Sponsor this space

Reach thousands of developers