Inforcer MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Inforcer MCP Serverwhat's the alignment score for Contoso's tenant?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Inforcer MCP Server
An MCP server for the Inforcer public API, the Microsoft 365 baseline management platform MSPs use to keep client tenants aligned to a standard. It lets an AI agent read managed tenants, baselines and alignment scores, a tenant's policies, Secure Score, Entra users / groups / roles and the activity log and, on explicit request, run assessments and queue reports. Nothing it does changes tenant policies.
Transport: MCP Streamable HTTP at
POST /mcp, health probe atGET /healthStateless and multi-tenant: credentials arrive on every request as HTTP headers and are never stored; every tool is listed from the first
tools/listAlso provides three MCP prompts:
alignment-review,tenant-drift-detail(tenant),identity-posture-check(tenant)Python 3.12, uv, FastMCP, httpx
License: Apache-2.0, Copyright 2026 MSPbots.ai
Authentication headers
Header | Required | Type | Default | Allowed values | Description | Example |
| Yes | string | none |
| Region hosting your Inforcer account |
|
| Yes | string | none | - | Inforcer API key |
|
Where to get them: an Inforcer API key is issued with scopes. Read-only use needs
Tenants.Read (or the narrower Baselines.Read, AlignmentScores.Read, tenants.policies.Read,
Tenants.Users.Read, Tenants.Groups.Read, Tenants.Roles.Read, Tenants.SecureScores.Read),
plus Audit.Read, Assessments.Read and Reports.Read; Assessments.Run and Reports.Run are
needed only for the two run tools.
How the key is sent to Inforcer: every call goes to https://api-{region}.inforcer.com/api/beta/...
with the key in the Inf-Api-Key header.
A request to /mcp without both headers gets HTTP 401 naming the missing one; an unknown region
gets HTTP 400.
Related MCP server: Entra ID SecOps MCP Server
Tools
All tools return a JSON string. A tenant argument accepts the numeric Client Tenant ID, the
Microsoft tenant GUID, the tenant DNS name or its exact friendly name (an ambiguous name returns
the matching ids). write marks tools that create work in Inforcer.
Area | Tools |
Overview |
|
Tenants |
|
Baselines |
|
Alignment |
|
Policies |
|
Secure Score |
|
Identity |
|
Audit |
|
Assessments |
|
Reports |
|
Errors come back as a JSON envelope instead of an exception:
{"error": {"code": "unauthorized", "message": "Inforcer returned HTTP 403 for beta/tenants/139/policies: Client tenant verification failed", "retryable": false}}code is one of not_configured, unauthorized, not_found, invalid_argument,
rate_limited, upstream_error. Inforcer can also answer HTTP 200 with success: false; that
is reported as an error too. Reads are retried with backoff on 429, 5xx and network errors;
writes only on 429.
Run locally
uv sync
uv run python -m inforcer_mcp # listens on 0.0.0.0:8080or with Docker:
docker build --platform linux/amd64 -t inforcer-mcp:dev .
docker run --rm -p 8080:8080 inforcer-mcp:devConfiguration (environment variables, all optional): MCP_HTTP_HOST (default 0.0.0.0),
MCP_HTTP_PORT (default 8080), LOG_LEVEL (default INFO). Credentials are never read
from the environment.
Testing example
# list tools
curl -s http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Inforcer-Region: us" \
-H "X-Inforcer-Api-Key: your-inforcer-api-key" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
# alignment of one tenant
curl -s http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "X-Inforcer-Region: us" \
-H "X-Inforcer-Api-Key: your-inforcer-api-key" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"inforcer_alignment_details","arguments":{"tenant":"example.onmicrosoft.com"}}}'Unit tests (no network access needed):
uv run pytestDelivery notes
Tool count (24) and prompts (3). Kept as is because the names are an existing contract.
API source. Inforcer does not publish public API documentation; routes, parameters and envelopes follow Inforcer's own OpenAPI document ("inforcer | Public API") as captured by the MIT-licensed community PowerShell module InforcerCommunity, and its API reference.
Alignment details fixed. The API requires the baseline to compare against (
customBaselineId); older versions never sent it.inforcer_alignment_detailsnow takes an optionalbaseline(GUID or exact name) and, when omitted, uses the only baseline the tenant is a member of, or lists the candidates.Report run status reads the run's status from the run list and fetches outputs only for finished runs (the outputs route answers 404 while a run is pending, failed or unknown).
Report downloads stay small. csv / html / json outputs are returned as text (first 15,000 characters); a PDF is returned as base64 only when under 10 KB, otherwise its metadata with a note. Older versions inlined any file as base64.
Smaller results. The tenant list leaves out each tenant's policy diff text and licenses (
inforcer_tenants_gethas them); the policy list leaves out the full policy settings unlessinclude_settingsis true; baselines report their policy item count instead of the items.New optional parameters:
baselineon alignment details,useron audit search,include_settingson the policy list.Tenant names must match exactly (case-insensitive); an ambiguous name returns the matching ids instead of picking one.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only MCP access to a documented IT fleet: state, changes, posture. 15 tools.
Read-only finance and operations controls for AI agents with evidence and safe next actions.
CTEM for your Trusteed tenant: security summary, findings, compliance gaps, and scans via OAuth.
Assess AI-discovery readiness, plan visibility fixes, and summarize scan evidence. Read-only.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to inspect and audit Azure Landing Zones by inventorying resources, auditing tagging, evaluating policy compliance, and detecting infrastructure drift, all in read-only mode.-
- AlicenseAqualityBmaintenanceEnables security analysts to investigate Microsoft Entra ID security logs through natural language, exposing read-only tools for user context, sign-ins, risky users, risk detections, directory audits, and conditional access policies.6MIT
- AlicenseAqualityBmaintenanceEnables AI agents to read Microsoft 365 tenant data, such as users, license usage, and stale accounts, while enforcing least-privilege by refusing to run with excessive Azure permissions.4MIT
- AlicenseAqualityBmaintenanceProvides read-only visibility into CyberQP privileged access management data, including customer and account metadata, tenant event logs, and Just-In-Time account status and policies, for AI assistants.10Apache 2.0