servicenow-mcp
servicenow-mcp
Un pequeño servidor MCP que permite a los agentes de IA crear, buscar y actualizar incidencias de ServiceNow a través de la API de Tablas. Construido con el paquete oficial de Python mcp (decoradores estilo FastMCP), httpx y python-dotenv. Se ejecuta sobre stdio.
Todo reside en un único archivo: server.py.
Configuración
Requiere Python 3.12+ y uv.
uv syncCrea un archivo .env junto a server.py (está ignorado por git) con credenciales de autenticación básica para tu instancia — una Instancia Personal de Desarrollador funciona bien:
SNOW_INSTANCE_URL=https://devXXXXXX.service-now.com
SNOW_USERNAME=admin
SNOW_PASSWORD=your-password
# optional, default 15
SNOW_TIMEOUT_SECONDS=15Ejecuta el servidor (habla MCP sobre stdin/stdout, así que no hay nada que ver — un cliente MCP debe lanzarlo):
uv run server.pyRegistro con un cliente MCP
Apunta el cliente a uv con el directorio del proyecto para que se recojan .venv y .env:
{
"mcpServers": {
"servicenow": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/servicenow-mcp", "run", "server.py"]
}
}
}Para Claude Code: claude mcp add servicenow -- uv --directory /absolute/path/to/servicenow-mcp run server.py.
Las variables de entorno ya establecidas en el entorno del cliente tienen prioridad sobre .env.
Related MCP server: sn-mcp-bridge
Herramientas
Herramienta | Parámetros | Qué hace | Devuelve |
|
| Crea una nueva incidencia. |
|
|
| Lista las incidencias de la más reciente a la más antigua. |
|
|
| Busca la incidencia por número, añade una nota de trabajo y/o establece el estado. Al menos uno de |
|
Todas las herramientas lanzan un error legible de herramienta (mostrado al agente como isError) en lugar de un rastreo de pila, por ejemplo:
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: …(por ejemplo, resolver una incidencia sin campos de resolución).
Notas de diseño
ServiceNowClientenvuelve un únicohttpx.AsyncClient(autenticación básica, cabeceras JSON, tiempo de espera) y exponecreate_record / query_records / get_record_by_number / update_record. Todos los errores se traducen aServiceNowErrorcon un mensaje legible.Las herramientas obtienen el cliente a través de
get_client(); llama aset_client(fake)en las pruebas para intercambiarlo por un mock sin tocar la red.Los registros se obtienen con
sysparm_display_value=all, por lo que las etiquetas de estado/urgencia provienen de la propia instancia en lugar de un mapa codificado (los alias de nombres amigables son solo de entrada).mcp2.x renombróFastMCPaMCPServer;server.pyimporta el que exista para que se ejecute tanto en 1.x como en 2.x.
Prueba de humo
Ejecuta contra la instancia en vivo (escribe una incidencia):
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