Skip to main content
Glama
ServiceNow MCP Server

ServiceNow MCP Server

ServiceNow MCP Server

セルフホスティングのModel Context Protocolサーバーは、ServiceNowインスタンスをMicrosoft Copilot StudioなどのMCPクライアント(その他、ClaudeなどあらゆるMCPクライアント)に公開します。プラットフォームのREST API(Table / Aggregate / CMDB)を呼び出すことで、標準のServiceNowライセンスだけで完璧に動作し、ユーザーごとのOAuth 2.0トークン・パススルーを使用するため、すべての呼び出しはサインイン中のユーザーとして実行され、そのユーザー自身のACLが適応されます。

なぜこれが存在するのか

対象のインスタンスは標準のServiceNowライセンスを使用しているため、ServiceNow組み込みのMCP Server Console(Now Assist / AI Native SKUのみ)は利用できません。このサーバーは、Copilot Studio専用のコネクタではなく、ポータブルで再利用可能な統合レイヤーです。1つのMCPサーバーで、クライアントやAIフロントエンドを問わず利用できます。

Related MCP server: servicenow-mcp-server

認証の仕組み(トークン・パススルー)

User ⇄ Copilot Studio  --(per-user OAuth: ServiceNow access token as Bearer)-->  this server
                                                       │ forwards the same Bearer token
                                                       ▼
                                          ServiceNow REST APIs (ACLs enforced as that user)

このサーバーはユーザーの認証情報を一切保存しません。受信したAuthorization: Bearer <token>ヘッダーを読み取り、そのままServiceNowに転送します。auth.pyを参照してください。

ツール

ティア1 — 直接取得(読み取り専用): get_incident, list_incidents, get_change_request, list_change_requests, get_service_request, list_service_requests, get_configuration_item, find_configuration_items, search_knowledge, get_knowledge_article, lookup_user, lookup_group.

ティア2 — 決定的ロジック: correlate_changes_to_incident, get_incident_trends, get_ci_impact, find_similar_incidents, get_incident_context.

根本原因分析と最終的な類似インシデントの順位付けは、意図的にエージェントの推論に委ねられており、get_incident_context / find_similar_incidentsがその判断材料を提供します。

ローカルで実行

python -m venv .venv
.venv/Scripts/pip install -e ".[dev]"      # Windows; use .venv/bin on macOS/Linux
cp .env.example .env                        # set SERVICENOW_INSTANCE_URL
SERVICENOW_INSTANCE_URL=https://devXXXXX.service-now.com .venv/Scripts/servicenow-mcp

サーバーはhttp://HOST:PORT/mcp(Streamable HTTP)で待ち受け、/healthプローブを備えています。

MCP Inspectorで試す

npx @modelcontextprotocol/inspector

http://localhost:8000/mcpをポイント先に指定し、Streamable HTTPを選択して、ServiceNowのOAuthアクセストークンをベアラートークンとして指定すれば、ツールを試せます。これは、MCPにおけるSwagger UIに最も近いもので、すべてのツールをスキーマ付きで一覧表示し、それぞれを対話的に呼び出すことができます。

全ツールを一覧表示(サーバーやServiceNowへの接続は不要)

.venv/Scripts/python scripts/list_tools.py         # human-readable catalog
.venv/Scripts/python scripts/list_tools.py --json   # machine-readable (like an OpenAPI dump)

デプロイ

コンテナイメージ + Azure Container Apps。ServiceNow OAuthアプリの登録、Copilot Studioの接続、およびインフラについては、docs/DEPLOYMENT.mdを参照してください。

完全なクリック単位の手順書 — ローカルサーバーを開発トンネル経由で公開する方法、エージェントをゼロから作成する方法、2ユーザーによるACLテストを含む — は、docs/COPILOT_STUDIO_SETUP.mdを参照してください。

テスト

.venv/Scripts/pytest

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers