snow-mcp

snow-mcp

An 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.

Category
访问服务器

README

snow-mcp

An MCP (Model Context Protocol) server for interacting with a ServiceNow instance via its Table API. Exposes tools to list/search, get, create, and update records in the incident, sc_request (Request), and sc_req_item (Requested Item) tables, plus generic tools that work against any ServiceNow table by name.

Setup

Requires Python >=3.14 and uv.

  1. Create a .env file in the project root with your ServiceNow instance credentials:

    SERVICENOW_INSTANCE_URL="https://your-instance.service-now.com"
    SERVICENOW_USER="your-username"
    SERVICENOW_PASS="your-password"
    
    # Optional, only used when running over HTTP (see below):
    MCP_TRANSPORT="stdio"    # "stdio" (default) or "http"
    MCP_HOST="127.0.0.1"     # HTTP bind host, default 127.0.0.1
    MCP_PORT="8000"          # HTTP bind port, default 8000
    
  2. Install dependencies:

    uv sync
    

Testing

uv run pytest

The suite mocks ServiceNow's HTTP API (via respx) and never talks to a real instance, so it runs without a .env file. It combines an in-process MCP client (mcp.shared.memory.create_connected_server_and_client_session, connected to the server over in-memory streams) with direct unit tests of ServiceNowClient. See tests/ and the Testing section of CLAUDE.md for details.

Running

Start the server over stdio (for use by an MCP client):

uv run main.py

To test interactively with the MCP Inspector:

uv run mcp dev main.py

Running over HTTP

Set MCP_TRANSPORT=http (in .env or the environment) and run the server the same way:

MCP_TRANSPORT=http uv run main.py

This serves both MCP HTTP transports from one process, bound to MCP_HOST/MCP_PORT (default 127.0.0.1:8000):

  • Streamable HTTP (current spec): http://127.0.0.1:8000/mcp
  • SSE (legacy transport): http://127.0.0.1:8000/sse

Stdio remains the default transport; the client-registration example below is unaffected by this.

Registering with an MCP client

{
  "mcpServers": {
    "snow-mcp": {
      "command": "uv",
      "args": ["run", "--directory", "C:\\Projects\\AI\\MCP\\snow-mcp", "main.py"]
    }
  }
}

Running in a container (Podman, Windows)

Requires Podman on Windows with a running machine (podman machine init once, then podman machine start). The image runs as a non-root user and serves the HTTP transport (MCP_TRANSPORT=http) so it's reachable from the host over the published port.

  1. Make sure your .env file exists in the project root (see Setup above) — compose.yaml loads it via env_file.

  2. Build and start:

    podman compose up -d --build
    

    (If podman compose isn't available, use podman-compose up -d --build instead — Podman shells out to whichever compose provider is installed.)

  3. The server is now reachable at http://127.0.0.1:8000/mcp (streamable HTTP) — point an HTTP-based MCP client at it, same as the MCP_TRANSPORT=http case above.

  4. Stop it:

    podman compose down
    

To build/run without compose:

podman build -f Containerfile -t snow-mcp .
podman run -d --name snow-mcp -p 8000:8000 --env-file .env -e MCP_TRANSPORT=http snow-mcp

Tools

Per-table tools (same shape for incident, sc_request*_requests, sc_req_item*_requested_items):

  • list_incidents / list_requests / list_requested_items — search with an encoded query (query), sort (order_by, order_desc), pagination (limit, offset), field selection (fields), and display values (display_value)
  • get_incident / get_request / get_requested_item — fetch a single record by sys_id
  • create_incident / create_request / create_requested_item — create a record from a fields dict
  • update_incident / update_request / update_requested_item — partially update a record by sys_id
  • get_incident_work_notes / get_request_work_notes / get_requested_item_work_notes — read a record's work notes (journal entries) newest first, with limit/offset pagination and optional author filtering (created_by, exact username match)
  • add_incident_work_note / add_request_work_note / add_requested_item_work_note — append a work note (note) to a record by sys_id

Generic tools, for any table by technical name:

  • list_table_records, get_table_record, create_table_record, update_table_record

There is no delete tool.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选