# jschuller/mcp-server-servicenow architecture

> Architecture diagram of the GitHub repository jschuller/mcp-server-servicenow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jschuller/mcp-server-servicenow
- Repository: https://github.com/jschuller/mcp-server-servicenow

## Overview

This is an MCP server that exposes ServiceNow data and operations to AI clients. The main workflow is an MCP tool or resource request, middleware checks and audits it, and the server makes authenticated ServiceNow API requests; results return through MCP. The graph preserves the documented table, CMDB, system/schema, update-set, and resource capabilities, plus authentication, diagnostics, and skill tooling. Some links rely on README or SOURCE INDEX references because several implementations were not excerpted.

Main entry points: [`src/servicenow_mcp/server.py`](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/server.py) (MCP server), [`src/servicenow_mcp/tools/system_tools.py`](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/system_tools.py) (System and schema), [`src/servicenow_mcp/utils/http.py`](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/http.py) (HTTP requests), [`src/servicenow_mcp/resources.py`](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/resources.py) (Resources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["MCP interface"]
  node_server["MCP server<br/>[server.py]"]
  node_resources["Resources<br/>[resources.py]"]
end

subgraph group_domain["ServiceNow capabilities"]
  node_tables["Table operations<br/>[table_tools.py]"]
  node_cmdb["CMDB tools<br/>[cmdb_tools.py]"]
  node_system["System and schema<br/>[system_tools.py]"]
  node_updates["Update sets"]
  node_schema["Schema lookup<br/>[schema.py]"]
end

subgraph group_safety["Security and transport"]
  node_auth["Authentication<br/>[auth_manager.py]"]
  node_oauth["OAuth proxy"]
  node_verifier["Token verifier"]
  node_policy["Policy checks<br/>[policy.py]"]
  node_readonly["Read-only identity"]
  node_audit["Audit logging<br/>[audit.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_http["HTTP requests<br/>[http.py]"]
  node_user["Caller identity<br/>[user.py]"]
end

subgraph group_support["Skill and operations"]
  node_doctor["Connection checks<br/>[doctor.py]"]
  node_skills["Skill validation<br/>[skill_lint.py]"]
  node_evalkit["Evaluation kit<br/>[eval_kit.py]"]
end

node_client(("MCP client"))
node_sn[("ServiceNow instance")]

node_client -->|"sends requests"| node_server
node_server -->|"returns results"| node_client
node_server -->|"checks calls"| node_policy
node_server -->|"filters writes"| node_readonly
node_server -->|"records calls"| node_audit
node_tables -->|"registers tools"| node_server
node_cmdb -->|"registers tools"| node_server
node_system -->|"registers tools"| node_server
node_updates -->|"registers tools"| node_server
node_resources -->|"registers resources"| node_server
node_server -->|"dispatches requests"| node_http
node_http -->|"reads and writes"| node_sn
node_server -->|"uses credentials"| node_auth
node_auth -->|"reads settings"| node_config
node_oauth -->|"verifies tokens"| node_verifier
node_resources -->|"fetches schema"| node_schema
node_system -->|"fetches schema"| node_schema
node_system -->|"fetches identity"| node_user
node_updates -->|"looks up caller"| node_user
node_doctor -->|"checks connection"| node_http
node_doctor -->|"loads settings"| node_config
node_evalkit -->|"checks policies"| node_policy
node_evalkit -->|"validates skills"| node_skills

click node_server "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/server.py"
click node_resources "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/resources.py"
click node_tables "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/table_tools.py"
click node_cmdb "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/cmdb_tools.py"
click node_system "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/system_tools.py"
click node_updates "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/update_set_tools.py"
click node_auth "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/auth/auth_manager.py"
click node_oauth "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/auth/sn_oauth_provider.py"
click node_verifier "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/auth/sn_token_verifier.py"
click node_policy "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/middleware/policy.py"
click node_readonly "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/middleware/read_only_identity.py"
click node_audit "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/middleware/audit.py"
click node_config "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/config.py"
click node_http "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/http.py"
click node_schema "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/schema.py"
click node_user "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/user.py"
click node_doctor "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/doctor.py"
click node_skills "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/skill_lint.py"
click node_evalkit "https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/eval_kit.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_resources,node_client toneBlue
class node_tables,node_cmdb,node_system,node_updates,node_schema,node_sn toneAmber
class node_auth,node_oauth,node_verifier,node_policy,node_readonly,node_audit,node_config,node_http,node_user toneMint
class node_doctor,node_skills,node_evalkit toneRose
```

## Components

### MCP interface

- [MCP server](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/server.py): `src/servicenow_mcp/server.py`
- [Resources](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/resources.py): `src/servicenow_mcp/resources.py`

### ServiceNow capabilities

- [Table operations](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/table_tools.py): `src/servicenow_mcp/tools/table_tools.py`
- [CMDB tools](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/cmdb_tools.py): `src/servicenow_mcp/tools/cmdb_tools.py`
- [System and schema](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/system_tools.py): `src/servicenow_mcp/tools/system_tools.py`
- [Update sets](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/tools/update_set_tools.py): `src/servicenow_mcp/tools/update_set_tools.py`
- [Schema lookup](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/schema.py): `src/servicenow_mcp/utils/schema.py`

### Security and transport

- [Authentication](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/auth/auth_manager.py): `src/servicenow_mcp/auth/auth_manager.py`
- [OAuth proxy](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/auth/sn_oauth_provider.py): `src/servicenow_mcp/auth/sn_oauth_provider.py`
- [Token verifier](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/auth/sn_token_verifier.py): `src/servicenow_mcp/auth/sn_token_verifier.py`
- [Policy checks](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/middleware/policy.py): `src/servicenow_mcp/middleware/policy.py`
- [Read-only identity](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/middleware/read_only_identity.py): `src/servicenow_mcp/middleware/read_only_identity.py`
- [Audit logging](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/middleware/audit.py): `src/servicenow_mcp/middleware/audit.py`
- [Configuration](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/config.py): `src/servicenow_mcp/utils/config.py`
- [HTTP requests](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/http.py): `src/servicenow_mcp/utils/http.py`
- [Caller identity](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/utils/user.py): `src/servicenow_mcp/utils/user.py`

### Skill and operations

- [Connection checks](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/doctor.py): `src/servicenow_mcp/doctor.py`
- [Skill validation](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/skill_lint.py): `src/servicenow_mcp/skill_lint.py`
- [Evaluation kit](https://github.com/jschuller/mcp-server-servicenow/blob/main/src/servicenow_mcp/eval_kit.py): `src/servicenow_mcp/eval_kit.py`

### Other components

- **MCP client**
- **ServiceNow instance**

## Connections

- MCP client → MCP server: sends requests (evidence: `README.md`)
- MCP server → MCP client: returns results (evidence: `README.md`)
- MCP server → Policy checks: checks calls (evidence: `src/servicenow_mcp/server.py`)
- MCP server → Read-only identity: filters writes (evidence: `src/servicenow_mcp/server.py`)
- MCP server → Audit logging: records calls (evidence: `src/servicenow_mcp/server.py`)
- Table operations → MCP server: registers tools (evidence: `src/servicenow_mcp/tools/table_tools.py`)
- CMDB tools → MCP server: registers tools (evidence: `src/servicenow_mcp/tools/cmdb_tools.py`)
- System and schema → MCP server: registers tools (evidence: `src/servicenow_mcp/tools/system_tools.py`)
- Update sets → MCP server: registers tools (evidence: `src/servicenow_mcp/tools/update_set_tools.py`)
- Resources → MCP server: registers resources (evidence: `src/servicenow_mcp/resources.py`)
- MCP server → HTTP requests: dispatches requests (evidence: `src/servicenow_mcp/server.py`)
- HTTP requests → ServiceNow instance: reads and writes (evidence: `README.md`)
- MCP server → Authentication: uses credentials (evidence: `src/servicenow_mcp/server.py`)
- Authentication → Configuration: reads settings (evidence: `src/servicenow_mcp/auth/auth_manager.py`)
- OAuth proxy → Token verifier: verifies tokens (evidence: `src/servicenow_mcp/auth/sn_oauth_provider.py`)
- Resources → Schema lookup: fetches schema (evidence: `src/servicenow_mcp/resources.py`)
- System and schema → Schema lookup: fetches schema (evidence: `src/servicenow_mcp/tools/system_tools.py`)
- System and schema → Caller identity: fetches identity (evidence: `src/servicenow_mcp/tools/system_tools.py`)
- Update sets → Caller identity: looks up caller (evidence: `src/servicenow_mcp/resources.py`)
- Connection checks → HTTP requests: checks connection (evidence: `src/servicenow_mcp/doctor.py`)
- Connection checks → Configuration: loads settings (evidence: `src/servicenow_mcp/doctor.py`)
- Evaluation kit → Policy checks: checks policies (evidence: `src/servicenow_mcp/eval_kit.py`)
- Evaluation kit → Skill validation: validates skills (evidence: `src/servicenow_mcp/eval_kit.py`)
