ServiceNow PDI & the MCP servers
The lab’s namespace-provisioning story has an external backend: a ServiceNow Personal Developer Instance (PDI). It holds the service registry and the request queue; the lab’s MCP servers talk to it; and its most concrete trick is turning a catalog request into a git commit that creates an LDAP group.
Part A — How it is set up
The instance
- A free developer instance, administered by the owner. Its admin
credential is a Vault tenant delivered into CRC
(
secret/lab/servicenow/pdi-admin— vault.md); agent work against it goes through the Table and Catalog APIs, not the classic UI (the API-first pattern is faster and scriptable; browser automation against the PDI is a known dead end here). - The reclaim rule that governs everything: ServiceNow reclaims
an instance after ~10 days without a login. A weekly keep-alive
(Saturday nights — a monthly cadence would not beat a 10-day
limit, a lesson recorded when the schedule was first set) signs in
and confirms the instance is online. If the PDI is ever found
reclaimed, the objects below are recreatable from the build
scripts in
rhels/lab-agentops; nothing else in the lab depends on PDI data.
What lives there
- The BSN registry — the lab’s service-number records for the demo apps.
- The “Create LDAP Group” catalog item. Submitting it fires a
Business Rule that commits one file per group to
rhels/lab-agentops(ldap-groups/<group>.yaml) through the GitHub Contents API and records the commit SHA on the request’s queue row (u_ldap_group_request, statecommitted). - The queue table
u_ldap_group_request— the request’s lifecycle: committed (file landed) → done (group exists). The write-back todoneis done by the lab side (below) as themid.labservice user. - The git side of the loop is the
ldap-group-applyworkflow (identity.md): it reconciles everyldap-groups/file into OpenLDAP, then best-effort PATCHes the matching queue row todone. LDAP is the source of truth once the group exists; a PDI outage never fails the apply — the write-back retries on the next run.
The MCP servers
- The MCP server (agent platform) is the agents’ front door for
namespace provisioning: front door
mcp.rhels.com, deployed on the tooling plane (Argo CD appagentops-mcp-server) with the platform also present on CRC. Agents authenticate with an LDAP bind and receive an opaque session token — agents act through the platform instead of holding cluster credentials. - It is backed by the PDI for the registry/catalog/queue flow;
a snow-sim service (same repo,
services/snow-sim) simulates the same API locally on both planes for exercises that should not touch the real instance. - Its companion workloads on CRC (the
agentopsnamespace) include the CMDB and the PDI-backed request apps for theapp1001family — see workload-cluster.md.
Part B — How to use it
- Request an LDAP group: submit the “Create LDAP Group” catalog
item (or, equivalently and often faster, commit the
ldap-groups/<group>.yamlfile directly — the apply step does not distinguish the author). The group exists when the workflow run is green and a directory search finds it; the queue row reachingdoneis the ServiceNow-side mirror of the same fact. - Check a request’s state: read the queue row through the Table
API (
u_ldap_group_requestby group name):committedmeans the file landed in git and the apply is pending or running;donemeans the group was verified in LDAP by the apply’s write-back. A row stuck atcommittedpoints at the workflow, not the PDI — go read theldap-group-applyrun. - Use the MCP endpoint: authenticate with a directory account (LDAP bind) to get a session token, then call the provisioning tools through it. If a call fails on auth, test the same credentials against the directory itself first (identity.md Part B) — the MCP server has no credentials of its own to be wrong about.
- PDI etiquette: the keep-alive keeps the instance warm; do not create competing keep-alive jobs, and do not “test” the reclaim policy. Any structural change (new table, catalog item, rule) goes through the API-first build scripts so the instance can be rebuilt if it is ever lost.