servicenow-mcp
servicenow-mcp
ServiceNow 인시던트를 Table API를 통해 관리하는 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와 함께 사용하기
연결 방법은 두 가지입니다. 서버를 사용하는 모든 사람이 하나의 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는 서버 측에 유지됩니다(모든 클라이언트에 대해 하나의 인스턴스). 그러나 사용자 이름/비밀번호는 클라이언트별로 다릅니다. 따라서search_incidents결과,caller_id확인 등은 하나의 공유 서비스 계정 대신 해당 개별 사용자의 ServiceNow 권한을 반영합니다. 요청에Authorization헤더가 없으면.env의 공유SERVICENOW_USERNAME/SERVICENOW_PASSWORD로 대체됩니다.
나중에 OAuth 2.0이 필요하면 src/servicenow_mcp/client.py의 requests.Session.auth 설정을 토큰 기반 흐름으로 교체하세요. 나머지 클라이언트는 인증 방식에 영향을 받지 않습니다.
참고 사항
인시던트 테이블의
state필드는 숫자입니다 (예:6= 해결됨,7= 종료됨). 인스턴스에서 인시던트 상태를 사용자 정의한 경우 값이 다를 수 있습니다.
Available Tools
6 toolsadd_commentA
Add a customer-visible comment or an internal work note to an incident.
Args: number_or_sys_id: Incident number or sys_id. comment: Text to add. work_note: If True, adds as an internal work note instead of a customer-visible comment.
| Name | Required | Description | Default |
|---|---|---|---|
| comment | Yes | ||
| work_note | No | ||
| number_or_sys_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description clearly states the tool mutates an incident by adding text, and distinguishes visibility based on the work_note flag. With no annotations provided, this description carries the full burden and does an adequate job, though it doesn't mention authentication requirements or that the tool assumes an existing incident.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and structured with a docstring-style Args section, making it easy to parse. It is not overly verbose, though the Args section partially repeats schema field names without adding new info for number_or_sys_id.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple tool (3 params, no nested types, no enums), the description adequately covers the purpose and key behavioral differences. An output schema exists, so return value details are not needed. It does not explain prerequisites like 'incident must exist' or what happens if the incident is already resolved, but for a straightforward comment tool, this is sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the schema: it explains that comment is customer-visible by default and that work_note makes it internal. Since schema coverage is 0% and there are 3 parameters, the description compensates well, though it could clarify that number_or_sys_id uniquely targets an incident.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it adds either a customer-visible comment or an internal work note to an incident, using specific verbs and resources. It distinguishes from sibling tools like create_incident or update_incident by focusing on commentary, not incident creation or field modification.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains the core use case (adding a comment vs work_note) but does not explicitly state when not to use this tool or mention alternatives. Given the sibling tools, an agent might infer that for broader updates they should use update_incident instead, but no direct guidance is offered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_incidentA
Create a new ServiceNow incident.
Args: short_description: Brief summary of the incident (required). description: Full description of the issue. urgency: "1" (High), "2" (Medium), or "3" (Low). impact: "1" (High), "2" (Medium), or "3" (Low). category: Incident category, e.g. "software", "hardware", "network". assignment_group: Name or sys_id of the assignment group. caller_id: Name or sys_id of the user reporting the incident.
| Name | Required | Description | Default |
|---|---|---|---|
| impact | No | ||
| urgency | No | ||
| category | No | ||
| caller_id | No | ||
| description | No | ||
| assignment_group | No | ||
| short_description | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It does not mention side effects (e.g., whether a record is stored immediately, if it triggers notifications, or if any validation occurs). The output schema exists but is not described, leaving the agent to infer what the tool returns.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, with a clear introductory sentence followed by a bullet-like list of parameters. Each line is informative and earns its place. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 7 parameters (1 required) and a high-complexity domain (incident creation in ServiceNow), the description covers parameter semantics but lacks guidance on return values (despite having an output schema) and behavioral details (e.g., whether the incident is immediately persisted, if any side effects occur). It is adequate for basic creation but leaves gaps for a thorough agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does reasonably well. It explains 'urgency' values as '1 (High), 2 (Medium), 3 (Low)', and 'impact' similarly, and provides example categories like 'software', 'hardware', 'network'. This adds meaning beyond the bare schema titles. However, it could clarify the format for 'assignment_group' and 'caller_id' (e.g., 'sys_id preferred') for even better clarity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Create a new ServiceNow incident', using a specific verb ('Create') and resource ('ServiceNow incident'). The parameter descriptions further clarify the fields involved, and the tool name 'create_incident' is distinct from siblings like 'get_incident' or 'update_incident', so no confusion arises.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description lists parameters and their meanings, which guides basic usage, but it does not explicitly say when to use this tool versus siblings. For example, when to create an incident versus update one via 'update_incident' is left implied. There is no 'when not to use' or alternative guidance provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_incidentA
Fetch a ServiceNow incident by its number (e.g. INC0010023) or sys_id.
| Name | Required | Description | Default |
|---|---|---|---|
| number_or_sys_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It correctly indicates a read-only operation ('Fetch'), but does not disclose what happens on missing identifiers, authentication needs, or response structure (though output schema partially compensates). The description adds minimal behavioral context beyond the obvious.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words. It front-loads the action and provides an immediate example. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (single parameter, no nested objects) and the presence of an output schema, the description is almost sufficient. It covers the core functionality and parameter semantics. The only gap is missing error behavior or success indication, but for a straightforward fetch this is acceptable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains that the parameter accepts either an incident number (with example) or a sys_id, which adds significant meaning beyond the raw 'string' type. However, it could be more precise about sys_id format (e.g., GUID).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Fetch'), the resource ('ServiceNow incident'), and provides a concrete example of the identifier format ('number (e.g. INC0010023) or sys_id'). This distinguishes it from sibling tools like search_incidents (which searches by other criteria) and mutation tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use when you have the exact identifier, but provides no explicit guidance on when to use this tool versus siblings, nor when not to use it. For example, it does not mention that search_incidents should be used if the identifier is unknown.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resolve_incidentB
Resolve an incident by setting its state to Resolved.
Args: number_or_sys_id: Incident number or sys_id. close_notes: Notes describing the resolution. close_code: Resolution code, e.g. "Solved (Permanently)", "Solved (Workaround)".
| Name | Required | Description | Default |
|---|---|---|---|
| close_code | No | Solved (Permanently) | |
| close_notes | Yes | ||
| number_or_sys_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for behavioral disclosure. It states that the tool sets the state to 'Resolved', which implies a write operation, but omits critical details: required permissions (e.g., can_edit_incident), side effects (e.g., notifications, closing timers), idempotency, or reversibility. The output schema exists but is not referenced.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short (two sentences) and front-loaded with the main purpose, followed by a clear, bullet-like argument list. Every sentence contributes meaning without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema (unmentioned), three parameters, and no annotations, the description is incomplete. It lacks usage context, behavioral warnings, and does not describe the return value. An agent cannot fully assess when to invoke this tool or what to expect beyond the primary state change.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful information beyond the bare schema. For 'number_or_sys_id' it clarifies acceptance of either number or system ID. 'close_notes' gets a contextual explanation. 'close_code' provides concrete examples ('Solved (Permanently)', 'Solved (Workaround)'). With 0% schema coverage, this compensation is valuable, though the required/non-required distinction is left to the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the action ('Resolve'), the resource ('incident'), and the specific outcome ('by setting its state to Resolved'). This verb+resource combination distinguishes it from sibling tools like update_incident and search_incidents, as resolve is a distinct operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as update_incident or add_comment. It does not mention prerequisites (e.g., incident must be open), excluded scenarios (e.g., already resolved), or compare with sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_incidentsA
Search incidents using a ServiceNow encoded query.
Args: query: ServiceNow encoded query string (sysparm_query), e.g. "active=true^priority=1" or "assigned_to.nameLIKEJohn". Leave empty to list the most recent incidents. limit: Max number of records to return (default 10). offset: Number of records to skip, for pagination.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | No | ||
| offset | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description must carry full disclosure. It explains pagination but omits critical behavioral traits: it's a read-only operation, no side effects, no rate limits or authorization hints. The output schema exists but description doesn't confirm that results are returned.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Structured as a compact docstring with Args section. Every sentence is informative and necessary. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers the core usage of all three parameters, defaults, and pagination. Output schema is present, so return details are provided structurally. Could mention that the tool returns a list of incidents matching the query.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, yet description adds rich meaning: query is a ServiceNow encoded string with examples, limit default 10, offset for pagination. This fully compensates for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Search incidents using a ServiceNow encoded query' with a specific verb and resource. It distinguishes from sibling tools like get_incident (single record) and mutation tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Describes when to use the encoded query, including examples and the behavior when query is empty. Provides pagination guidance via limit and offset. Lacks explicit contrast with siblings or exclusion scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_incidentA
Update fields on an existing incident.
Args: number_or_sys_id: Incident number (e.g. INC0010023) or sys_id. fields: Field name -> new value, e.g. {"state": "2", "priority": "1"}.
| Name | Required | Description | Default |
|---|---|---|---|
| fields | Yes | ||
| number_or_sys_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral transparency. It discloses the tool is a mutation (update) on an existing incident, which implies write side effects. However, it does not mention whether partial updates are allowed, whether all fields are updatable, what happens on failure (e.g., incident not found), or authentication/permission requirements. This is adequate but not comprehensive for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, consisting of a one-liner summary and a docstring-style Args block. The key info is front-loaded. However, the Args section uses a format that may be less readable in some plain-text contexts, and it could be slightly more structured with bullet points.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that no annotations exist, the description must cover behavioral aspects. It informs about update semantics, but lacks details on return values (despite an output schema existing), error handling, rate limits, or field validation. For a tool with two parameters and a nested object, it is adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description fully bears the responsibility. It explains the first parameter (number_or_sys_id) with a concrete example (INC0010023) and indicates it can also accept a sys_id. For the fields parameter, it provides a usage example format. This adds significant semantic value beyond the bare schema, which only states type and title. However, it does not document all possible field names or values, leaving some ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool updates fields on an existing incident, specifying the resource (incident) and action (update). The sibling tools include create_incident and resolve_incident, so this description effectively distinguishes itself as a general-purpose field update tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly indicates usage when updating existing incidents, but it does not explicitly state when not to use it or mention alternatives. For example, it does not clarify that resolving an incident should use resolve_incident instead, or that updating status to '6' (resolved) might trigger different side effects. The usage is clear for common cases but lacks explicit guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.0- First observed
add_comment - First observed
create_incident - First observed
get_incident - First observed
resolve_incident - First observed
search_incidents - First observed
update_incident
TDQS
Scored across 6 tools
Each tool has a clear, distinct purpose covering the full incident lifecycle: get, create, update, search, add comment, and resolve. There is no overlap or ambiguity between them.
Tools follow a verb_noun pattern (e.g., get_incident, create_incident). The only minor deviation is 'add_comment' which is still verb_noun but lacks the 'incident' suffix, though it is clearly contextual.
Six tools is an ideal size for an incident management MCP server. Each tool serves a necessary operation without being too many or too few, keeping the surface focused and manageable.
Core incident operations are covered: create, read, update, search, comment, and resolve. Missing an explicit delete tool, but ServiceNow incidents are typically not deleted; update can handle assignment. Minor gap but still robust.
Maintenance
Related MCP Connectors
- mttrlyOAuthcom.mttrly
AI-powered incident management and server monitoring via MCP.
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for generating rough-draft project plans from natural-language prompts.
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.8935 npm16MIT
- AlicenseNot gradedqualityCmaintenanceMCP server enabling interaction with ServiceNow API for managing incidents, CMDB, change management, and other ServiceNow operations via natural language.20MIT
- FlicenseAqualityDmaintenanceA 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-
- AlicenseNot gradedqualityDmaintenanceMCP server to interact with ServiceNow instances, enabling ITSM, CMDB, workflow, and knowledge search operations.MIT