ServiceNow CMDB MCP Server
A Python MCP server that connects AI assistants (Claude Code, Claude Desktop) 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, health auditing, and dependency mapping
- Dynamic schema powered by the Data Model Navigator plugin (no hardcoded class hierarchies)
- Full configurable inspection (business rules, flows, client scripts, ACLs) with credential redaction
- Discovery, IRE rules, and import set visibility
- Two-phase write confirmation for safe CI mutations
- 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 sync
- Copy
.env.exampleto.envand fill in your ServiceNow credentials:
cp .env.example .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
- Run the server:
uv run servicenow-cmdb-mcp
Claude Code integration
Add to your Claude Code MCP config:
{
"mcpServers": {
"servicenow-cmdb": {
"command": "uv",
"args": ["run", "servicenow-cmdb-mcp"],
"cwd": "/path/to/mcp-cmdb"
}
}
}
Tools (34 total)
| Domain | Tools | Description |
|---|---|---|
| Queries | search_cis, query_cis_raw, get_ci_details, count_cis, suggest_table, list_ci_classes, describe_ci_class |
Search, inspect, and explore CMDB classes |
| Relationships | get_ci_relationships, find_related_cis, list_relationship_types, get_dependency_tree, get_impact_summary |
Traverse CI relationships and dependencies |
| Health | find_orphan_cis, find_duplicate_cis, find_stale_cis, cmdb_health_summary |
Audit CMDB data quality |
| Mutations | preview_ci_create, confirm_ci_create, preview_ci_update, confirm_ci_update |
Safe two-phase CI writes |
| Configurables | get_business_rules, get_flows, get_client_scripts, get_acls, analyze_configurables |
Inspect automation and security config |
| Discovery | list_discovery_schedules, get_discovery_status, get_discovery_errors |
Monitor discovery operations |
| IRE | get_identification_rules, get_reconciliation_rules, explain_duplicate |
Inspect identification and reconciliation |
| Imports | list_data_sources, get_import_set_runs, get_transform_errors |
Monitor data imports and transforms |
| Schema | refresh_metadata_cache |
Manage cached metadata |
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/
Architecture
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 registration - httpx — Async HTTP client for ServiceNow REST APIs
- pydantic / pydantic-settings — Configuration and validation
- OAuth 2.0 — Password grant against ServiceNow
/oauth_token.do - STDIO transport — Local deployment for Claude Code / Claude Desktop
Metadata
Release files for servicenow-cmdb-mcp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| servicenow_cmdb_mcp-0.1.2.tar.gz | 124.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| servicenow_cmdb_mcp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 178.4 kB
Release files / servicenow_cmdb_mcp-0.1.2.tar.gz
| Download URL | servicenow_cmdb_mcp-0.1.2.tar.gz |
|---|---|
| Size | 124.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc3c4a15e694584521ec95df3462ead5fdb626502dfb91595b1d2aade63e40ac
|
|
BLAKE2b-256 checksum How to use checksums |
63ec33bbb08a5f52cfad7a6ee9f289c5a6b2b63f704107c2febc4c644069dde5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / servicenow_cmdb_mcp-0.1.2-py3-none-any.whl
| Download URL | servicenow_cmdb_mcp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 54.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
caf8ef7a8a8589fcb713dae6affae0a43e38fac0a19387f3103fdcbb9d3c12a6
|
|
BLAKE2b-256 checksum How to use checksums |
0bbc53d726980fee4da8d7d349aa59474fb17af8e5fc5f05ba0ea107b6db6f10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for servicenow-cmdb-mcp 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.