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 Serversearch for HP servers in the CMDB"
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 + Change Management MCP Server
This project exposes read-only CMDB and Change Management tools by default, with explicitly guarded write tools for an authorized ServiceNow PDI.
Capabilities
CMDB
List and search CIs.
Search by manufacturer, model, serial number, IP address, and class.
Read direct relationships from
cmdb_rel_ci.Build dependency graphs with cycle protection.
Change Management
List and search change requests.
Get a change by
CHG...number orsys_id.Read change tasks.
Read approval records.
Read affected CIs from
task_ci.Read impacted services/CIs from
task_cmdb_ci_service.Retrieve valid next states.
List standard change templates.
Build a combined change + CMDB impact graph.
Check whether important patch planning fields are populated.
Optionally create/update changes and tasks in a PDI.
Optionally add or remove Affected CIs.
Optionally run risk calculation, conflict detection, impacted-service refresh, and the current user's approval/rejection action.
Related MCP server: servicenow-mcp
1. Setup
Windows PowerShell:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
Copy-Item .env.example .envmacOS/Linux:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .envEdit .env with your PDI URL and credentials.
SERVICENOW_INSTANCE=Instance URL
SERVICENOW_USERNAME=admin
SERVICENOW_PASSWORD=replace-with-your-password
SERVICENOW_ENABLE_WRITES=false
SERVICENOW_WRITE_CONFIRMATION=CONFIRM_PDI_WRITE
MCP_TRANSPORT=stdio
MCP_HOST=127.0.0.1
MCP_PORT=9000Do not commit .env.
2. Test CMDB REST APIs
Check connectivity
python test_api.py healthList CIs
List ten configuration items:
python test_api.py list --limit 10Paginate through CIs:
python test_api.py list --limit 20 --offset 20Filter by exact CI class:
python test_api.py list --ci-class cmdb_ci_server --limit 20Search CIs
Search by manufacturer:
python test_api.py search --manufacturer CiscoSearch by model name:
python test_api.py search --model-name CatalystSearch by model number:
python test_api.py search --model-number C9300Combine manufacturer and model:
python test_api.py search `
--manufacturer Cisco `
--model-name CatalystSearch by CI name:
python test_api.py search --name server-prodSearch by serial number:
python test_api.py search `
--serial-number ABC123 `
--match exactSearch by IP address:
python test_api.py search `
--ip-address 192.168.1.10 `
--match exactSearch by FQDN:
python test_api.py search `
--fqdn server01.example.com `
--match exactSearch by CI class and model:
python test_api.py search `
--ci-class cmdb_ci_server `
--model-name PowerEdgeSupported match modes:
contains
exact
starts_withGet one CI
Use a 32-character ServiceNow sys_id returned by list or search:
python test_api.py get-ci YOUR_32_CHARACTER_SYS_IDQuery a class-specific CI table:
python test_api.py get-ci `
YOUR_32_CHARACTER_SYS_ID `
--table cmdb_ci_serverGet direct CI relationships
Get parent and child relationships:
python test_api.py relationships YOUR_32_CHARACTER_SYS_IDOnly parent-side relationships:
python test_api.py relationships `
YOUR_32_CHARACTER_SYS_ID `
--direction parentsOnly child-side relationships:
python test_api.py relationships `
YOUR_32_CHARACTER_SYS_ID `
--direction childrenBuild a dependency graph
Build a two-level graph in both directions:
python test_api.py tree `
YOUR_32_CHARACTER_SYS_ID `
--depth 2Explore only parent-side dependencies:
python test_api.py tree `
YOUR_32_CHARACTER_SYS_ID `
--depth 3 `
--direction parents `
--max-nodes 200Explore underlying child-side dependencies:
python test_api.py tree `
YOUR_32_CHARACTER_SYS_ID `
--depth 2 `
--direction children `
--max-nodes 100Important traversal parameters:
Parameter | Meaning |
| Maximum number of relationship hops from the starting CI |
|
|
| Maximum number of unique CIs returned |
An empty list normally means that the PDI does not contain matching sample CIs
or relationships. HTTP 401 usually means invalid credentials, while HTTP
403 normally indicates an ACL or role issue.
3. Test Change Management reads
Check connectivity
python test_change_api.py healthList and search changes
python test_change_api.py list --limit 10
python test_change_api.py list --active-only
python test_change_api.py list --type normal
python test_change_api.py list --type emergency
python test_change_api.py search --short-description patch
python test_change_api.py search --number CHG0030001 --match exact
python test_change_api.py search --ci-name "Cisco Switch"
python test_change_api.py search --ci-sys-id YOUR_32_CHARACTER_CI_SYS_IDRead one change and its related data
python test_change_api.py get CHG0030001
python test_change_api.py tasks CHG0030001
python test_change_api.py tasks CHG0030001 --active-only
python test_change_api.py approvals CHG0030001
python test_change_api.py approvals CHG0030001 --pending-only
python test_change_api.py affected-cis CHG0030001
python test_change_api.py impacted-services CHG0030001
python test_change_api.py next-states CHG0030001
python test_change_api.py readiness CHG0030001
python test_change_api.py bundle CHG0030001Search standard change templates
python test_change_api.py templates --text networkThe state filter may require the internal state value used by your change
model. Use next-states or inspect a returned record to see the correct values.
4. Test a guarded write in the PDI
Writes remain disabled until .env contains:
SERVICENOW_ENABLE_WRITES=true
SERVICENOW_WRITE_CONFIRMATION=CONFIRM_PDI_WRITECreate a normal change:
python test_change_api.py create-normal `
--short-description "Patch test server" `
--description "PDI test change created through the API" `
--implementation-plan "Take snapshot, install patch, restart service" `
--backout-plan "Restore snapshot and previous package" `
--test-plan "Verify service health and application smoke tests" `
--confirmation CONFIRM_PDI_WRITEKeep writes disabled when connecting the MCP server to any production instance.
5. Start the MCP server
Stdio
Keep this in .env:
MCP_TRANSPORT=stdioRun:
python mcp_server.pyStreamable HTTP
Set:
MCP_TRANSPORT=http
MCP_HOST=127.0.0.1
MCP_PORT=9000Start the server:
python mcp_server.pyThe endpoint is:
http://127.0.0.1:9000/mcpTest it from another terminal:
python test_mcp_client.pyYou can also use MCP Inspector:
npx -y @modelcontextprotocol/inspectorConnect it to:
http://127.0.0.1:9000/mcpImportant ServiceNow tables
Purpose | Table |
Configuration items |
|
CI relationships |
|
Change requests |
|
Change tasks |
|
Approval records |
|
Affected CIs |
|
Impacted services/CIs |
|
Notes
CMDB and Change Management read operations are available by default.
Change Management writes are disabled by default.
Search field names and query operators are allowlisted.
Arbitrary agent-generated encoded queries are not accepted.
CMDB graphs can contain cycles, so dependency results use
nodesandedges.A change identifier may be either a
CHG...number or a 32-charactersys_id.ServiceNow roles and ACLs still control every API operation.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceMCP server enabling interaction with ServiceNow API for managing incidents, CMDB, change management, and other ServiceNow operations via natural language.19MIT
- Alicense-qualityDmaintenanceMCP server to interact with ServiceNow instances, enabling ITSM, CMDB, workflow, and knowledge search operations.MIT
- AlicenseAqualityCmaintenanceAn MCP server for interacting with a ServiceNow instance via its Table API, enabling CRUD operations on incident, request, and requested item tables, as well as generic operations on any table by name.22MIT
- AlicenseAqualityCmaintenanceA read-only MCP server that enables AI assistants to query ServiceNow instances—incidents, changes, users, CMDB—with malformed query linting and injection protection.7MIT
Related MCP Connectors
MCP server for AI access to Swagger by SmartBear.
Read-only MCP server for ClassQuill, a tutoring-business-management platform.
Read-only MCP server for wafergraph.com's semiconductor & AI supply-chain data: 30 tools, no auth.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/vinayulli/ServiceNow-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server