
knuckles-team/servicenow-api
Developer toolsServiceNow MCP Server and API Wrapper
Overview
— Installation, deployment, and usage across the API, CLI, MCP, and A2A agent interfaces are maintained in the official documentation. is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with Python ServiceNow API Wrapper. - Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules. - Complete support for Eunomia policies, OIDC token delegation, and granular execution context tracking. - Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI). - Out-of-the-box OpenTelemetry exports and native Langfuse tracing. This agent wraps the Python ServiceNow API Wrapper API. The operator can interact with it programmatically or via its integrated execution entrypoints. Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in docs/index.md.
README
Servicenow Api
CLI or API | MCP | Agent
Version: 2.4.1
Documentation — Installation, deployment, and usage across the API, CLI, MCP, and A2A agent interfaces are maintained in the official documentation.
Overview
Servicenow Api is a production-grade Agent and Model Context Protocol (MCP) server designed to interface directly with Python ServiceNow API Wrapper.
Key Features
- Consolidated Action-Routed MCP Tools: Minimizes token overhead and eliminates tool bloat in LLM contexts by grouping methods into optimized, togglable tool modules.
- Enterprise-Grade Security: Complete support for Eunomia policies, OIDC token delegation, and granular execution context tracking.
- Integrated Graph Agent: Built-in Pydantic AI agent supporting the Agent Control Protocol (ACP) and standard Web interfaces (AG-UI).
- Native Telemetry & Tracing: Out-of-the-box OpenTelemetry exports and native Langfuse tracing.
CLI or API
This agent wraps the Python ServiceNow API Wrapper API. The operator can interact with it programmatically or via its integrated execution entrypoints.
Detailed instructions on how to use the underlying API wrappers, extended schema bindings, and developer SDK references are maintained in docs/index.md.
MCP
This server use dynamic Action-Routed tools to optimize token overhead and maximize IDE compatibility.
Tool surface — MCP_TOOL_MODE
Set MCP_TOOL_MODE (in the shared ~/.config/agent-connector-sdk/config.json or env) to choose the surface:
condensed(default) — the action-routed tools below (servicenow_(action, params_json)).verbose— one named, documented 1:1 tool per API method (servicenow_get_cmdb_instance(...)), taggedverbose.both— register both sets.
Filter the verbose set with --tools tag:verbose / MCP_ENABLED_TAGS=verbose. See the
agent-connector-sdk guide MCP Tool Modes for details.
Available MCP Tools
The table below is auto-generated from the MCP server — do not edit by hand.
Condensed action-routed tools (MCP_TOOL_MODE=condensed)
| MCP Tool | Toggle Env Var | Description |
|---|---|---|
servicenow_account |
ACCOUNTTOOL |
Manage servicenow account operations. |
servicenow_activity_subscriptions |
ACTIVITY_SUBSCRIPTIONSTOOL |
Manage servicenow activity subscriptions operations. |
servicenow_aggregate |
AGGREGATETOOL |
Manage servicenow aggregate operations. |
servicenow_application |
APPLICATIONTOOL |
Manage servicenow application operations. |
servicenow_attachment |
ATTACHMENTTOOL |
Manage servicenow attachment operations. |
servicenow_auth |
AUTHTOOL |
Manage servicenow auth operations. |
servicenow_batch |
BATCHTOOL |
Manage servicenow batch operations. |
servicenow_change_management |
CHANGE_MANAGEMENTTOOL |
Manage servicenow change management operations. |
servicenow_cicd |
CICDTOOL |
Manage servicenow cicd operations. |
servicenow_cilifecycle |
CILIFECYCLETOOL |
Manage servicenow cilifecycle operations. |
servicenow_cmdb |
CMDBTOOL |
Manage servicenow cmdb operations. |
servicenow_custom_api |
CUSTOM_APITOOL |
Manage servicenow custom api operations. |
servicenow_data_classification |
DATA_CLASSIFICATIONTOOL |
Manage servicenow data classification operations. |
servicenow_devops |
DEVOPSTOOL |
Manage servicenow devops operations. |
servicenow_email |
EMAILTOOL |
Manage servicenow email operations. |
servicenow_flows |
FLOWSTOOL |
Manage servicenow flows operations. |
servicenow_hr |
HRTOOL |
Manage servicenow hr operations. |
servicenow_import_sets |
IMPORT_SETSTOOL |
Manage servicenow import sets operations. |
servicenow_incidents |
INCIDENTSTOOL |
Manage servicenow incidents operations. |
servicenow_ingest_incidents |
MISCTOOL |
Natively ingest ServiceNow incidents into epistemic-graph as typed :Incident nodes. |
servicenow_knowledge_management |
KNOWLEDGE_MANAGEMENTTOOL |
Manage servicenow knowledge management operations. |
servicenow_metricbase |
METRICBASETOOL |
Manage servicenow metricbase operations. |
servicenow_plugins |
PLUGINSTOOL |
Manage servicenow plugins operations. |
servicenow_ppm |
PPMTOOL |
Manage servicenow ppm operations. |
servicenow_problem |
PROBLEMTOOL |
Manage servicenow problem management operations. |
servicenow_product_inventory |
PRODUCT_INVENTORYTOOL |
Manage servicenow product inventory operations. |
servicenow_sdk |
SDKTOOL |
Scaffold, build, and deploy a ServiceNow Studio scoped app via the now-sdk CLI. |
servicenow_service_qualification |
SERVICE_QUALIFICATIONTOOL |
Manage servicenow service qualification operations. |
servicenow_source_control |
SOURCE_CONTROLTOOL |
Manage servicenow source control operations. |
servicenow_table_api |
TABLE_APITOOL |
Manage servicenow table api operations. |
servicenow_testing |
TESTINGTOOL |
Manage servicenow testing operations. |
servicenow_update_sets |
UPDATE_SETSTOOL |
Manage servicenow update sets operations. |
Verbose 1:1 API-mapped tools (MCP_TOOL_MODE=verbose or both)
32 action-routed tool(s) · 126 verbose 1:1 tool(s). Each is enabled unless its TOOL toggle is set false; MCP_TOOL_MODE selects the surface (intent default — the six verb-tools, granular set loaded on demand · condensed action-routed · verbose 1:1 · both). Auto-generated — do not edit.
Detailed tool schemas, parameter shapes, and validation constraints are preserved in docs/usage.md.
Dynamic Tool Selection & Visibility
This MCP server supports dynamic toolset selection and visibility filtering at runtime. This allows the operator to restrict the set of exposed tools to prevent blowing up the LLM’s context window.
The operator can configure tool filtering via multiple input channels:
- CLI Arguments: Pass
--toolsor--toolsets(or their disabled counterparts--disabled-toolsand--disabled-toolsets) during startup. - Environment Variables: Define standard environment variables:
MCP_ENABLED_TOOLS/MCP_DISABLED_TOOLSMCP_ENABLED_TAGS/MCP_DISABLED_TAGS
- HTTP SSE Request Headers: Pass custom headers during transport initialization:
x-mcp-enabled-tools/x-mcp-disabled-toolsx-mcp-enabled-tags/x-mcp-disabled-tags
- HTTP SSE Request Query Parameters: Append query parameters directly to the operator’s transport connection URL:
?tools=tool1,tool2?tags=tag1
When query strings or parameters are provided, an LLM-free Knowledge Graph resolution layer (using DynamicToolOrchestrator) matches query intents against known tool tags, names, or descriptions, with safe fallback and automated 24-hour background cache refreshing.
MCP Configuration Examples
Install the connector-focused
[mcp]extra. Examples useservicenow-api[mcp]to add FastMCP / FastAPI throughagent-connector-sdk[mcp]; the required Agent Utilities core still carriesepistemic-graph[full]. The[agent-runtime]extra additionally enables model orchestration.
stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)
{
"mcpServers": {
"servicenow-mcp": {
"command": "uvx",
"args": [
"--from",
"servicenow-api[mcp]",
"servicenow-mcp"
],
"env": {
"MCP_TOOL_MODE": "intent",
"ACCOUNTTOOL": "True",
"ACTIVITY_SUBSCRIPTIONSTOOL": "True",
"AGGREGATETOOL": "True",
"APPLICATIONTOOL": "True",
"ATTACHMENTTOOL": "True",
"AUTHTOOL": "True",
"BATCHTOOL": "True",
"CHANGE_MANAGEMENTTOOL": "True",
"CICDTOOL": "True",
"CILIFECYCLETOOL": "True",
"CMDBTOOL": "True",
"CUSTOM_APITOOL": "True",
"DATA_CLASSIFICATIONTOOL": "True",
"DELEGATED_SCOPES": "api",
"DEVOPSTOOL": "True",
"EMAILTOOL": "True",
"FLOWSTOOL": "True",
"HRTOOL": "True",
"IMPORT_SETSTOOL": "True",
"INCIDENTSTOOL": "True",
"KNOWLEDGE_MANAGEMENTTOOL": "True",
"METRICBASETOOL": "True",
"MISCTOOL": "True",
"OPENAPI_CLIENT_ID": "your_openapi_client_id_here",
"OPENAPI_CLIENT_SECRET": "your_openapi_client_secret_here",
"OPENAPI_PASSWORD": "your_openapi_password_here",
"OPENAPI_USERNAME": "your_openapi_username_here",
"PLUGINSTOOL": "True",
"PPMTOOL": "True",
"PROBLEMTOOL": "True",
"PRODUCT_INVENTORYTOOL": "True",
"SDKTOOL": "True",
"SDK_WORKDIR": "/data/servicenow-sdk-workspace",
"SERVICENOW_CLIENT_SECRET": "your_servicenow_client_secret_here",
"SERVICENOW_GRANT_TYPE": "password",
"SERVICENOW_INSTANCE": "https://instance.example.invalid",
"SERVICENOW_PASSWORD": "your_servicenow_password_here",
"SERVICENOW_TLS_PROFILE": "system",
"SERVICENOW_USERNAME": "your_servicenow_username_here",
"SERVICE_QUALIFICATIONTOOL": "True",
"SOURCE_CONTROLTOOL": "True",
"TABLE_APITOOL": "True",
"TESTINGTOOL": "True",
"UPDATE_SETSTOOL": "True"
}
}
}
}
Runtime references require an alias-aware launcher such as Arbora. Other launchers must omit those entries and inject the resolved values through their own runtime secret boundary.
Streamable-HTTP Transport (networked / production)
{
"mcpServers": {
"servicenow-mcp": {
"command": "uvx",
"args": [
"--from",
"servicenow-api[mcp]",
"servicenow-mcp",
"--transport",
"streamable-http",
"--port",
"8000"
],
"env": {
"TRANSPORT": "streamable-http",
"HOST": "127.0.0.1",
"PORT": "8000",
"MCP_TOOL_MODE": "intent",
"ACCOUNTTOOL": "True",
"ACTIVITY_SUBSCRIPTIONSTOOL": "True",
"AGGREGATETOOL": "True",
"APPLICATIONTOOL": "True",
"ATTACHMENTTOOL": "True",
"AUTHTOOL": "True",
"BATCHTOOL": "True",
"CHANGE_MANAGEMENTTOOL": "True",
"CICDTOOL": "True",
"CILIFECYCLETOOL": "True",
"CMDBTOOL": "True",
"CUSTOM_APITOOL": "True",
"DATA_CLASSIFICATIONTOOL": "True",
"DELEGATED_SCOPES": "api",
"DEVOPSTOOL": "True",
"EMAILTOOL": "True",
"FLOWSTOOL": "True",
"HRTOOL": "True",
"IMPORT_SETSTOOL": "True",
"INCIDENTSTOOL": "True",
"KNOWLEDGE_MANAGEMENTTOOL": "True",
"METRICBASETOOL": "True",
"MISCTOOL": "True",
"OPENAPI_CLIENT_ID": "your_openapi_client_id_here",
"OPENAPI_CLIENT_SECRET": "your_openapi_client_secret_here",
"OPENAPI_PASSWORD": "your_openapi_password_here",
"OPENAPI_USERNAME": "your_openapi_username_here",
"PLUGINSTOOL": "True",
"PPMTOOL": "True",
"PROBLEMTOOL": "True",
"PRODUCT_INVENTORYTOOL": "True",
"SDKTOOL": "True",
"SDK_WORKDIR": "/data/servicenow-sdk-workspace",
"SERVICENOW_CLIENT_SECRET": "your_servicenow_client_secret_here",
"SERVICENOW_GRANT_TYPE": "password",
"SERVICENOW_INSTANCE": "https://instance.example.invalid",
"SERVICENOW_PASSWORD": "your_servicenow_password_here",
"SERVICENOW_TLS_PROFILE": "system",
"SERVICENOW_USERNAME": "your_servicenow_username_here",
"SERVICE_QUALIFICATIONTOOL": "True",
"SOURCE_CONTROLTOOL": "True",
"TABLE_APITOOL": "True",
"TESTINGTOOL": "True",
"UPDATE_SETSTOOL": "True"
}
}
}
}
Alternatively, connect to a pre-deployed Streamable-HTTP instance by url:
{
"mcpServers": {
"servicenow-mcp": {
"url": "http://localhost:8000/servicenow-mcp/mcp"
}
}
}
Run a reviewed container image as a least-privilege stdio child (no listener or published port):
docker run -i --rm \
--read-only \
--cap-drop=ALL \
--security-opt=no-new-privileges \
--pids-limit=256 \
--tmpfs /tmp:rw,noexec,nosuid,nodev,size=64m \
-e TRANSPORT=stdio \
-e MCP_TOOL_MODE=intent \
-e ACCOUNTTOOL=True \
-e ACTIVITY_SUBSCRIPTIONSTOOL=True \
-e AGGREGATETOOL=True \
-e APPLICATIONTOOL=True \
-e ATTACHMENTTOOL=True \
-e AUTHTOOL=True \
-e BATCHTOOL=True \
-e CHANGE_MANAGEMENTTOOL=True \
-e CICDTOOL=True \
-e CILIFECYCLETOOL=True \
-e CMDBTOOL=True \
-e CUSTOM_APITOOL=True \
-e DATA_CLASSIFICATIONTOOL=True \
-e DELEGATED_SCOPES=api \
-e DEVOPSTOOL=True \
-e EMAILTOOL=True \
-e FLOWSTOOL=True \
-e HRTOOL=True \
-e IMPORT_SETSTOOL=True \
-e INCIDENTSTOOL=True \
-e KNOWLEDGE_MANAGEMENTTOOL=True \
-e METRICBASETOOL=True \
-e MISCTOOL=True \
-e OPENAPI_CLIENT_ID=your_openapi_client_id_here \
-e OPENAPI_CLIENT_SECRET=your_openapi_client_secret_here \
-e OPENAPI_PASSWORD=your_openapi_password_here \
-e OPENAPI_USERNAME=your_openapi_username_here \
-e PLUGINSTOOL=True \
-e PPMTOOL=True \
-e PROBLEMTOOL=True \
-e PRODUCT_INVENTORYTOOL=True \
-e SDKTOOL=True \
-e SDK_WORKDIR=/data/servicenow-sdk-workspace \
-e SERVICENOW_CLIENT_SECRET=your_servicenow_client_secret_here \
-e SERVICENOW_GRANT_TYPE=password \
-e SERVICENOW_INSTANCE=https://instance.example.invalid \
-e SERVICENOW_PASSWORD=your_servicenow_password_here \
-e SERVICENOW_TLS_PROFILE=system \
-e SERVICENOW_USERNAME=your_servicenow_username_here \
-e SERVICE_QUALIFICATIONTOOL=True \
-e SOURCE_CONTROLTOOL=True \
-e TABLE_APITOOL=True \
-e TESTINGTOOL=True \
-e UPDATE_SETSTOOL=True \
registry.example.invalid/servicenow-api@sha256: servicenow-mcp
For containerized network HTTP, supply an authenticated TLS ingress (or
direct server TLS), exact MCP_ALLOWED_HOSTS, and an exact trusted-proxy
CIDR policy through the operator-owned deployment profile. The generator
does not emit an unauthenticated non-loopback listener.
Auto-generated from the code-read env surface (MCP_TOOL_MODE + package vars) — do not edit.
Additional Deployment Options
servicenow-api can run as a local stdio process or container, or behind a remote
network boundary. The
Deployment guide carries
the detailed transport contract.
- Local container — launch a reviewed immutable image as a least-privilege stdio child with no listener or published port.
- Remote URL — connect through an operator-supplied authenticated HTTPS
ingress. Keep its URL, outbound identity references, trust profile, and exact
MCP_ALLOWED_HOSTSinAgentConfig.
Agent
This repository features a fully integrated Pydantic AI Graph Agent. It communicates over the Agent Control Protocol (ACP) and interacts smoothly with the Agent Web UI (AG-UI) and Terminal interface.
Running the Agent CLI
To start the interactive command-line agent:
# Set credentials
export SERVICENOW_INSTANCE="your_value"
export SERVICENOW_USERNAME="your_value"
export SERVICENOW_CLIENT_ID="your_value"
export SERVICENOW_TLS_PROFILE=system
export DEBUG="your_value"
export PYTHONUNBUFFERED="your_value"
export SERVICENOW_PASSWORD="your_value"
export SERVICENOW_CLIENT_SECRET="your_value"
# Run the agent server
servicenow-agent --provider openai --model-id gpt-4o
Docker Compose Orchestration
The following docker/agent.compose.yml configures the Agent, Web UI, and Terminal Interface together:
version: '3.8'
services:
servicenow-api-mcp:
image: example/servicenow-api@sha256:
container_name: servicenow-api-mcp
hostname: servicenow-api-mcp
restart: always
env_file:
- ../.env
environment:
- PYTHONUNBUFFERED=1
- HOST=0.0.0.0
- PORT=8000
- TRANSPORT=streamable-http
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
servicenow-api-agent:
image: example/servicenow-api@sha256:
container_name: servicenow-api-agent
hostname: servicenow-api-agent
restart: always
depends_on:
- servicenow-api-mcp
env_file:
- ../.env
command: [ "servicenow-agent" ]
environment:
- PYTHONUNBUFFERED=1
- HOST=0.0.0.0
- PORT=9004
- MCP_URL=http://servicenow-api-mcp:8000/mcp
- PROVIDER=${PROVIDER:-openai}
- MODEL_ID=${MODEL_ID:-gpt-4o}
- ENABLE_WEB_UI=True
- ENABLE_OTEL=True
ports:
- "9004:9004"
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9004/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
Detailed graph node architecture explanations, custom skill configurations, and agentic trace guides are available in docs/deployment.md.
Security & Governance
Built directly upon the enterprise-ready agent-connector-sdk core, standard security parameters are fully supported:
Access Control & Policy Enforcement
- Eunomia Policies: Fine-grained, policy-driven tool authorization. Supports
none, localembedded(mcp_policies.json), or centralizedremotemodes. - OIDC Token Delegation: Compliant with RFC 8693 token exchange for flowing authenticating user credentials from Web UI / ACP → Agent → MCP.
- Scoped Credentials: Execution context runs restricted to the specific caller identity.
Runtime Security Grid
| Feature | Feature | Enablement |
|---|---|---|
| Tool Guard | Sensitivity inspection with human-in-the-loop validation | Enabled by default |
| Prompt Injection Defense | Input scanning, repetition monitoring, and recursive loop blocks | Enabled by default |
| Context Safety Guard | Stuck-loop detectors and contextual overflow preemptive alerts | Enabled by default |
Environment Variables
Package environment variables
| Variable | Example | Description |
|---|---|---|
HOST |
0.0.0.0 |
|
PORT |
8000 |
|
TRANSPORT |
stdio |
options: stdio, streamable-http, sse |
ENABLE_OTEL |
True |
|
OTEL_EXPORTER_OTLP_ENDPOINT |
http://localhost:8080/api/public/otel |
|
OTEL_EXPORTER_OTLP_PUBLIC_KEY_REF |
pk-... |
Reference form only — runtime-only trust material, resolved via AgentConfig. |
OTEL_EXPORTER_OTLP_SECRET_KEY_REF |
sk-... |
|
OTEL_EXPORTER_OTLP_PROTOCOL |
http/protobuf |
|
EUNOMIA_TYPE |
none |
options: none, embedded, remote |
EUNOMIA_POLICY_FILE |
mcp_policies.json |
|
EUNOMIA_REMOTE_URL |
http://eunomia-server:8000 |
|
SERVICENOW_INSTANCE |
https://instance.example.invalid |
|
SERVICENOW_URL |
— | alias for SERVICENOW_INSTANCE (checked first if both are set) |
SERVICENOW_USERNAME |
your_servicenow_username_here |
|
SERVICENOW_CLIENT_ID |
— | |
SERVICENOW_GRANT_TYPE |
password |
password (default) or client_credentials; client_credentials requires client id and secret. |
SERVICENOW_TLS_PROFILE |
system |
Named outbound TLS policy from AgentConfig. Use a reference for runtime-only trust material; peer and hostname verification remain mandatory. |
SERVICENOW_TLS_PROFILE_REF |
— | |
DEBUG |
False |
|
PYTHONUNBUFFERED |
1 |
|
SERVICENOW_PASSWORD |
secret-injected | |
SERVICENOW_CLIENT_SECRET |
secret-injected | |
AUDIENCE |
— | downstream token audience (defaults to the ServiceNow instance) |
DELEGATED_SCOPES |
api |
scopes requested during token exchange |
OPENAPI_USERNAME |
your_openapi_username_here |
|
OPENAPI_PASSWORD |
secret-injected | |
OPENAPI_CLIENT_ID |
your_openapi_client_id_here |
|
OPENAPI_CLIENT_SECRET |
secret-injected | |
SDK_WORKDIR |
/data/servicenow-sdk-workspace |
Working directory for now-sdk init/build/deploy/etc. Defaults to ~/servicenow-sdk-workspace (auto-created) when unset. |
MISCTOOL |
True |
|
FLOWSTOOL |
True |
|
APPLICATIONTOOL |
True |
|
CMDBTOOL |
True |
|
CICDTOOL |
True |
|
PLUGINSTOOL |
True |
|
SOURCE_CONTROLTOOL |
True |
|
TESTINGTOOL |
True |
|
UPDATE_SETSTOOL |
True |
|
BATCHTOOL |
True |
|
CHANGE_MANAGEMENTTOOL |
True |
|
CILIFECYCLETOOL |
True |
|
DEVOPSTOOL |
True |
|
IMPORT_SETSTOOL |
True |
|
INCIDENTSTOOL |
True |
|
PROBLEMTOOL |
True |
|
KNOWLEDGE_MANAGEMENTTOOL |
True |
|
TABLE_APITOOL |
True |
|
AUTHTOOL |
True |
|
CUSTOM_APITOOL |
True |
|
EMAILTOOL |
True |
|
DATA_CLASSIFICATIONTOOL |
True |
|
ATTACHMENTTOOL |
True |
|
AGGREGATETOOL |
True |
|
ACTIVITY_SUBSCRIPTIONSTOOL |
True |
|
ACCOUNTTOOL |
True |
|
HRTOOL |
True |
|
METRICBASETOOL |
True |
|
SERVICE_QUALIFICATIONTOOL |
True |
|
PPMTOOL |
True |
|
PRODUCT_INVENTORYTOOL |
True |
|
SDKTOOL |
True |
|
SERVICENOW_API_MCP_IMAGE |
— | Required by docker/mcp.compose.yml; set to the reviewed MCP image@sha256 digest. |
SERVICENOW_API_AGENT_IMAGE |
— | Required by docker/agent.compose.yml; set to the reviewed agent image@sha256 digest. |
Inherited agent-connector-sdk variables (apply to every connector)
| Variable | Example | Description |
|---|---|---|
MCP_TOOL_MODE |
intent |
Tool surface: intent | condensed | verbose | both |
MCP_ENABLED_TOOLS |
— | Comma-separated tool allow-list |
MCP_DISABLED_TOOLS |
— | Comma-separated tool deny-list |
MCP_ENABLED_TAGS |
— | Comma-separated tag allow-list |
MCP_DISABLED_TAGS |
— | Comma-separated tag deny-list |
MCP_CLIENT_AUTH |
— | Outbound MCP child auth: oidc-client-credentials | basic | none |
OIDC_CLIENT_ID |
— | OIDC client id (service-account auth) |
OIDC_CLIENT_SECRET_REF |
secret://identity/oidc-client-secret |
Runtime secret reference for the OIDC service account |
MCP_BASIC_AUTH_USERNAME |
— | HTTP Basic username (MCP_CLIENT_AUTH=basic) |
MCP_BASIC_AUTH_PASSWORD_REF |
secret://identity/mcp-basic-password |
Runtime secret reference for HTTP Basic auth (MCP_CLIENT_AUTH=basic) |
MCP_URL |
http://localhost:8000/mcp |
URL of the MCP server the agent connects to |
PROVIDER |
— | Operator-configured LLM provider for the agent |
MODEL_ID |
— | Operator-configured model id for the agent |
ENABLE_WEB_UI |
True |
Serve the AG-UI web interface |
63 package + 14 inherited variable(s). Auto-generated from .env.example + the shared agent-connector-sdk set — do not edit.
Every variable the server reads. See .env.example for a copy-paste
starting point.
Connection & Credentials
| Variable | Description | Default |
|---|---|---|
SERVICENOW_INSTANCE |
ServiceNow instance base URL | — |
SERVICENOW_USERNAME |
Account username (basic auth) | — |
SERVICENOW_PASSWORD |
Account password (basic auth) | — |
SERVICENOW_CLIENT_ID |
OAuth client id | — |
SERVICENOW_CLIENT_SECRET |
OAuth client secret | — |
SERVICENOW_GRANT_TYPE |
password or client_credentials |
password |
SERVICENOW_TLS_PROFILE |
Named outbound TLS policy from AgentConfig | system |
DEBUG |
Verbose logging | False |
PYTHONUNBUFFERED |
Unbuffered stdout (recommended in containers) | 1 |
OAuth client credentials
Set SERVICENOW_GRANT_TYPE=client_credentials together with
SERVICENOW_CLIENT_ID and SERVICENOW_CLIENT_SECRET to authenticate as the OAuth
application without a username/password. Configure the application for this grant
on the ServiceNow instance. Provide the secret through the operator’s runtime configuration;
do not commit it to an environment file.
OIDC delegation retains priority when enabled. Otherwise, explicitly selecting
client_credentials requires both client fields and fails if either is missing;
it does not fall back to an ambient username/password. Leaving the grant setting
unset preserves the existing password-grant or Basic authentication behavior.
Token exchange uses the configured TLS profile, a 30-second request timeout, and
rejects redirects, non-success HTTP responses, and missing or invalid tokens.
MCP server / transport
| Variable | Description | Default |
|---|---|---|
TRANSPORT |
stdio, streamable-http, or sse |
stdio |
HOST |
Bind host (HTTP transports) | 0.0.0.0 |
PORT |
Bind port (HTTP transports) | 8000 |
MCP_TOOL_MODE |
Tool surface: condensed, verbose, or both |
condensed |
MCP_ENABLED_TOOLS / MCP_DISABLED_TOOLS |
Comma-separated tool allow/deny list | — |
MCP_ENABLED_TAGS / MCP_DISABLED_TAGS |
Comma-separated tag allow/deny list | — |
Telemetry & governance
| Variable | Description | Default |
|---|---|---|
ENABLE_OTEL |
Enable OpenTelemetry export | True |
OTEL_EXPORTER_OTLP_ENDPOINT |
OTLP collector endpoint | — |
OTEL_EXPORTER_OTLP_PUBLIC_KEY / OTEL_EXPORTER_OTLP_SECRET_KEY |
OTLP auth keys | — |
OTEL_EXPORTER_OTLP_PROTOCOL |
OTLP protocol (e.g. http/protobuf) |
— |
EUNOMIA_TYPE |
Authorization mode: none, embedded, remote |
none |
EUNOMIA_POLICY_FILE |
Embedded policy file | mcp_policies.json |
EUNOMIA_REMOTE_URL |
Remote Eunomia server URL | — |
Tool toggles
Each action-routed tool can be disabled individually via its toggle env var (set to false).
The full list is in the Available MCP Tools table above
(e.g. INCIDENTSTOOL, CHANGE_MANAGEMENTTOOL, TABLE_APITOOL, CMDBTOOL).
Installation
Pick the extra that matches what the operator want to run:
| Extra | Installs | Use when |
|---|---|---|
servicenow-api[mcp] |
Connector-focused MCP server (agent-connector-sdk[mcp] — FastMCP/FastAPI + epistemic-graph[full]) |
The operator only run the MCP server (smallest install / image) |
servicenow-api[agent] |
Agent runtime (agent-connector-sdk[agent-runtime,logfire] — model orchestration + epistemic-graph[full]) |
The operator run the integrated agent |
servicenow-api[all] |
Everything (mcp + agent + logfire) |
Development / both surfaces |
# Connector-focused MCP server (includes the shared graph engine)
uv pip install "servicenow-api[mcp]"
# Agent runtime (adds model orchestration to the shared graph engine)
uv pip install "servicenow-api[agent]"
# Everything (development)
uv pip install "servicenow-api[all]" # or: python -m pip install "servicenow-api[all]"
Container images (:mcp vs :agent)
One multi-stage docker/Dockerfile builds two right-sized images, selected by --target:
| Image tag | Build target | Contents | Entrypoint |
|---|---|---|---|
example/servicenow-api:mcp |
--target mcp |
servicenow-api[mcp] — connector-focused, includes epistemic-graph[full]; no model-orchestration stack |
servicenow-mcp |
example/servicenow-api@sha256: |
--target agent (default) |
servicenow-api[agent] — agent runtime, model orchestration + epistemic-graph[full] |
servicenow-agent |
docker build --target mcp -t example/servicenow-api:mcp docker/ # connector-focused MCP server
docker build --target agent -t example/servicenow-api:agent-local docker/ # agent runtime
docker/mcp.compose.yml runs the connector-focused :mcp server; docker/agent.compose.yml runs the
agent (immutable agent digest) with a co-located :mcp sidecar.
Knowledge-graph database (epistemic-graph)
Both [mcp] and [agent] carry the epistemic-graph engine through the required
Agent Utilities core dependency (epistemic-graph[full]). The [mcp] extra keeps
the server connector-focused; [agent] also enables model orchestration. Local
deployments can use the bundled engine. For production or shared state, run
epistemic-graph as a dedicated database service and configure the runtime to use it.
Deployment recipes (single-node + Raft HA), connection configuration, and architecture
diagrams are documented in the
epistemic-graph deployment guide.
Documentation
The complete documentation is published as the official documentation site and is the recommended reference for installation, deployment, and day-to-day operation.
| Page | Contents |
|---|---|
| Installation | pip, source, extras, prebuilt Docker image |
| Deployment | run the MCP and agent servers, Compose, Caddy + Technitium, env config |
| Usage | the MCP tools, the Api client, the command line |
| Overview | the standardized agent-package pattern and MCP configuration |
| Concepts | concept registry (CONCEPT:SNOW-*) |
Repository Owners
Contribute
Contributions are welcome! Please ensure code quality by running local checks before submitting pull requests:
- Format code using
ruff format . - Lint code using
ruff check . - Validate type-safety with
mypy . - Run test suites using
pytest
Deploy with agent-connector-sdk-deployment
Provision this package with the consolidated agent-connector-sdk-deployment
workflow. It selects an installed-package, editable-source, or immutable-container
path; records only runtime secret and TLS-profile references in AgentConfig; and
runs doctor, registration, policy, observability, and rollback gates. Ask your agent
to “deploy servicenow-api with agent-connector-sdk-deployment”.
| Install mode | Command |
|---|---|
| Installed package | uv tool install "servicenow-api[mcp]", then run servicenow-mcp |
| Editable source | uv pip install -e ".[agent]", then run servicenow-mcp |
| Immutable container | deploy registry.example.invalid/servicenow-api@sha256: through the operator-selected orchestrator |
The repository embeds no deployment profile, credential value, certificate path, or
environment-specific endpoint. Supply those at runtime through AgentConfig and the
configured secret provider.
Governed capability contract
This package ships a compact canonical skill surface with specialist procedures
kept as referenced workflows. The current MCP tools, skill metadata,
connector_manifest.yml, ontology, mappings, shapes, fixtures, migrations,
tool-schema fingerprints, and certification metadata form one versioned
capability contract. Validate them together; do not rely on stale tool names or
historical per-task skill wrappers.
Runtime endpoints, credentials, certificate trust, tenant identity, retention, and observability policy are deployment inputs and are never packaged values. See Configuration, trust, and privacy before enabling a network transport, connector ingestion, Arbora delegation, or trace export.
Install
uvx --from servicenow-api[mcpConfiguration
{
"mcpServers": {
"servicenow-mcp": {
"command": "uvx",
"args": [
"--from",
"servicenow-api[mcp]",
"servicenow-mcp"
],
"env": {
"MCP_TOOL_MODE": "intent",
"ACCOUNTTOOL": "True",
"ACTIVITY_SUBSCRIPTIONSTOOL": "True",
"AGGREGATETOOL": "True",
"APPLICATIONTOOL": "True",
"ATTACHMENTTOOL": "True",
"AUTHTOOL": "True",
"BATCHTOOL": "True",
"CHANGE_MANAGEMENTTOOL": "True",
"CICDTOOL": "True",
"CILIFECYCLETOOL": "True",
"CMDBTOOL": "True",
"CUSTOM_APITOOL": "True",
"DATA_CLASSIFICATIONTOOL": "True",
"DELEGATED_SCOPES": "api",
"DEVOPSTOOL": "True",
"EMAILTOOL": "True",
"FLOWSTOOL": "True",
"HRTOOL": "True",
"IMPORT_SETSTOOL": "True",
"INCIDENTSTOOL": "True",
"KNOWLEDGE_MANAGEMENTTOOL": "True",
"METRICBASETOOL": "True",
"MISCTOOL": "True",
"OPENAPI_CLIENT_ID": "your_openapi_client_id_here",
"OPENAPI_CLIENT_SECRET": "your_openapi_client_secret_here",
"OPENAPI_PASSWORD": "your_openapi_password_here",
"OPENAPI_USERNAME": "your_openapi_username_here",
"PLUGINSTOOL": "True",
"PPMTOOL": "True",
"PROBLEMTOOL": "True",
"PRODUCT_INVENTORYTOOL": "True",
"SDKTOOL": "True",
"SDK_WORKDIR": "/data/servicenow-sdk-workspace",
"SERVICENOW_CLIENT_SECRET": "your_servicenow_clie
…