servicenow-ppm-governance

servicenow-ppm-governance

This MCP server enables AI agents to interact with ServiceNow instances, providing typed tools to query, create, update, aggregate, and run background scripts, with read-only mode and a --doctor connection check.

Category
访问服务器

README

servicenow-ppm-governance

Stage-gate approvals, change-request control and demand intake, built on ServiceNow SPM — plus the MCP server used to build and verify it against a live instance.

Built on a personal ServiceNow developer instance (PDI) with synthetic test data. No employer data, configuration or credentials are present in this repository. The specification it implements is my own.

What this is

Two things that grew together:

1. A PPM governance model (ppm-build/) — a stage-gate lifecycle with a driven approval matrix, snapshot-based change control on project financials, and an M0 qualification gate on demands that converts an approved demand into a project. Roughly 3,000 lines of business rules, client scripts, script includes and the deployment tooling that installs them idempotently.

2. A ServiceNow MCP server (server.js) — the tool that built it. Exposes the instance to an AI agent as typed tools (query, describe, create, update, aggregate, background script), with a read-only mode, response truncation and a --doctor connection check. Everything in ppm-build/ was written, deployed and verified through it. See docs/mcp-server.md.

What got built

Area Detail
Stage gates u_pm_gates table, 26 custom fields, 4 business rules, form sections, numbering, ACLs, navigation
Change requests 4 business rules plus snapshot fields on project_change_request — financials are captured at request time so the approved delta is provable
M0 demand intake 20 fields and 5 business rules on dmn_demand; on full approval the demand converts to a project
Approver matrix u_approver_matrix, keyed on project type + portfolio + phase, driving approver generation across all three record types
Approval rollup One rule on sysapproval_approver covering gates, change requests and demands

Everything is captured in a single update set, so the whole build is portable to another instance.

The engineering log

ppm-build/README.md is the substance of this repository — the run order, every verification result, and the gotchas that cost real time. It records what did not work alongside what did.

A few worth surfacing, because they are the kind of thing you only learn by hitting them:

  • sys_script.name is VARCHAR(40). Longer names truncate silently, so an upsert matching on name= never finds the record and creates a duplicate on every deploy. deploy.js now fails fast on this rather than quietly accumulating rules.
  • Creating a field auto-adds it to the default form section (the platform rule "Add New Column To Form Section"), so fields appear twice after a build unless you re-run the duplicate check.
  • GlideAggregate SUM disagrees with a getValue() loop on the cost plan breakdown columns. The loop is correct. Do not "optimise" it into an aggregate.
  • cost_plan_breakdown.estimate_to_completion is virtual with a calculation script — it cannot be written. actual is read_only but is script-writable.
  • Approvals on an inactive record are voided by the out-of-box "Moot Approvals Upon Cancellation" rule, which filters on active=false. M0 validation therefore blocks requests on a closed demand.

Verification

The build is verified by scripts in the repository, not by inspection — 11_verify.js covers the gate and change-request lifecycle (21 of 22 checks), 12_verify_ajax.js the client-callable path, and 13_verify_m0.js the demand process end to end (20 checks, 0 failures). Results, including the check that did not pass and why, are recorded in the engineering log rather than summarised away.

One example of that honesty being useful: the source specification states that a gate closes when all approvals are granted, but no rule in it actually sets the parent approval field when the sysapproval_approver records all approve. That was confirmed empirically on both record types before a rollup rule was written to close the gap — the alternative would have been assuming the spec was complete and shipping a lifecycle that silently never closed.

Quickstart

Requires Node 18+ and a ServiceNow PDI.

cp .env.example .env
# fill in your instance URL, username and password
node server.js --doctor

Deploy the build:

node server.js --run ppm-build/01_fields.js       # prerequisite fields
node ppm-build/deploy.js                          # business rules + client scripts
node ppm-build/deploy_si.js                       # script includes
node server.js --run ppm-build/03_form_layout.js  # form sections
node server.js --run ppm-build/10_seed.js         # synthetic test data
node server.js --run ppm-build/11_verify.js       # verification

The full 13-step run order is in ppm-build/README.md.

Both deploy scripts are idempotent — re-running them updates in place rather than duplicating.

Run any script against the instance with filtered output:

node server.js --run ppm-build/<file>.js

Repository layout

server.js              MCP server + `--run` CLI for background scripts
ppm-build/
  README.md            the engineering log — start here
  br/                  15 business rules
  cs/                  6 client scripts
  si/                  2 script includes (approver matrix, gate financials AJAX)
  deploy.js            idempotent business rule + client script deployment
  deploy_si.js         idempotent script include deployment
  fetch_si.js          pull an out-of-box script include down for reference
  01–13_*.js           the build and verification scripts, in run order
docs/mcp-server.md     MCP server setup, tools and configuration

ppm-build/oob/ is gitignored. fetch_si.js writes ServiceNow's own out-of-box source there for reference while working; that is the vendor's code, not mine, so it stays local.

Deliberately not built

Two decisions were left open rather than invented, because the specification did not cover them and guessing would have produced governance nobody asked for:

  1. Gate sequencing. Nothing auto-creates the P0 → P1 → P2a → P2b → P3 set for a project, or opens the next gate when one closes. The specification describes a single gate's lifecycle only.
  2. The out-of-box demand Approve button. ServiceNow's own Approve / Reject / Qualify / Screen buttons on dmn_demand only flip state — they do not touch sysapproval_approver and are not wired to M0. Making Approve drive M0 would mean overriding out-of-box behaviour, which is a decision for whoever owns the instance.

Licence

MIT — see LICENSE. ServiceNow is a trademark of ServiceNow, Inc.; this project is not affiliated with or endorsed by ServiceNow.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选