ServiceNow MCP Apps

Open-source reference implementation

ServiceNow MCP Apps for Microsoft 365 Copilot

A stateless TypeScript MCP server that turns ServiceNow Knowledge, catalog ordering, request approvals, and incident management into secure, interactive experiences inside Copilot.

Runtime architecture Two OAuth boundaries, one conversational surface
Microsoft 365 Copilot Declarative agent and sandboxed MCP Apps widgets
  • Natural-language intent
  • Interactive inline UI
  • User Entra identity
Azure Functions MCP server Node.js 20, strict TypeScript, Flex Consumption
  • Tool and widget registry
  • OBO token exchange
  • Compact structured content
ServiceNow Knowledge, Service Catalog, request approvals, and incidents
  • Per-user ACL enforcement
  • Native workflow state
  • Auditable authorship
27MCP tools
9Interactive widgets
417Release tests
2Identity boundaries

Capability surface

Atomic tools, purpose-built widgets

The model selects narrowly scoped tools. Each user-facing result carries structured data for a corresponding MCP App instead of verbose JSON or a replicated ServiceNow interface.

Knowledge

Rank answers before tickets

Search caller-visible articles once per attempt, open only the selected result, and offer a consent-based incident after three unresolved attempts.

  • search_knowledge
  • get_knowledge_article
  • create_incident_from_knowledge
Service Catalog

Discover and order

Search visible catalog items, render variable-aware forms, place a single order, or collect multiple items in a cart.

  • search_catalog_items
  • get_catalog_item_form
  • place_order / submit_cart
Requests

Track and manage

List caller-owned requests, inspect requested items, edit permitted fields, and remove individual lines.

  • list_user_orders
  • get_order_detail
  • update_order_item
Approvals

Decide in context

Approve or reject a pending request from the order-detail widget. The server verifies the approval belongs to the request before mutation.

  • approve_order_approval
  • reject_order_approval
Incidents

Report and follow up

Create caller-attributed incidents, review activity, post customer-visible comments, and manage attachments.

  • report_incident
  • get_incident_detail
  • add_incident_attachment
MCP Apps

Nine inline experiences

Ranked Knowledge, catalog browse/order, cart, requests, and incident experiences render natively in Copilot.

Operations

Validate before users do

Configuration probes, readiness checks, repeatable demo fixtures, and a release command establish a clear operator boundary.

  • validate_servicenow_config
  • npm run release:auto

Optional Copilot path

Bring the same ServiceNow MCP server to Copilot with WIQD

Use Work IQ Developer Tools to package, validate, provision, and share a Microsoft 365 Copilot plugin without replacing the existing declarative-agent and MCP Apps workflow.

WIQD plugin

One server, two packaging options

The checked-in wiqd-plugin/ package adds an MCP connector and a ServiceNow self-service skill. It calls the same HTTPS endpoint, so the server continues to enforce Entra validation, OBO caller mapping, ServiceNow ACLs, and write-action confirmation.

Read the WIQD setup guide →

ServiceNow prerequisites

Prepare the integration before Copilot

  1. Create the ServiceNow OAuth appUse the external-client/password-grant setup documented in the repository.
  2. Create a least-privilege integration userGrant catalog, Knowledge, request, approval, incident, attachment, and identity lookup access as required.
  3. Validate caller attributionMap the Entra caller email to sys_user.email and run the configuration probe before write actions.

Read the ServiceNow setup guide →

Identity and trust

Calls run as the person in the conversation

The default production pattern validates the inbound Copilot token, exchanges it through Entra On-Behalf-Of, and presents a downstream token that ServiceNow maps to sys_user.

  1. Copilot authenticates the userThe declarative agent obtains an access token for the MCP API.
  2. The Function validates the bearer tokenIssuer, audience, tenant, and signing keys are checked before tool execution.
  3. MSAL performs OBO exchangeThe inbound assertion becomes a token for the ServiceNow-trusted downstream audience.
  4. ServiceNow maps the identitypreferred_username resolves against sys_user.email, enforcing native ACLs and authorship.

Security posture

Secrets are referenced from Key Vault, deployment storage is private, and the Flex Function reaches Blob packages through VNet integration and a private endpoint.

  • ✓ No secrets committed
  • ✓ Per-user ServiceNow ACLs
  • ✓ Private deployment storage
  • ✓ Application Insights telemetry

Build and operate

From clone to Copilot-ready

The repository ships the application, Azure infrastructure, M365 agent package, repeatable tests, and policy-aware release automation as one versioned unit.

Terminal · repository root
# Install and validate locally
npm install
npm run build
npm test

# Validate ServiceNow surfaces
npm run preflight:readiness

# Deploy through the human test boundary
npm run release:auto -- \
  --environment snowmcpwidg-dev

# Prepare a repeatable approval demo
npm run demo:seed
npm run demo:verify
  1. Provision ServiceNowCreate the OAuth app and least-privilege integration identity, then establish OIDC trust for OBO.
  2. Provision AzureBicep creates Flex Consumption, Key Vault, private storage connectivity, and observability.
  3. Publish the agentAgents Toolkit validates and updates the existing M365 app package without duplicating OAuth registration.
  4. Prompt-test in CopilotThe automated path stops deliberately where a human starts a new conversation and verifies the experience.

Repository anatomy

One repo, explicit ownership boundaries

Runtime, ServiceNow integration, widgets, infrastructure, tenant packaging, and tests are separated so changes can stay narrow while contract parity remains enforced.

  • src/tools/One MCP tool per module and the central manifest drift guard.
  • src/services/ServiceNow REST, token management, catalog, request, cart, and incident behavior.
  • src/ui/widgets/Self-contained widget sources, host bridge, registry, and generated modules.
  • infra/Azure Flex Consumption, identity, storage, networking, Key Vault, and monitoring.
  • m365-agent/Declarative agent manifest, plugin snapshot, tool declarations, and ATK lifecycle.
  • test/Behavior, auth, manifest parity, widget resources, and structured-content contracts.
Contract invariant

Tool and widget lockstep

A tool change is complete only when runtime registration, Zod schema, minimal manifest, widget binding, tests, and M365 package snapshots agree.

Validation boundary
npm run build
npm test

# v1.2.0 release validation
44 test files
412 tests passing
27 tools · 9 widgets