ServiceNow MCP Server
Connects Claude Desktop to a ServiceNow instance, enabling natural-language interactions to read incidents, inspect CMDB and table schemas, and create records with guardrails like update set scoping and dry-run preview.
README
ServiceNow Developer Actions — MCP Server
An MCP server that connects Claude Desktop (or any MCP client) to a ServiceNow instance, exposing guarded developer actions as natural-language tools. Claude can read incidents, inspect CMDB and table schemas, and create records — with every write isolated to a scoped Update Set, restricted to an allowlist of tables, and protected by a dry-run preview.
Built with FastMCP, a typed REST client, and an explicit guardrail layer — the difference between an LLM API wrapper and an agent tool you'd let near a production instance.
Why this project
This demonstrates two skill sets at once:
- AI engineering / agent architecture — agentic tool design with safety rails: input schemas (Pydantic), an allowlist + blocklist for writable tables, automatic Update Set scoping, and a
dry_runmode on risky tools so the model previews intent before mutating anything. - ServiceNow integration architecture — a resilient Table API client with OAuth2 (with Basic-auth fallback), token refresh on 401, and exponential backoff on 429/5xx, plus CMDB and
sys_dictionaryintrospection tools.
<img width="1249" height="778" alt="20260627-0956-14 5005578" src="https://github.com/user-attachments/assets/955521d6-39b2-4872-8033-c1f5c879fec3" />
Architecture
Claude Desktop
│ (MCP protocol over stdio)
▼
FastMCP Server ── server.py
│
├── tools (read) get_incidents · query_table · describe_table · get_cmdb_cis
├── tools (write) create_incident · create_script_include ← guarded
│
├── guardrails.py allowlist · blocklist · update-set scoping · dry-run
▼
ServiceNowClient ── client.py (OAuth2 / Basic · retry · backoff · typed errors)
│ REST (Table API)
▼
ServiceNow instance (PDI)
Tools
| Tool | Type | Notes |
|---|---|---|
get_incidents |
read | Newest-first, active filter |
query_table |
read | GlideRecord-style query on any table |
describe_table |
read | Field inspection via sys_dictionary |
get_cmdb_cis |
read | List CIs from a CMDB class |
create_incident |
write | Allowlisted, Update-Set scoped, dry_run |
create_script_include |
write | dry_run=True by default |
Guardrails
- Writable allowlist — only dev-artifact tables (
incident,sys_script_include,sys_script, …). Security/identity tables (sys_user,sys_security_acl, …) are explicitly blocked. - Update Set scoping — every write lands in a named, reviewable Update Set, never in Default.
- Dry-run — risky tools echo what would happen instead of executing.
Setup
git clone <your-repo-url> && cd servicenow-mcp
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
cp .env.example .env # fill in your PDI URL + credentials
pytest # 6 tests, all green
Connect to Claude Desktop
Add to claude_desktop_config.json (Developer → Open App Configuration File), then restart:
{
"mcpServers": {
"servicenow": {
"command": "python",
"args": ["-m", "servicenow_mcp.server"],
"cwd": "/absolute/path/to/servicenow-mcp/src",
"env": {
"SN_URL": "https://dev.service-now.com/",
"SN_USER": "user",
"SN_PASS": "pass",
"SN_UPDATE_SET": "MCP Automated Changes"
}
}
}
}
A 🔧 indicator confirms the tools loaded. Then try:
"Show me the 5 newest active incidents" "Describe the cmdb_ci_server table" "Create an incident: VPN gateway down, urgency high — dry run first"
Tech
Python 3.10+ · FastMCP · Pydantic v2 · requests · pytest + responses
Roadmap
- OAuth client-credentials grant (service account)
commit_to_source_controltool wrapping Studio's Git integration- Read-through cache for schema/CMDB lookups
- Structured audit log of every write the server performs
Author: Pavithra Kumaran S — ServiceNow Senior Consultant exploring AI agent architecture.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.