ServiceNow CMDB MCP Server
Click on "Install 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 CMDB MCP Serverfind all servers in the production environment"
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 CMDB MCP Server
A Python MCP server that connects AI assistants (Claude Code, Claude Desktop, Cursor) to a ServiceNow CMDB instance via natural language. Enables querying, dependency analysis, health auditing, CI lifecycle management, and configurable inspection — all through the Model Context Protocol.
What makes this different
Deep CMDB focus with relationship traversal, impact analysis, path finding, and dependency mapping
display_valuesupport — reference fields return human-readable names, not opaque sys_idsASCII tree visualization for dependency graphs directly in the terminal
Dynamic schema powered by the Data Model Navigator plugin (no hardcoded class hierarchies)
Full configurable inspection (business rules, flows, flow logic, client scripts, script includes, ACLs) with credential redaction
Discovery, IRE rules, and import set visibility
Two-phase write confirmation for safe CI mutations
Rich server instructions that guide LLM behavior (workflow patterns, smart defaults, disambiguation)
Tool annotations for smart auto-approval in Claude Code
Requirements
Python 3.11+
uv package manager
ServiceNow instance (Xanadu+) with an OAuth 2.0 application and service account
Setup
Clone the repository and install dependencies:
uv syncCopy
.env.exampleto.envand fill in your ServiceNow credentials:
cp .env.example .envSN_INSTANCE_URL=https://your-instance.service-now.com
SN_CLIENT_ID=your-oauth-client-id
SN_CLIENT_SECRET=your-oauth-client-secret
SN_USERNAME=your-service-account
SN_PASSWORD=your-passwordRun the server:
uv run servicenow-cmdb-mcpClaude Code integration
Add to your .mcp.json in the project root:
{
"mcpServers": {
"servicenow-cmdb": {
"command": "uv",
"args": ["run", "servicenow-cmdb-mcp"],
"cwd": "/path/to/mcp-cmdb",
"env": {
"SN_INSTANCE_URL": "https://your-instance.service-now.com",
"SN_CLIENT_ID": "your-oauth-client-id",
"SN_CLIENT_SECRET": "your-oauth-client-secret",
"SN_USERNAME": "your-service-account",
"SN_PASSWORD": "your-password"
}
}
}
}Recommended ServiceNow roles
The service account needs these roles for full functionality:
Role | What it unlocks |
| CMDB CI queries, relationships, health tools |
| Standard ITSM tables, basic platform access |
| Flow Designer read access (flow details, triggers) |
| Client scripts, UI policies |
Optional roles for deeper inspection:
Role | What it unlocks |
| Flow overview listing |
| Script include read access |
| Business rule scripts |
Tools (38 total)
Domain | Tools | Description |
Queries |
| Search, inspect, and explore CMDB classes. Supports |
Relationships |
| Traverse CI relationships, visualize dependency trees (ASCII format), find shortest paths between CIs. Supports |
Health |
| Audit CMDB data quality |
Mutations |
| Safe two-phase CI writes |
Configurables |
| Inspect automation, flow logic, and security config |
Discovery |
| Monitor discovery operations |
IRE |
| Inspect identification and reconciliation |
Imports |
| Monitor data imports and transforms |
Utilities |
| Connectivity check, cache management, table access diagnostics |
Key features
Display values
Query tools support display_value="true" to return human-readable names instead of sys_ids for reference fields (location, assigned_to, company, etc.).
Tree visualization
get_dependency_tree supports format="ascii_tree" to return pre-rendered text trees, and class_filter to show only specific CI types (e.g., servers only, no disks/memory).
Flow inspection
get_flow_details parses the internal label_cache from Flow Designer to show flow triggers, steps, referenced tables, and data flow — without needing admin access.
Path finding
find_ci_path finds the shortest relationship path between any two CIs using BFS traversal.
Development
# Run unit tests
uv run pytest tests/ -v
# Run smoke tests (requires live ServiceNow instance)
uv run python smoke_tests/smoke_test.py
# Type check
uv run mypy src/
# Lint
uv run ruff check src/
# Fallback if uv run fails with "file in use" on Windows
.venv/Scripts/python.exe -m pytest tests/ -vArchitecture
See ARCHITECTURE.md for the full design document covering authentication, security, tool patterns, and API usage.
Tech stack
FastMCP (
mcp[cli]) — MCP server framework with decorator-based tool registrationhttpx — Async HTTP client for ServiceNow REST APIs
pydantic / pydantic-settings — Configuration and validation
OAuth 2.0 — Password grant against ServiceNow
/oauth_token.doSTDIO transport — Local deployment for Claude Code / Claude Desktop / Cursor
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ketiil/mcp-cmdb'
If you have feedback or need assistance with the MCP directory API, please join our Discord server