servicenow-mcp
servicenow-mcp
Ein kleiner MCP-Server, der KI-Agenten das Erstellen, Suchen und Aktualisieren von ServiceNow-Vorfällen über die Table-API ermöglicht. Erstellt mit dem offiziellen Python-Paket mcp (FastMCP-ähnliche Dekorateure), httpx und python-dotenv. Läuft über stdio.
Alles befindet sich in einer einzigen Datei: server.py.
Einrichtung
Erfordert Python 3.12+ und uv.
uv syncErstellen Sie eine .env-Datei neben server.py (sie wird von git ignoriert) mit Basic-Auth-Anmeldedaten für Ihre Instanz – eine Personal Developer Instance funktioniert gut:
SNOW_INSTANCE_URL=https://devXXXXXX.service-now.com
SNOW_USERNAME=admin
SNOW_PASSWORD=your-password
# optional, default 15
SNOW_TIMEOUT_SECONDS=15Führen Sie den Server aus (er spricht MCP über stdin/stdout, daher gibt es nichts zu sehen – ein MCP-Client muss ihn starten):
uv run server.pyRegistrieren bei einem MCP-Client
Weisen Sie den Client auf uv mit dem Projektverzeichnis hin, damit .venv und .env erkannt werden:
{
"mcpServers": {
"servicenow": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/servicenow-mcp", "run", "server.py"]
}
}
}Für Claude Code: claude mcp add servicenow -- uv --directory /absolute/path/to/servicenow-mcp run server.py.
Umgebungsvariablen, die bereits in der Umgebung des Clients gesetzt sind, haben Vorrang vor .env.
Related MCP server: sn-mcp-bridge
Werkzeuge
Werkzeug | Parameter | Funktion | Rückgabe |
|
| Erstellt einen neuen Vorfall. |
|
|
| Listet Vorfälle zuerst die neuesten. |
|
|
| Sucht den Vorfall anhand der Nummer, fügt eine Arbeitsnotiz hinzu und/oder setzt den Status. Mindestens einer der Parameter |
|
Alle Werkzeuge lösen einen lesbaren Werkzeugfehler aus (dem Agenten als isError gemeldet) anstatt eines Stack-Trace, z.B.:
Authentication failed (401): check SNOW_USERNAME and SNOW_PASSWORD. ServiceNow said: User is not authenticated …Could not connect to https://…: [Errno 8] nodename nor servname provided … Check SNOW_INSTANCE_URL and your network connection.Timed out after 15s talking to https://… The instance may be hibernating (PDI) or unreachable.Incident 'INC9999999' was not found on https://….Forbidden (403): the user lacks permission … or the update was rejected by a business rule. ServiceNow said: …
Design-Notizen
ServiceNowClientkapselt einen einzelnenhttpx.AsyncClient(Basic-Auth, JSON-Header, Timeout) und stelltcreate_record / query_records / get_record_by_number / update_recordbereit. Alle Fehler werden inServiceNowErrormit einer menschenlesbaren Nachricht übersetzt.Die Werkzeuge erhalten den Client über
get_client(); rufen Sie in Testsset_client(fake)auf, um einen Mock auszutauschen, ohne das Netzwerk zu berühren.Datensätze werden mit
sysparm_display_value=allabgerufen, sodass Status-/Dringlichkeitsbezeichnungen von der Instanz selbst stammen und nicht aus einer fest codierten Zuordnung (die freundlichen Namensaliasse sind nur für die Eingabe).mcp2.x hatFastMCPinMCPServerumbenannt;server.pyimportiert dasjenige, das existiert, sodass es sowohl auf 1.x als auch auf 2.x läuft.
Rauchtest
Gegen die Live-Instanz ausführen (schreibt einen Vorfall):
uv run python -c "
import asyncio, server
async def main():
c = await server.create_incident('MCP server smoke test', 'created by smoke test')
print(c)
print(await server.query_incidents(query_text='MCP server smoke test'))
print(await server.update_incident(c['number'], work_notes='hello from MCP'))
asyncio.run(main())
"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
- FlicenseAqualityCmaintenanceA production-ready MCP server that turns any MCP-compatible AI assistant into an AI-powered ServiceNow Incident Management Assistant, exposing incidents, users, CMDB records, and knowledge articles through validated tools.12
- Alicense-qualityBmaintenanceA lightweight MCP server that gives AI coding assistants full development capability on ServiceNow through the Table API, enabling CRUD and script execution without local installation.17MIT
- Flicense-qualityBmaintenanceMCP server that enables LLMs to interact with ServiceNow instances for managing incidents, users, stories, workflows, knowledge base articles, and script includes via the FastMCP framework.
- 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
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
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/matheuscalma/servicenow-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server