SYNERGY Ivanti MCP v0.3.1
Theme

Ivanti MCP Handbook

An MCP server that gives a model the Ivanti Neurons for ITSM surface — reading records, filing tickets, running the tenant's own quick actions, handling approvals — over stdio, or over HTTP with no authentication, a bearer token or OAuth.

Source repository · Releases · Published handbook

41
tools · full
34
tools · enduser
6
reference docs
4
deploy shapes
56MB
image, pulled
01 — Overview

One process, one tenant

The server signs in to one Ivanti tenant with one API key. Every conversation starts with act_as, naming the person being helped; what happens next depends on whether impersonation is set up.

  • Without impersonation, everything runs as the API key’s account, like a call-centre operator working on someone’s behalf. The person an operation is for is recorded in the record’s Customer field, never inferred from who is talking.
  • With impersonation, act_as opens an Ivanti session as that person: Ivanti applies their own access, and what they create carries their name. See Impersonation.

02 — Quick start

Running in under a minute

Pick the shape that matches how the model will reach the server. Nothing here compiles anything: the image, the chart and the tarball are published builds.

A. Desktop client over stdio

The default. No socket, no AUTH_MODE — the credential is the ability to run the process.

# .env
STDIO_TRANSPORT_ON=true
IVANTI_BASE_URL=https://your-tenant.example.com
IVANTI_API_KEY=your-key

# then, whichever you have:
docker run -i --rm --env-file .env tyrunas/ivanti-mcp:0.3.1
node /opt/ivanti-mcp/dist/index.js
node "C:\Program Files\ivanti-mcp\dist\index.js"

B. One host over HTTP

Loopback only. MCP_BIND defaults to 127.0.0.1 precisely so that exposing the server is a second, deliberate act.

STDIO_TRANSPORT_ON=false
HTTP_TRANSPORT_ON=true
AUTH_MODE=none
MCP_BIND=127.0.0.1
MCP_PORT=3000
MCP_PUBLIC_URL=http://127.0.0.1:3000/mcp
TRUSTED_ORIGINS=http://localhost

C. Container behind a token

The published image is multi-arch, so the same tag runs on both architectures.

docker pull tyrunas/ivanti-mcp:0.3.1
docker run --rm -p 127.0.0.1:3000:3000 --env-file .env \
  -e MCP_BIND=0.0.0.0 \
  -v /run/secrets:/run/secrets:ro \
  --read-only --cap-drop ALL --security-opt no-new-privileges \
  tyrunas/ivanti-mcp:0.3.1

03 — Deploy

Four shapes, one build

The Release workflow publishes a multi-arch image, a Helm chart and a self-contained tarball from the same commit, then creates the release tag from the version in package.json — so whichever shape you pick, it is the same code and version.

ShapeRuns asTransportGet it with
Linux hosta systemd servicestdio or HTTPthe release tarballNode 22 and nothing else — no compiler, no package manager, no registry
Windows hosta Windows service, run by WinSWstdio or HTTPthe same tarballNode 22 or later, plus WinSW to run it as a service
Containerdocker run or composeeithertyrunas/ivanti-mcpmulti-arch, distroless, signed
Kubernetesa DeploymentHTTP onlyoci://ghcr.io/tyrunasj/charts/ivanti-mcpa Helm chart over that same image

Two rules hold whatever the shape. One instance is one tenant — staging, UAT and production are three deployments, not three tenants in one process. And one instance is one audience: full and enduser are different products, and mixing them is how an employee ends up holding an analyst's tool surface.

How every shape starts

Open the configurator, answer its seven questions, and pick where it runs. Download each file it shows into one empty folder — the steps below call it the folder. Browsers may save .env as env; rename it back. Then follow the steps for your shape.

A. Linux host

A systemd service running the release tarball. Install Node 22 or later first — from your distribution (Ubuntu 26.04’s nodejs package is Node 22) or from nodejs.org. Tested end to end on Ubuntu 26.04 with Node 22.22: install, bearer auth, tenant reads, a clean stop, a restart after a crash, and no restart loop on a configuration error.

  1. Configurator: pick Linux, then download .env and ivanti-mcp.service into the folder.
  2. Edit .env: set IVANTI_BASE_URL to your tenant, and — for HTTP — MCP_PUBLIC_URL and TRUSTED_ORIGINS.
  3. Install the release, from the folder:
    curl -fsSLO https://github.com/syn-con/ivanti-mcp/releases/download/v0.3.1/ivanti-mcp-0.3.1.tar.gz
    sudo useradd --system --home /opt/ivanti-mcp --shell /usr/sbin/nologin ivanti-mcp
    sudo install -d -o ivanti-mcp -g ivanti-mcp /opt/ivanti-mcp
    sudo tar xzf ivanti-mcp-0.3.1.tar.gz --strip-components=1 -C /opt/ivanti-mcp
  4. Install the settings and secrets. They are readable by root and the service only; skip the secret lines if you chose Environment for secrets.
    sudo install -d -m 0750 -o root -g ivanti-mcp /etc/ivanti-mcp /etc/ivanti-mcp/secrets
    sudo install -m 0640 -o root -g ivanti-mcp .env /etc/ivanti-mcp/env
    read -rs -p 'Ivanti API key: ' k; printf %s "$k" | sudo install -m 0640 -o root -g ivanti-mcp /dev/stdin /etc/ivanti-mcp/secrets/ivanti-api-key; unset k
    read -rs -p 'Synergy Hub licence key: ' l; printf %s "$l" | sudo install -m 0640 -o root -g ivanti-mcp /dev/stdin /etc/ivanti-mcp/secrets/licence-key; unset l
    # bearer only — give this token to your clients
    openssl rand -hex 32 | tr -d '\n' | sudo install -m 0640 -o root -g ivanti-mcp /dev/stdin /etc/ivanti-mcp/secrets/bearer-token
    # metrics with a token only — Prometheus needs a copy
    openssl rand -hex 32 | tr -d '\n' | sudo install -m 0640 -o root -g ivanti-mcp /dev/stdin /etc/ivanti-mcp/secrets/metrics-token
  5. Install and start the service:
    sudo install -m 0644 ivanti-mcp.service /etc/systemd/system/
    sudo systemctl daemon-reload
    sudo systemctl enable --now ivanti-mcp
  6. Check it:
    systemctl status ivanti-mcp
    journalctl -u ivanti-mcp -n 20          # the startup lines list every tool the key reaches
    curl -s http://127.0.0.1:3000/health    # {"status":"ok"} — HTTP only

