Skip to main content
Glama
darrylsarkisian-debug

ServiceNow MCP Demo — Incident Assistant

ServiceNow MCP デモ — インシデントアシスタント

エンドツーエンドの Model Context Protocol デモで、Claude を ServiceNow インシデント管理に接続します。MCP の基本(サーバー、クライアント、ツール、リソース、stdio トランスポート、エージェントループ)を実際の ITSM ワークフローに適用する方法を示すために構築されました。

アーキテクチャ

┌─────────────────────────────┐        ┌───────────────────────────────┐        ┌────────────────┐
│  Web Client (Streamlit)     │  MCP   │  MCP Server (FastMCP)         │  REST  │  ServiceNow    │
│  - MCP host + client        │◄──────►│  - create_incident            │◄──────►│  Table API     │
│  - Claude agent loop        │ stdio  │  - get_incident               │        │  (or mock mode)│
│  - Incident cards in UI     │JSON-RPC│  - list_recent_incidents      │        │                │
│                             │        │  - update_incident_state      │        │                │
│                             │        │  - resolve_incident           │        │                │
│                             │        │  - search_knowledge_articles  │        │                │
│                             │        │  - resource: priority         │        │                │
│                             │        │    matrix reference           │        │                │
└─────────────────────────────┘        └───────────────────────────────┘        └────────────────┘

「ラップトップが起動しない、チケットを開いて」のフロー:

  1. Web クライアントが、起動時に MCP サーバーから検出したツールスキーマとともに、あなたのメッセージを Claude に送信します(tools/list)。

  2. Claude が、推測された緊急度/影響度/カテゴリで create_incident を呼び出すことを決定します。

  3. クライアントが MCP 経由で呼び出しを転送し(tools/call)、サーバーが ServiceNow Table API(またはインメモリモック)にアクセスします。

  4. 結果が返され、Claude がインシデント番号を確認し、UI がインシデントカードをレンダリングします。

Related MCP server: ServiceNow MCP Server (SSE)

クイックスタート

# 1. Create a virtual environment
python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate

# 2. Install dependencies
pip install -r requirements.txt

# 3. Configure
cp .env.example .env             # then edit: add your ANTHROPIC_API_KEY
                                 # leave SERVICENOW_MODE=mock for a no-setup demo

# 4. Run the web client (it launches the MCP server automatically)
streamlit run client/app.py

http://localhost:8501 を開いて、以下を試してください:

  • 「ラップトップが起動しません。1時間後にクライアントデモがあります。チケットを開いてください。」

  • 「最近のインシデントを5件表示して。」

  • 「INC0010001 を In Progress に移動して、技術者が向かっているという作業メモを追加して。」

  • 「電源が入らないラップトップに関する KB 記事はありますか?」

  • 「それで解決しました。INC0010001 を解決済み(恒久的な解決)にして、充電器を交換しました。」

ライブ ServiceNow モード

  1. https://developer.servicenow.com で無料の Personal Developer Instance (PDI) をリクエストします(約2分かかります)。

  2. .envSERVICENOW_MODE=live を設定し、SERVICENOW_INSTANCESERVICENOW_USERSERVICENOW_PASSWORD を入力します。

  3. アプリを再起動します。作成されたインシデントは PDI の Incident > All に表示されます。デモ中に実際の ServiceNow UI でチケットを表示するのに最適です。

PDI は非アクティブになると休止状態になります。面接の約15分前に起動し、フォールバックとして mock モードを維持してください。

search_knowledge_articles は PDI の kb_knowledge テーブルを直接クエリします。ライブモードでデモする前に、デモシナリオに一致するタイトルの公開済み KB 記事を2〜3件シードしてください(例:「ラップトップの電源が入らない」)。そうしないと、ライブ検索は空の結果を返します。モックモードにはすでに3件のシード記事が含まれているため、そのまま動作します。

サーバーを単体でテストする(UIなし)

MCP Inspector は、サーバーが単独で動作することを証明する最速の方法です:

npx @modelcontextprotocol/inspector python server/servicenow_server.py

サーバーを Claude Desktop に追加することもできます(claude_desktop_config.json):

{
  "mcpServers": {
    "servicenow": {
      "command": "python",
      "args": ["/absolute/path/to/server/servicenow_server.py"]
    }
  }
}

プロジェクト構成

servicenow-mcp-demo/
├── server/servicenow_server.py   # FastMCP server: 6 tools + 1 resource, mock/live backends
├── client/app.py                 # Streamlit web app: MCP client + Claude agent loop
├── requirements.txt
├── .env.example
├── PROJECT_PLAN.md               # Phase-by-phase build plan and status
└── DEMO_SCRIPT.md                # 5-minute recorded-demo script

実証される MCP の概念

  • サーバー — FastMCP で構築:型付きパラメータと docstring 駆動のスキーマを持つツール

  • リソースservicenow://reference/priority-matrix)— ツールとは異なる読み取り専用コンテキスト

  • stdio トランスポート — クライアントがサーバーのサブプロセスを起動し、JSON-RPC で通信

  • 機能の検出 — クライアントはツールをハードコードせず、tools/list を呼び出す

  • エージェントループ — 最終的なテキスト回答が得られるまで Claude との複数ラウンドのツール使用

  • 関心の分離 — 同じサーバーが、この Web クライアント、Claude Desktop、MCP Inspector のいずれでも変更なしで動作

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables AI assistants and development tools to interact with ServiceNow instances, providing comprehensive API coverage for incident management, change management, CMDB, and other ServiceNow modules.
    3
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    A local gateway that exposes ServiceNow REST APIs as MCP tools, enabling natural language interaction with ServiceNow incidents, changes, CMDB, and scripts via Claude and other MCP clients.

Latest Blog Posts

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/darrylsarkisian-debug/servicenow-mcp-demo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server