GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - windoze95/servicewow-mcp: ServiceNow MCP Server — per-user delegated access via OAuth 2.0

BranchesTags
Open more actions menu

Latest commit

 

History

98 Commits
98 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docs
docs
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CLAUDE.md
CLAUDE.md
 
 
Caddyfile
Caddyfile
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
docker-compose.caddy.yml
docker-compose.caddy.yml
 
 
docker-compose.local.yml
docker-compose.local.yml
 
 
docker-compose.yml
docker-compose.yml
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
setup.sh
setup.sh
 
 
tsconfig.json
tsconfig.json
 
 
vitest.config.ts
vitest.config.ts
 
 

Repository files navigation

ServiceNow MCP Server

Node 22+ TypeScript MCP OAuth 2.0 CI

Secure, enterprise-ready MCP server for ServiceNow where every action runs as the authenticated user.

No shared service accounts. No ACL bypass. Full audit-trail fidelity.


⚡ Why This Exists

Instead of funneling every request through a shared service account, this server executes actions as the actual human user.

Because it uses per-user OAuth tokens, ServiceNow still enforces:

  • each user's ACLs and roles,
  • their approval authority,
  • and native user-level audit logging.

Result: safer automation, cleaner compliance, fewer permission hacks.


🔥 Core Capabilities

  • MCP-spec OAuth 2.0 with PKCE — clients like Claude Code auto-discover and re-auth natively
  • Per-user OAuth delegation to ServiceNow (Authorization Code flow + refresh)
  • AES-256-GCM encrypted token storage in Redis
  • Streamable HTTP MCP transport with per-session lifecycle
  • Bearer token auth on every MCP request (Authorization: Bearer)
  • Tool-level identity protections for sensitive operations
  • Per-user rate limiting via Redis token bucket
  • Input validation + normalized error responses
  • Per-tool/per-user usage metrics in Redis with an optional token-gated /metrics/usage endpoint
  • CI-enforced build + test + coverage gate

🚀 Quick Start

npm install
cp .env.example .env
npm run generate-key    # paste into TOKEN_ENCRYPTION_KEY
npm run dev

Health check: curl -s http://localhost:8080/health

For full setup instructions including ServiceNow OAuth configuration, see the Getting Started guide.


📚 Documentation

Comprehensive documentation lives in docs/:

  • Getting Started — Prerequisites, local dev, OAuth setup, first tool call
  • Architecture — System design, session lifecycle, request flow, Redis schema
  • Authentication — OAuth flow, token storage, refresh
  • Security — Identity enforcement, input validation, rate limiting, error handling
  • Tools (74) — All tools: incidents, change requests, knowledge, update sets, scheduled jobs, flow logs, CMDB, platform metadata, form rules, access control, on-call, and more
  • Resources (5) — MCP resources for direct record access
  • Prompts (7) — Guided workflows for incidents, change requests, knowledge, and catalog
  • HTTP API — Endpoints and client configuration
  • Deployment — Docker, Caddy, native TLS, setup script, environment variables
  • Development — Adding tools, testing, CI pipeline
  • Troubleshooting — Common issues and debug cheat sheet

✅ Testing and Quality

npm run build
npm test
npm run test:coverage
  • Coverage thresholds are configured in vitest.config.ts
  • CI runs build + tests + coverage gate on PRs and main

🖥️ Client Config (Claude Desktop / Claude Code)

{
  "mcpServers": {
    "servicenow": {
      "type": "streamablehttp",
      "url": "https://your-host:8080/mcp"
    }
  }
}

MCP clients automatically discover the OAuth endpoints via /.well-known/oauth-authorization-server and handle PKCE-based authentication. No manual link-opening required.

See Client Configuration for deployment-specific examples.


💡 Using Prompts and Resources

Once connected, the AI agent has access to tools, resources, and prompts.

Prompts are guided workflow templates the agent uses to walk through multi-step operations. In Claude Code, invoke them with a slash command:

/servicenow:incident_triage
/servicenow:change_request_planning
/servicenow:build_catalog_form

In Claude Desktop, use the prompt picker to browse and select from available prompts.

Resources give the agent read-only access to ServiceNow records by URI. The agent reads these automatically when it needs context — for example, reading servicenow://me for your profile or servicenow://incident/{sys_id} for an incident record.

See Prompts docs and Resources docs for the full list and SDK usage examples.


🤖 Agent Instruction Files

  • AGENTS.md
  • CLAUDE.md
  • .github/copilot-instructions.md

Alignment workflow validates expected consistency.


Built for secure, user-scoped AI operations in ServiceNow.

About

ServiceNow MCP Server — per-user delegated access via OAuth 2.0

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

15 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.