The unit runs unprivileged, with a read-only filesystem, no capabilities and a syscall filter. It does not restart on exit 78: a configuration error will still be one in five seconds, so read the journal instead.

B. Container

The published image, run with Docker or Docker Compose. Tested end to end on Ubuntu 26.04 with Docker 29 and Compose 2.40: healthy, uid 65532, read-only, tenant reads, a clean stop, and a restart after a crash.

  1. Configurator: pick Docker, then download .env and compose.yaml into the folder — or docker-run.sh if you do not use Compose.
  2. Edit .env: set IVANTI_BASE_URL to your tenant, and — for HTTP — MCP_PUBLIC_URL and TRUSTED_ORIGINS.
  3. Add the secrets in a secrets folder beside them, owned by the image’s user (uid 65532). Skip this if you chose Environment for secrets.
    mkdir secrets
    read -rs -p 'Ivanti API key: ' k; printf %s "$k" > secrets/ivanti-api-key; unset k
    read -rs -p 'Synergy Hub licence key: ' l; printf %s "$l" > secrets/licence-key; unset l
    openssl rand -hex 32 | tr -d '\n' > secrets/bearer-token    # bearer only — give it to your clients
    openssl rand -hex 32 | tr -d '\n' > secrets/metrics-token   # metrics with a token only — Prometheus needs a copy
    sudo chown 65532:65532 secrets/* && sudo chmod 600 secrets/*
  4. Start it from the folder — docker compose up -d, or the commands in docker-run.sh. Already running an earlier install? Compose knows a deployment by the name: at the top of compose.yaml, not by its folder: starting this one replaces the old one. To upgrade, run it from the old folder; to run a second one beside it, change the name: and the host port first.
  5. Check it:
    docker compose ps
    docker compose logs --tail 20           # the startup lines list every tool the key reaches
    curl -s http://127.0.0.1:3000/health    # {"status":"ok"} — HTTP only

The image is multi-arch (linux/amd64, linux/arm64), about 55 MB to pull, distroless — no shell, no package manager — and runs as uid 65532. Final releases are tagged 1.2.3, 1.2, 1 and latest; pin a digest in production. Before running it, copy the exact cosign verify command from the v0.3.9 release notes. Use cosign 3, or cosign 2.6 with --new-bundle-format added.

Versions through 0.3.9 retain their original signing identity. Releases published after the transfer use https://github.com/syn-con/ivanti-mcp/.github/workflows/release.yml@refs/heads/main. The identity must match the version being verified; renaming the repository does not change an existing signature.

C. Kubernetes

A Helm chart over the same image. It is HTTP-only and runs one replica.

Releases from 0.3.10 publish to oci://ghcr.io/syn-con/charts/ivanti-mcp, which the configurator uses. Versions through 0.3.9 remain at oci://ghcr.io/tyrunasj/charts/ivanti-mcp. After the first release under syn-con, the package owner must make the new chart package public for installation without a registry login. Docker images continue to use tyrunas/ivanti-mcp.

  1. Configurator: pick Kubernetes, then download values.yaml and helm-install.sh into the folder.
  2. Edit values.yaml: server.publicUrl, server.trustedOrigins, ivanti.baseUrl, and the ingress host if you publish it.
  3. Add the secrets in a secrets folder beside them:
    mkdir secrets
    read -rs -p 'Ivanti API key: ' k; printf %s "$k" > secrets/ivanti-api-key; unset k
    read -rs -p 'Synergy Hub licence key: ' l; printf %s "$l" > secrets/licence-key; unset l
    openssl rand -hex 32 | tr -d '\n' > secrets/bearer-token    # bearer only — give it to your clients
    openssl rand -hex 32 | tr -d '\n' > secrets/metrics-token   # metrics with a token only — Prometheus needs a copy
  4. Run helm-install.sh from the folder, a block at a time: it creates the namespace and the Secret, installs the chart, and checks the rollout and /health. Its last blocks — upgrade, restart — are for later.
  5. Remove the local copies once the Secret exists: rm -r secrets. The Secret holds them now.

The chart refuses to render rather than letting you find out later. The server exits 78 on a bad configuration; the chart moves that failure earlier still, to helm install.

RefusedBecause
no server.publicUrl, or one with a trailing slashit is compared verbatim against the token audience
no server.trustedOriginsorigin validation is what stops DNS rebinding
replicaCount > 1, or any sessionAffinitysessions are in memory — see below
mode enduser with an empty allowlistfail-closed, but almost certainly not what you meant
authMode oauth with no issuerdiscovery happens at boot, so this would fail at boot
a secrets.bearerToken under 32 charactersthe server refuses it — a short token can be guessed
authMode none with an ingress, or a LoadBalancer / NodePort Servicethat publishes the whole tool surface unauthenticated
enduser.* settings in mode fullthe server refuses them — employees would get the analyst surface
a plain http:// tenant, ConfigDB, issuer or JWKS URLthe key and the identity would travel in clear; loopback is the one exception
metrics.port equal to server.portwhatever fronts the MCP port must never reach the metrics
metrics.token with secrets.create and a secrets.metricsToken that is empty, under 32 characters, or another secretthe server refuses it — whatever scrapes holds it, so it must reach nothing else
metrics.serviceMonitor.enabled without metrics.enabledit would scrape a port nothing serves

One replica, and that is not laziness. HTTP sessions live in the process’s memory, created on initialize. Scale to two and roughly half of every conversation's requests land on a pod that has never heard of that session. It presents as intermittent client bugs, which is the worst way for it to present. Hashing that header at the ingress does not help: initialize carries no session id, so whichever pod answers it mints one, and a hash of that id reaches the same pod only by chance. The chart refuses replicaCount above 1, and a rollout ends every conversation.

Secrets come from secrets.existingSecret, keys ivanti-api-key, licence-key, bearer-token for bearer auth, and metrics-token with metrics.token: true. Every key mounts at /run/secrets with defaultMode: 0400, and the pod sets fsGroup: 65532 so the image's own user can read them: the ownership trap below, closed by default. secrets.create=true exists for development and puts the values in Helm history, where helm get values will show them. Keys are read once, at startup, and the chart cannot see an existing Secret change: after rotating one, change rolloutToken in the same commit, or run kubectl rollout restart.

A NetworkPolicy admits traffic to the pod from networkPolicy.from only — by default, pods in the release's own namespace. It is on by default exactly when authMode is none (enabled: auto), where nothing else stands in front of the tool surface; with an ingress, add the controller's namespace. It is inert unless the CNI enforces NetworkPolicy, and kubectl port-forward is not subject to it.

Metrics (metrics.enabled: true) get a ClusterIP Service of their own, <release>-metrics, which the Ingress never names. When the NetworkPolicy renders, the metrics port has a rule of its own — peers from metrics.from, empty meaning the release’s namespace — so the ingress controller cannot reach the metrics and a scraper cannot reach the MCP port. Under bearer, the default, and oauth, no policy renders: the metrics port is open to every pod in the cluster unless metrics.token: true, or networkPolicy.enabled: true with metrics.from — set one of them; the chart’s notes warn when neither is. metrics.serviceMonitor.enabled adds a ServiceMonitor (it needs the Prometheus Operator’s CRDs), which sends the token from the Secret when there is one.

Probes are plain httpGet — the only option, since a distroless image has no curl. Startup and liveness ask /health, which answers 200 while the process is alive: restarting a pod over a tenant outage would fix nothing. Readiness asks /ready, which answers 503 once the tenant has failed two checks in a row, a minute apart, so the Service stops routing here until it answers again. The startup probe is generous (two minutes) because boot does real network work: it walks the tenant's base paths against $metadata and opens the ASMX session.

D. Windows host

The same tarball, run as a Windows service by WinSW — Windows cannot run node as a service by itself. Windows Server 2019 or later, with Node.js 22 or later installed for all users. Tested on Windows Server 2025 with Node 24 and WinSW 2.12.

  1. Configurator: pick Windows, then download install.ps1 into the folder. It carries the .env and ivanti-mcp.xml tabs inside it; download those only to read them.
  2. Edit install.ps1 in Notepad: in step 5 of the script, set IVANTI_BASE_URL to your tenant, and — for HTTP — MCP_PUBLIC_URL and TRUSTED_ORIGINS.
  3. Run it in an elevated PowerShell, from the folder. It asks for the Ivanti API key, then downloads and verifies the release and WinSW, locks down the settings, and installs and starts the service.
    powershell -ExecutionPolicy Bypass -File .\install.ps1
  4. Check it — the script ends by printing {"status":"ok"}:
    Get-Service ivanti-mcp
    Get-Content "$env:ProgramData\ivanti-mcp\logs\ivanti-mcp.err.log" -Tail 20
    Get-Content "$env:ProgramData\ivanti-mcp\secrets\bearer-token"   # bearer only — give it to your clients
    Get-Content "$env:ProgramData\ivanti-mcp\secrets\metrics-token"  # metrics with a token only — Prometheus needs a copy
WhereWhat
C:\Program Files\ivanti-mcpthe release, and WinSW as ivanti-mcp.exe with its ivanti-mcp.xml
C:\ProgramData\ivanti-mcpenv, secrets\ and logs\ — readable only by Administrators, SYSTEM and the service
  • It runs as LocalService, not WinSW’s default LocalSystem: it reads its settings and writes only its logs and its licence state.
  • A configuration error restarts every 10 s. WinSW cannot spare exit 78 the way systemd does; the reason is in logs\ivanti-mcp.err.log.
  • Save settings and secrets as UTF-8 or ASCII. Windows PowerShell 5.1’s > writes UTF-16, which the server reads as a different value.
  • A tenant certificate from an internal CA needs --use-system-ca in the service’s arguments (Node 22.15 or later): otherwise Node does not read the Windows certificate store.
  • On the Ivanti server itself, keep MCP_BIND=127.0.0.1, and put IIS in front for TLS if clients elsewhere need it.

How much memory it needs

About 104 MiB idle, plus ~64 KiB per open session — 167 MiB with 1,000 sessions held open.

12825638451200 sessions — 104 MiB resident1040100 sessions — 107 MiB resident107100200 sessions — 118 MiB resident118200300 sessions — 119 MiB resident119300400 sessions — 132 MiB resident132400500 sessions — 132 MiB resident132500600 sessions — 144 MiB resident144600700 sessions — 144 MiB resident144700800 sessions — 156 MiB resident156800900 sessions — 155 MiB resident1559001000 sessions — 167 MiB resident1671000chart default limit — 512Mirequest — 192MiResident memory (MiB)Concurrent sessions
Resident memory (MiB) against open sessions: the 0.3.1 image on Ubuntu 26.04 (Node 22.23), mean of two runs, the tenant’s catalog loaded, no tool call in flight. Dashed lines: the Helm chart’s request and limit.

The chart’s defaults fit: the 192Mi request holds even 1,000 idle sessions, and the 512Mi limit is headroom for sessions that are working. MCP_MAX_SESSIONS (default 100) caps the count; at the cap, the least recently used idle session is closed, and 503 comes only when every session is busy.

Four things that bite

  • The tenant hostname must resolve where the server runs. Split-horizon DNS can hand a container an address it cannot reach — pin it with --add-host, compose’s extra_hosts, the chart’s hostAliases or the host’s hosts file.
  • MCP_BIND=0.0.0.0 inside a container or pod — loopback there is the container’s own.
  • package.json must sit next to dist/, or the server refuses to start. A container that starts and exits is usually this.
  • The health check passes when HTTP is off — a stdio deployment has nothing to check.

Secrets

Every secret also takes a _FILE form (BEARER_TOKEN_FILE, IVANTI_API_KEY_FILE); setting both is an error. Prefer files anywhere but a laptop — the environment shows in docker inspect and kubectl describe pod.

The image runs as uid 65532, and a mounted file keeps its host ownership: a mode-600 secret you own is unreadable, and the server exits 78 with EACCES. Fix: chown 65532:65532 secrets/* && chmod 600 secrets/*. The Helm chart sets fsGroup, so this does not apply there.

Hardening

What each credential reaches, and so what losing it costs:

CredentialReaches
IVANTI_API_KEYEverything its Ivanti account can do, as that account — every tool, for every person the server acts for. With admin rights, every record.
IVANTI_CENTRAL_CONFIG_API_KEYThe most sensitive. CentralConfig answers it with the tenant’s database credentials, and it opens a session as any enabled person.
BEARER_TOKENThe whole tool surface, for anyone who holds it — one shared identity.
METRICS_TOKENThe metrics, and nothing else. Which is why it must be none of the others: the server refuses one equal to BEARER_TOKEN or an Ivanti key.
  • AUTH_MODE=oauth for anything shared beyond one team. bearer for a small, known group; none on loopback only.
  • TLS in front, always. The server speaks plain HTTP: keep it on 127.0.0.1 (or unpublished in a cluster) behind a proxy or ingress that terminates TLS.
  • Secrets as files, with the permissions the Deploy steps set — never inline in an environment others can read.
  • The API key’s account on the least privilege that covers the work, and enduser for employees rather than full.
  • Impersonation for per-person access, with IVANTI_IMPERSONATION_REQUIRED=true where the promise is that Ivanti scopes every answer.
  • Metrics off on anything internet-facing — METRICS_ON=false, the default — unless something private scrapes them. When on: loopback or a NetworkPolicy, plus METRICS_TOKEN, and never route the metrics port through the ingress or proxy in front of MCP.
  • The exact origins in TRUSTED_ORIGINS, and LOG_LEVEL=info in production — debug logs every query, which is personal data.
  • Pin the image by digest and verify it with the exact cosign command in the release notes linked above. Every image is scanned before it is published and refused on a critical or high finding that has a fix; each carries an SBOM and build provenance: docker buildx imagetools inspect tyrunas/ivanti-mcp:0.3.1 --format '{{ json .SBOM }}'.

Watching it

/health answers whether the process is alive; /ready whether it can serve — 503 once the tenant has failed two checks in a row, a minute apart. Point a load balancer’s health check at /ready. Both answer anyone; an authorized caller also sees why and when.

Logs are JSON lines on stderr. The ones worth an alert, by message:

MessageLevelMeans
ivanti not answering; not ready for trafficwarnThe tenant stopped answering this key. Alert at once.
ivanti unavailablewarnA tool call got no answer, a 5xx or a 401 from Ivanti. Alert on a burst.
refusing new session, cap reachedwarnClients are getting 503: raise MCP_MAX_SESSIONS or look for a client leaking sessions.
ivanti request cap reached; request not sentwarnEvery slot to the tenant stayed busy: raise IVANTI_MAX_CONCURRENT_REQUESTS if the tenant has room, or look for what is flooding it.
tool call rate limitedwarnA conversation passed MCP_MAX_CALLS_PER_MINUTE — usually a model stuck in a loop.
rejected unauthorized requestwarnA missing or wrong token. A burst is a misconfigured client — or someone guessing.
rejected request with untrusted originwarnA web client whose origin is not in TRUSTED_ORIGINS.
ivanti write did not storeerrorIvanti accepted a write and kept something else. Worth a look every time.
tool failed · uncaught exception · unhandled rejectionerrorA fault in the server itself. Worth a report every time.

Metrics

Off by default. METRICS_ON=true opens a listener of its own: GET /metrics in Prometheus text format, on METRICS_PORT (required when on — there is no default; 9464 throughout this page), bound to 127.0.0.1 unless METRICS_BIND says otherwise. It is never the MCP port — every credential guarding that port reaches the tools, so a scraper would have to hold one, and whatever fronts it must never route here. The configurator writes the settings for each shape.

ShapeTurn it onPrometheus scrapes
DockerMETRICS_ON=true, with METRICS_BIND=0.0.0.0 inside the containerthe publish address — 127.0.0.1:9464 on the host — or ivanti-mcp:9464 from a container on the same network
Kubernetesmetrics.enabled: truethe Service <release>-metrics:9464, or a ServiceMonitor with metrics.serviceMonitor.enabled: true
Linux, WindowsMETRICS_ON=true in the env file127.0.0.1:9464; from elsewhere, METRICS_BIND=0.0.0.0 with a token and a firewall rule that admits only it

What it carries is tool names, outcomes, HTTP methods and statuses, and timings — never a person, a filter, a record or ticket text. Error rates by tool still say what a deployment is used for, so keep the port close, and set METRICS_TOKEN whenever it is reachable from beyond the machine. It answers only GET and HEAD on /metrics, and refuses any browser with 403, so a web page cannot read it through DNS rebinding.

MetricWhat it says
ivanti_mcp_tool_calls_totaltool, outcomeTool calls. outcome is ok, error, or what ended the call: a refusal by name (IdentityRequiredError, RateLimited), ivanti 503, fault.
ivanti_mcp_tool_call_duration_secondstool · histogramHow long a call took, start to answer.
ivanti_mcp_ivanti_requests_totalmethod, statusRequests to the tenant. status="0" is one that got no answer.
ivanti_mcp_ivanti_request_duration_secondsmethod · histogramHow long the tenant took to answer.
ivanti_mcp_ivanti_requests_not_sent_totalRequests that waited out their timeout for a slot under IVANTI_MAX_CONCURRENT_REQUESTS, and were never sent.
ivanti_mcp_ivanti_requests_in_flight
ivanti_mcp_ivanti_requests_waiting
Requests to the tenant now, and waiting for a slot.
ivanti_mcp_ivanti_ready1 or 0 — what /ready reports. Absent without HTTP, or without Ivanti configured.
ivanti_mcp_sessionsHTTP sessions held now.
ivanti_mcp_sessions_evicted_total
ivanti_mcp_sessions_refused_total
Idle sessions closed to make room at the cap; new ones refused with 503 because every session was busy.
ivanti_mcp_http_requests_rejected_totalreasonHTTP requests refused before MCP: origin or unauthorized.
ivanti_mcp_build_infoversion, mcp_modeAlways 1: which build and mode is running.
process_resident_memory_bytes
nodejs_heap_used_bytes
process_start_time_seconds
Memory, the V8 heap, and when the process started.

Scraping it. With a token, Prometheus reads its own copy of it from a file; older versions spell that bearer_token_file.

# prometheus.yml
scrape_configs:
  # On the same host, no token
  - job_name: ivanti-mcp
    static_configs:
      - targets: ['127.0.0.1:9464']

  # From elsewhere, with METRICS_TOKEN set
  - job_name: ivanti-mcp-remote
    authorization:
      credentials_file: /etc/prometheus/secrets/ivanti-mcp-metrics-token
    static_configs:
      - targets: ['mcp-host.example.com:9464']

Alerts worth having — the first is the one to page on.

groups:
  - name: ivanti-mcp
    rules:
      # The tenant failed two checks in a row; /ready answers 503.
      - alert: IvantiTenantNotAnswering
        expr: ivanti_mcp_ivanti_ready == 0
      # More than 5% of requests to Ivanti got no answer or a 5xx.
      - alert: IvantiErrors
        expr: |
          sum(rate(ivanti_mcp_ivanti_requests_total{status=~"0|5.."}[5m]))
            / sum(rate(ivanti_mcp_ivanti_requests_total[5m])) > 0.05
        for: 10m
      # Requests gave up waiting for a slot: raise IVANTI_MAX_CONCURRENT_REQUESTS, or find the flood.
      - alert: IvantiRequestsNotSent
        expr: increase(ivanti_mcp_ivanti_requests_not_sent_total[5m]) > 0
      # Clients got 503: every session was busy at MCP_MAX_SESSIONS.
      - alert: McpSessionsRefused
        expr: increase(ivanti_mcp_sessions_refused_total[10m]) > 0
      # A conversation passed MCP_MAX_CALLS_PER_MINUTE — usually a model in a loop.
      - alert: McpCallsRateLimited
        expr: sum by (tool) (increase(ivanti_mcp_tool_calls_total{outcome="RateLimited"}[10m])) > 0

04 — Configure

Build your configuration

Answer seven questions and every file you need appears — the .env, the run command, the compose service, the Helm values, the systemd unit, the Windows service — with only the keys and flags that apply. The same seven answers cover all four deployment shapes. The server fails closed: an incomplete configuration exits 78 and prints every problem at once, not just the first.

How is it reached
Who may connect
Who is it for
Secrets
Tenant DNS
Exposure
Metrics

…

05 — Every setting

Environment reference

Every variable the server reads, plus the few of Node’s own that matter to it. They are loaded once at startup and checked as a set, so a bad combination stops the server before it serves anything.


06 — OAuth providers

The only door that carries a verified identity

Under bearer, everyone holding the token is the same anonymous caller. Under oauth the token says who, and the person a conversation is helping stops being a claim it makes about itself. Three settings usually do it; the difficulty is entirely in what each provider decides to put in the token.

The audience is not your URL, and this is the commonest reason OAuth “doesn’t work” here. The spec has clients send resource=<your MCP URL>, which reads as though aud will then contain that URL. No mainstream provider works that way. So OAUTH_AUDIENCE is set independently of MCP_PUBLIC_URL: it is a comma-separated list, the token's own aud may itself be an array, and a token is accepted when the two sets intersect. A verifier written to the spec's literal wording rejects every real token.

ProviderWhat actually lands in audThe thing that will catch you
Entra IDdepends on the token versionv2: the API's client-id GUID · v1: the App ID URICannot be tested against localhost at all — see below
Zitadelthe client idToken type defaults to Bearer, which is opaque. Set Auth Token Type: JWT on the application
Oktathe authorization server's AudienceUse a custom authorization server — the org one issues opaque tokens
Keycloakthe client idDefault aud is account. Add an Audience mapper on the dedicated client scope
Auth0the API identifierOpaque unless a Default Audience is set tenant-side; its issuer ends in a trailing slash
JumpCloudthe client idNo dynamic registration — pre-register and pin the client id
Google—Not usable. Access tokens are opaque and there is no introspection endpoint

Nearly every failure is one of two shapes. An opaque token — the server answers “Access token is opaque, not a JWT”, and a JWKS verifier genuinely cannot inspect one: there is no header and no signature to check. That is always a provider setting, never a server one. Or the wrong audience, where the token is perfectly valid and simply was not minted for you. Decode it and read its real aud before changing anything else.

Entra is the exception, in four separate ways

It is the majority deployment and the one that behaves least like the others. None of these is something you can configure your way around.

  • Its audience depends on the token version you asked for. With requestedAccessTokenVersion: 2 the aud is the API's client id — a bare GUID. On v1.0 tokens it is the Application ID URI, api://<appId>. Both are correct; they are different strings, and putting the wrong one in OAUTH_AUDIENCE produces a valid token that this server refuses. Check the registration before assuming which you have.
  • It cannot be tested against a local server. Entra requires the resource to be a registered Application ID URI, and a conforming client separately insists the resource equals the endpoint it connected to. http://localhost:3000/mcp can never satisfy both — deploy to a public HTTPS name on a verified domain first, and then the App ID URI, MCP_PUBLIC_URL and the endpoint are one identical string. The api:// scheme takes a GUID that must match the app or tenant id, or an arbitrary string that must sit on a verified custom domain or the tenant's initial domain; api://<appId> is the recommended form.
  • Discovery only resolves on the third probe. Its issuer carries a path (…/{tenant}/v2.0), and the two path-insertion forms answer 404 — only appending /.well-known/openid-configuration to the issuer works. An implementation that tries fewer candidates cannot reach Entra at all.
  • It publishes no code_challenge_methods_supported — alone among ten providers measured here — while supporting PKCE S256 in practice. The spec says a client MUST refuse to proceed when that field is absent, so whether a given client tolerates it is decided on the client side and cannot be fixed from this end.

One app registration is enough: it can expose the API and act as the client. And if Custom domain names refuses to verify while your DNS is demonstrably correct, the domain is almost certainly claimed by another Microsoft tenant — often an unmanaged one created when somebody signed up for a free service using an address at that domain. That is a takeover case, not a DNS problem.

What to set

Discovery is the default: give it the issuer and the authorization-server metadata is fetched at startup, in the spec's probe order.

AUTH_MODE=oauth
OAUTH_ISSUER=https://login.microsoftonline.com/<tenant-id>/v2.0
OAUTH_AUDIENCE=<the API's client id, for a v2.0 token>

# Optional. Setting it skips discovery entirely — which is what you want when a
# provider publishes its metadata somewhere the spec's probe order does not look.
OAUTH_JWKS_URI=https://login.microsoftonline.com/<tenant-id>/discovery/v2.0/keys

# Which claim names the person. Entra sends preferred_username or upn, most
# others send email, and sub is opaque. Unset: email, but only with
# email_verified: true, then preferred_username, then upn. Set, it is used
# as-is — so name a claim users cannot edit in their profile.
OAUTH_IDENTITY_CLAIM=preferred_username

Assume the provider does not support dynamic client registration. Half of those surveyed do not, so a pre-registered client with a pinned client id is the documented path. Pinning also closes a Zitadel-specific trap: registration there creates a fresh application each time, which inherits the instance default of Bearer — so flipping one application to JWT lasts exactly until the next re-authentication makes another.

The redirect URI is not ours. It is where the provider sends the user back after login, so it belongs to the client application; this server neither hosts one nor ever sees it. MCP_PUBLIC_URL is always this server's own externally visible address. Confusing the two is the second-commonest setup failure — and a loopback redirect is not a “dev mode”, it is simply what a client running on somebody's own machine legitimately uses.

This server verifies tokens with JWKS and nothing else. It never mints a token, serves no registration endpoint and hosts no client metadata document: registration is strictly between the client and the authorization server. Token introspection is deliberately deferred rather than forgotten — across ten providers measured, jwks_uri was universal while introspection was absent on four, Entra included.


07 — Audience modes

full and enduser are different products

Chosen at startup; never mix audiences in one instance. Tool narrowing happens at registration, never inside a handler — an unregistered tool never appears in tools/list, so the model cannot call it at all.

 fullenduser
AudienceIT staffEmployees
Tools4134 no role switching, assigned-work, saved searches, preview-delete or link/unlink
Business ObjectsAll the credential can seeENDUSER_BUSINESS_OBJECTS a gate, not a hint — empty means none
act_asA gate, and decides who “my” meansA gate, and whose records these are
Before act_asEvery tool but act_as refusesEvery tool but act_as refuses
RecordsAnyone's — an analyst works other people's ticketsOwn records only; someone else's is refused related rows are checked one by one, and no write may hand a record to someone else or rewrite CreatedBy
Quick actionsEverything the role offersENDUSER_QUICK_ACTIONS by name, on own open records only
AttributionThe service account impersonating: the personCreatedBy is stamped with the pinned person

The act_as rows are the ones that catch people out. Without impersonation, anything Ivanti resolves "for the current user" — a saved search called “My Incidents”, an approval queue, an assignment — answers for the service account, not for whoever is chatting; with it, it answers for the person. Call act_as once per conversation to say who you are helping — in both modes it is the first call, and every other tool refuses until it succeeds. Under AUTH_MODE=oauth the token already names the person, so the first call pins them without being asked, and the model is not told to ask.

Name quick actions, never pattern-match them. They are the tenant's own text and a tenant renames them freely. An admin key sees every action the tenant defines, including escalation notifications and analyst-only composites — read them off list_quick_actions in full mode and copy the handful an end user should have.

A shared token grants its whole tool surface to everyone who can use it. Size the audience to the surface: pair a widely-shared bearer token with MCP_MODE=enduser.


08 — Impersonation

Signing in as the person

By default the server works as one API user, and act_as only says who “my” means. Given a ConfigDB key, act_as opens a real Ivanti session as that person instead. Optional, and off by default: set neither setting and nothing changes.

Then it really is them. With IVANTI_CONFIG_URL and IVANTI_CENTRAL_CONFIG_API_KEY set, act_as opens an Ivanti session as that person and Ivanti applies their own access — a self-service role sees only its own records, where the same request as an analyst sees them all — and a ticket they raise carries their name in CreatedBy rather than the service account’s.

Every surface follows the person: records, forms, pick lists, quick actions, and a service request with a file attached — measured, the request and its attachment both carry the person’s name in CreatedBy. What stays on the service account does so because it describes the tenant rather than the person: the schema, the admin catalog, the person directory. And the server’s own checks still run — the object gate and the ownership rules — because a second, independent line is worth keeping even where Ivanti draws the first.

If the session cannot be opened, the call is refused rather than quietly answered as the service account: being told the wrong person’s data is yours is worse than being told nothing.

Which role the session opens under

 fullenduser
RoleThe one Ivanti made active, or IVANTI_IMPERSONATION_ROLE refused when the person does not hold it, never silently weakenedENDUSER_ROLE, default SelfServiceMobile if the person holds none, the active role is kept and a warning names both
Changing itswitch_role, mid-conversationFixed

What to set

IVANTI_CONFIG_URL=https://config-<tenant>/
# From the ConfigDB tenant: Configure → Security Controls → API Keys →
# CentralConfigApiKey. NOT the tenant API key — CentralConfig answers it with
# the tenant's database credentials, so guard it accordingly.
IVANTI_CENTRAL_CONFIG_API_KEY_FILE=/run/secrets/ivanti-central-config-key

# Optional. Exit 78 rather than run as the service account when the ConfigDB
# does not answer at startup.
IVANTI_IMPERSONATION_REQUIRED=true

Every setting, with its default, is under Every setting → Impersonation.

When the session dies

An impersonated session ends without saying so. It lapses or the tenant evicts it, and every later call as that person answers 401. Re-opened once for the same login. A read is retried on the new session; a write is reported rather than repeated, because part of it may already have gone through. It never falls back to the service account.

When it does not work

SymptomCause
Ivanti has no enabled user named XNot a typo in the login. CentralConfig opens a session only for an account whose Disabled bit is clear — and Disabled is a different field from Status. An account can read Status: Active and still be disabled. Enable the account rather than hunting for a misspelling.
impersonation configured but unavailableAt startup: the ConfigDB answered 401 (wrong key — it comes from the CentralConfigApiKey group and is not the tenant API key) or could not be reached. Not fatal; the server keeps running and act_as keeps its ordinary meaning — unless IVANTI_IMPERSONATION_REQUIRED=true, which exits 78 instead.
Impersonation is on, every act_as still failsThe startup probe validates the key, not the tenant: GetTenantTimeout answers 200 with a default for a tenant it has never heard of. Check that IVANTI_BASE_URL’s hostname is the tenant CentralConfig knows.
A form, pick-list or quick-action call answers 551 while impersonatingThe session was never activated: Session.asmx/SelectRole must be called after InitializeSession, even naming the role it already reported, or every Workspace.asmx and service-catalog method refuses. The server always calls it; a 551 here means that changed.

Why it exists: how enduser answers “my records”. This was open between a read-back scoped to the session and a fully identity-backed query. It is now the second, where the tenant allows it: given IVANTI_CONFIG_URL and IVANTI_CENTRAL_CONFIG_API_KEY, act_as opens a real Ivanti session as that person and Ivanti applies their own access to it. Set neither and the previous behaviour is unchanged — the server’s own ownership checks run either way, and are not relaxed by this.


09 — Tool reference

The surface, tool by tool

Read from the running server. Descriptions are what the model actually receives; the badges are the MCP annotations that tell a client how much care a call deserves.

Audience

10 — Reference docs

Six documents, fetched on demand

Served as MCP resources rather than baked into tool descriptions. Descriptions carry what is dangerous not to know; resources carry what is expensive to repeat — and cost nothing until something reads them.

Resources narrow the way tools do. A document naming a tool this deployment does not register would be worse than no document, because a model cannot tell “not registered here” from “you called it wrong”.


11 — What a session costs

Where the context window goes

What the server costs a model’s context window, in three parts.

The standing cost, paid once per session

The server’s instructions and its tool list — every tool’s description and arguments — arrive before the model has asked anything, and are sent again with every new conversation. An enduser deployment registers fewer tools, so it sends less.

On demand — paid only if something reads it

Reference material lives in MCP resources rather than in the tool descriptions precisely so it is not part of that standing cost. A model fetches one only when it needs it, and most sessions fetch none.

Per call — the part that can ruin a window

Response size dwarfs everything above, and it is the one term you control per call.

A default page of twenty-five full records can cost several times the entire tool list, from a single list_records — a full Ivanti record carries every field its object has. That is why rows default to a compact field set and the response tells you which one it used; asking for fields explicitly is cheaper still.


12 — Limits

What it will not do

Two different things get confused with each other: a limit you must design around, and a door deliberately closed. They are separated here, and the closed ones carry their reason — a refusal without one is indistinguishable from an oversight.

Known limits

LimitWhat it means in practice
Opaque access tokens are refusedVerification is JWKS only. Google is unusable — its access tokens are opaque and it publishes no introspection endpoint. Zitadel, Okta and Auth0 each issue opaque tokens until a provider-side setting is changed; see section 06.
Entra publishes no code_challenge_methods_supportedAlone among ten providers measured, while supporting PKCE S256 in practice. The spec says a client MUST refuse to proceed when that field is absent, so whether it works is decided in the client and cannot be fixed here.
Entra cannot be exercised against a local serverIt requires the resource to be a registered Application ID URI; a conforming client requires it to equal the endpoint. http://localhost satisfies neither, so Entra work starts at a public HTTPS name on a verified domain.
HTTP sessions live in memoryOne replica. initialize carries no session id, so nothing can route a session back to the pod that minted it; scale out and roughly half of every conversation's requests reach a pod that has never heard of the session — which presents as intermittent client bugs.
Protocol 2025-11-25The MCP protocol revision this server speaks. A client that needs a newer revision's features will not find them here, whatever the specification says.
Attachments are capped at 2 MBUploads travel as base64 in a tool call, so the bytes cross the model's context twice. A larger file is refused rather than silently truncated. Reading one is capped too, and judged before a byte is fetched: an image at 1 MB, any other file at 5 MB, and a format no model can read is refused by its name.

Decided against

These are not gaps. Each was considered, tested where testable, and turned down for a reason that still holds.

Not plannedBecause
Several tenants in one processThe process boundary is a better fence than code: a tenant cannot leak across a boundary that does not exist in the first place. It would also put a tenant argument on all forty-one tools, where forgetting it once is a silent write to the wrong tenant. Staging, UAT and production are three deployments. Revisit if per-tenant deployments ever cost more than the isolation is worth — the opposite of the handful-of-environments case this was decided against.
Per-user Ivanti API keysNot provisionable at tens of thousands of employees.
A read-only gate for productionProduction is where the work happens. A switch that makes the useful deployment useless gets turned off.
A roles and permissions system in the serverOnly oauth could feed it a real identity, and the MCP annotations plus the client's own approval flow already cover the ground.

13 — Troubleshooting

Symptom to cause

Signing in as the person has its own table, under Impersonation.

SymptomCause
Startup exits 78Incomplete or unsafe configuration. Every problem is listed at once — fix them all. Rules a configuration that used to start can now trip on: a bearer token under 32 characters, any ENDUSER_* setting under MCP_MODE=full, and http:// for the tenant, ConfigDB, issuer or JWKS URL anywhere but loopback.
Container starts, then exitspackage.json is missing next to dist/. The server refuses to report a placeholder version.
Access token is opaque, not a JWTThe IdP is issuing reference tokens. Zitadel per-app default, Okta's org authorization server, or Auth0 without an audience parameter.
Access token was not issued for this serverOAUTH_AUDIENCE mismatch — almost always the first thing to check. Decode the token and read its real aud.
Access token was signed by an unknown keyA JWKS problem, or the issuer is not who you configured.
Could not discover authorization server metadataWrong OAUTH_ISSUER, or the IdP publishes metadata somewhere the spec's probe order does not look. Set OAUTH_JWKS_URI to skip discovery.
the token carries no claim naming the personUnder oauth: the token has no preferred_username or upn, and its email is not marked email_verified: true — an unverified address is never used. Set OAUTH_IDENTITY_CLAIM to a claim your users cannot edit.
MCP_PUBLIC_URL must not end with a trailing slashThe resource identifier is compared verbatim against the token audience.
Client keeps registering new appsIt is using dynamic client registration. Pin it with --client-id — and a running client reads its config at startup, so restart it.
Everything looks right, still 401Cached credentials from before the fix. Clear the client's stored authentication and re-authenticate.
Too many active sessions, and none has been idle long enough to closeA 503 on initialize: every session under MCP_MAX_SESSIONS had traffic in the last minute or has a request in flight, so none could be displaced. Retry-After says when one could. Raise the cap if that is the real load.
whether it was applied is unknownA write got no answer — it outlasted IVANTI_WRITE_TIMEOUT_MS, or a gateway answered 502 or 504. It may have been stored: check the record before repeating it. If such writes keep turning out to have taken effect, raise the write timeout.
The pod is running but not ready, or a load balancer marks the server downThe tenant has not answered two checks in a row: /ready answers 503, and the log says ivanti not answering; not ready for traffic with the reason. It recovers on its own once the tenant answers.
A container keeps restartingUsually a configuration error: the server exits 78, and Docker’s restart: unless-stopped starts it again, backing off each time. docker compose logs shows the reason.
A Windows service restarts every 10 sA configuration error: the server exits 78, and WinSW restarts anything that fails. The reason is in C:\ProgramData\ivanti-mcp\logs\ivanti-mcp.err.log.
Startup fails with unable to get local issuer certificate or self-signed certificate in certificate chainThe tenant’s certificate comes from a CA Node does not bundle — usually an internal one. Add --use-system-ca (Node 22.15 or later) so Node trusts the host’s certificate store, or point NODE_EXTRA_CA_CERTS at the CA’s PEM file.
A tool is missing from tools/listEither the mode does not register it, or the API key cannot reach what it needs. The startup log lists every tool this key reaches.
/metrics answers 403 in a browserBy design: a request carrying Origin or Sec-Fetch-Site comes from a browser, and refusing it stops a web page reading the port through DNS rebinding. Use curl, or Prometheus.
/metrics answers 401METRICS_TOKEN is set, and the scraper sent no token or another one. Check that the file in Prometheus’s credentials_file holds the same token.
Startup exits 78 naming METRICS_PORT or METRICS_TOKENJudged only while METRICS_ON=true: METRICS_PORT equal to MCP_PORT with HTTP on, a token under 32 characters, or a token equal to BEARER_TOKEN or an Ivanti key. METRICS_ON=false also clears it.
cannot listen for metricsExit 1, with the reason. The port is taken — under stdio, often by another client’s copy of the server — or METRICS_BIND is not an address of this host.
metrics listen beyond this machine with no tokenA warning: METRICS_BIND is not loopback and no token is set. Expected in a container published on the host’s 127.0.0.1, or a pod behind a NetworkPolicy — the server cannot see either. Otherwise, set METRICS_TOKEN.

Raise the log level to debug for one line per MCP request — method, tool, session and the authenticated subject — and one per Ivanti request: path, query, status, duration, and Ivanti's own error body when it fails, each stamped with the tool call that caused it. debug carries personal data (a filter names people): turn it on to diagnose, not as a standing setting. Tool arguments and the values of a write are never logged — a write's audit line names only the record it was aimed at, by id — and an asserted identity is never logged as though it were a fact.

At info every tool call also writes a tool finished line — outcome, sizes, Ivanti requests.