servicenow-mcp
servicenow-mcp
Table API を介して ServiceNow インシデントを管理するための MCP サーバー。インシデントの作成、読み取り、更新、検索、コメント追加、解決を行うツールを公開します。
セットアップ
依存関係をインストールします:
uv sync.env.exampleを.envにコピーし、認証情報を入力します:cp .env.example .envSERVICENOW_INSTANCE: インスタンス名のみ(例:dev12345.service-now.comの場合はdev12345)SERVICENOW_USERNAME/SERVICENOW_PASSWORD:incidentテーブルへのアクセス権を持つユーザーの基本認証情報(Table API 経由で読み取り/書き込み可能)
サーバーを直接実行して、正常に起動することを確認します:
uv run servicenow-mcp
Related MCP server: servicenow-api
Claude Desktop / Claude Code での使用
接続方法は2つあり、サーバーを使用する全員が1つの ServiceNow サービスアカウントを共有するか、各個人が自分自身として認証するかによって異なります。詳細については、以下の 認証 を参照してください。
オプション A — stdio、共有サービスアカウント
クライアントがサーバー自体をサブプロセスとして起動します。すべてのツール呼び出しは、env 経由で渡された SERVICENOW_USERNAME / SERVICENOW_PASSWORD を使用します。
{
"mcpServers": {
"servicenow": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/servicenow-mcp", "run", "servicenow-mcp"],
"env": {
"SERVICENOW_INSTANCE": "your-instance",
"SERVICENOW_USERNAME": "your-username",
"SERVICENOW_PASSWORD": "your-password"
}
}
}
}オプション B — HTTP、クライアントごとの認証情報
サーバーを一度、長時間実行される HTTP プロセスとして起動します(必要なのは SERVICENOW_INSTANCE と、認証ヘッダーのないリクエストのフォールバックとしての SERVICENOW_USERNAME/PASSWORD のみです):
uv run servicenow-mcp --transport streamable-http --host 127.0.0.1 --port 8003次に、.mcp.json をそのサーバーに向け、自身の ServiceNow ログインを HTTP Basic Auth ヘッダーとして送信します。これにより接続が「クライアントレベル」になります。認証情報はサーバーではなくクライアント設定に存在します:
{
"mcpServers": {
"servicenow": {
"type": "http",
"url": "http://127.0.0.1:8003/mcp",
"headers": {
"Authorization": "Basic <base64 of your-username:your-password>"
}
}
}
}ターミナルから base64 値を生成します(先頭のスペースに注意。echo の -n で回避します):
echo -n "your-username:your-password" | base64.mcp.json は .env のように .gitignore の対象ではありません。このディレクトリが共有/git リポジトリになる場合は、実際の認証情報をコミットしないでください。
ツール
create_incident— 新しいインシデントを作成しますget_incident— 番号(例:INC0010023)または sys_id で取得しますupdate_incident— 任意のフィールドを更新しますsearch_incidents— ServiceNow エンコードクエリ(sysparm_query)で検索しますadd_comment— 顧客から見えるコメントまたは内部作業メモを追加しますresolve_incident— ステータスを解決済みに設定し、クローズノート/コードを追加します
認証
認証は基本認証(ユーザー名/パスワード)です。これらの認証情報の取得元はトランスポートによって異なります:
stdio: 常に
.envの共有SERVICENOW_USERNAME/SERVICENOW_PASSWORDを使用します。HTTP(
sse/streamable-http): 各リクエストは、標準の HTTP Basic Auth ヘッダーを送信することで、自身の ServiceNow ユーザーとして認証できます:Authorization: Basic base64(username:password)SERVICENOW_INSTANCEはサーバー側に残ります(すべてのクライアントで1つのインスタンスです)が、ユーザー名/パスワードはクライアントごとに異なります。そのため、search_incidentsの結果やcaller_idの解決などは、1つの共有サービスアカウントではなく、その個々のユーザーの ServiceNow 権限を反映します。リクエストにAuthorizationヘッダーがない場合は、.envの共有SERVICENOW_USERNAME/SERVICENOW_PASSWORDにフォールバックします。
後で OAuth 2.0 が必要になった場合は、src/servicenow_mcp/client.py の requests.Session.auth 設定をトークンベースのフローに置き換えてください。クライアントの残りの部分は認証方式に依存しません。
注意事項
インシデントテーブルの
stateフィールドは数値です(例:6= 解決済み、7= クローズ)。インスタンスがインシデントステータスをカスタマイズしている場合、値が異なる可能性があります。
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
- AlicenseAqualityAmaintenanceAn MCP server that enables AI assistants to interact with ServiceNow instances, allowing script execution, data querying, ATF tests, and log tailing through natural language commands.8736413MIT
- Alicense-qualityBmaintenanceMCP server enabling interaction with ServiceNow API for managing incidents, CMDB, change management, and other ServiceNow operations via natural language.19MIT
- 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-qualityDmaintenanceMCP server to interact with ServiceNow instances, enabling ITSM, CMDB, workflow, and knowledge search operations.MIT
Related MCP Connectors
GibsonAI MCP server: manage your databases with natural language
MCP server for generating rough-draft project plans from natural-language prompts.
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
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/siddhardhan/servicenow-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server