
Inforcer
io.github.wyre-technology由 GitHub 账号 wyre-technology 发布v1.1.0更新于 Oct 24, 2026
Read-only MCP server for Inforcer M365 baseline governance, plus assessment and report runs.
概览
面向 Inforcer Microsoft 365 基线治理的只读 MCP 服务器,让助手查看租户、基线、漂移、策略、安全评分、身份与审计日志。
- 可以做什么
- 通过导航与状态工具浏览各领域并检查连通性
- 列出、获取并解析租户,包括把名称或 GUID 映射为 Client Tenant ID
- 列出基线,读取对齐评分与各租户的漂移详情
- 按租户列出策略并读取 Microsoft 安全评分
- 列出用户、组与角色,并按事件类型搜索审计事件
- 列出评估与报告类型、运行记录和状态,下载报告输出,并触发评估运行或排队报告运行
- 适用场景
- 适合需要跨租户回答 Microsoft 365 基线合规问题、排查漂移或审计活动,或在不打开门户的情况下获取 Inforcer 报告的场景。它面向治理与安全审查,而非配置变更。
- 运行要求
- 以本地 stdio 进程运行(npx 或 Docker 镜像)。需要 INFORCER_REGION(anz、eu、uk、us)与 INFORCER_API_KEY,后者以 Inf-Api-Key 请求头发送。HTTP 模式还需 CONDUIT_S2S_SECRET,或使用网关模式并在每次请求中提供 X-Inforcer-Region 与 X-Inforcer-API-Key 请求头。从源码构建需要 GitHub Packages 令牌。
安装
在 SourceWeft 中
- 打开 控制台中的 Inforcer,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Inforcer MCP Server
[Build Status] [License] [Node.js]
A Model Context Protocol (MCP) server that gives AI assistants structured, mostly read-only access to Inforcer Microsoft 365 baseline-governance data — tenants, baselines, alignment/drift, policies, secure scores, identity, audit logs, and report generation — plus two write actions to trigger an assessment run or queue a report.
Note: This project is maintained by Wyre Technology.
⚠ Community-sourced API
Inforcer does not (at time of writing) publish an official REST API specification. This server wraps the @wyre-technology/node-inforcer SDK, whose API surface is community-sourced from royklo/InforcerCommunity. Endpoints, field shapes, and behavior may change without notice. Treat results accordingly and verify anything load-bearing against the Inforcer portal.
Read-only scope
Every tool in this server is read-only EXCEPT two:
inforcer_assessments_run— triggers an assessment run for a tenant.inforcer_reports_run— queues one or more report runs across one or more tenants.
Both are HIGH-IMPACT (not destructive): they kick off real work in Inforcer and are visible to operators. Both are annotated accordingly and ask for confirmation before running. Confirm with the user before invoking.
There are no create/update/delete tools for policies, tenants, or baselines — those operations are not exposed by the community API and are intentionally absent here.
Quick Start
Claude Code (CLI):
See Installation for Docker and from-source methods.
Features
- 🔌 MCP Protocol Compliance: Full support for MCP tools and prompts
- 🛡️ Governance Coverage (read-only): Tenants, baselines, alignment/drift, policies, Microsoft Secure Score, Entra ID identity, and the audit log
- 🔍 Decision-Tree Navigation: Start with
inforcer_navigateto explore domains, then call domain-specific tools - 🧭 Flexible Tenant Resolution: Most tools accept a
tenantas a numeric Client Tenant ID, a tenant DNS name, an Azure AD GUID, or a friendly name — resolved automatically - 🔒 Secure Authentication:
Inf-Api-Keyheader auth, region-scoped - 🌐 Dual Transport: stdio (local) and HTTP Streamable (gateway/Docker)
- 🐳 Docker Ready: Containerized deployment with HTTP transport and health checks
- 📊 Structured Logging: Configurable levels, credentials never logged
Table of Contents
- Installation
- Configuration
- Tenant identifiers
- Domains and tools
- Gateway connection
- Docker Deployment
- Development
- Testing
- Contributing
- License
Installation
Option 1: Claude Code (CLI)
Option 2: Docker
The image listens on 0.0.0.0 inside the container and defaults to AUTH_MODE=gateway. Publish the port on loopback and pass a real S2S secret. In gateway mode the Inforcer region and API key arrive on each request as headers; they are not read from the environment.
Or pull the pre-built image:
Compose reads CONDUIT_S2S_SECRET from the project .env and refuses to start when that value is unset. Do not assign the variable on the command line: an empty shell value overrides .env.
Option 3: From Source
Configuration
/health stays unauthenticated and does not read credentials. The stdio transport does not use CONDUIT_S2S_SECRET.
Both INFORCER_REGION and INFORCER_API_KEY are required for any API call in stdio and AUTH_MODE=env. Tool discovery (tools/list) works without them; the first real call will error if either is missing.
HTTP authentication
With MCP_TRANSPORT=http and CONDUIT_S2S_SECRET set, every /mcp request must include X-Gateway-S2S. The check is verifyS2sHeader in src/s2s-verify.ts: the header value is t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of the literal string t=<unix seconds> keyed with CONDUIT_S2S_SECRET (64 lowercase hex characters). The timestamp must be within 300 seconds of the server clock. A missing or invalid header returns HTTP 401 before vendor credentials are read.
CONDUIT_S2S_SECRET must already be in the environment. The example reads that variable inside the process. It does not pass the secret as a command argument.
In AUTH_MODE=gateway, /mcp also requires X-Inforcer-Region and X-Inforcer-API-Key. Those headers are the only credential source for the request. With AUTH_MODE=env, the signed request uses INFORCER_REGION and INFORCER_API_KEY from the environment.
Tenant identifiers
Inforcer's tenant-scoped routes use an integer Client Tenant ID — which is NOT the same as the Azure AD tenant GUID (msTenantId). To make tools easy to use, the tenant argument accepts any of:
- a numeric Client Tenant ID (e.g.
42), - a tenant DNS name (e.g.
contoso.onmicrosoft.com), - an Azure AD tenant GUID (
msTenantId), or - a friendly name (e.g.
Contoso).
Names/DNS/GUIDs are resolved to the numeric Client Tenant ID via the SDK's resolveTenantId before each tenant-scoped call. If a name matches more than one tenant, the call fails with a clear "ambiguous" error — pass the numeric Client Tenant ID instead. Use inforcer_tenants_resolve to see exactly which Client Tenant ID an input maps to.
Domains and tools
The server uses decision-tree navigation. Start with inforcer_navigate to pick a domain, or call any tool directly. All tools are read-only except inforcer_assessments_run and inforcer_reports_run.
inforcer_reports_run queues asynchronously — poll the run with inforcer_reports_run_status until isTerminal: true, then fetch each output with inforcer_reports_download_output (returns base64-encoded file content).
Gateway connection
When hosted behind the WYRE MCP Gateway, set AUTH_MODE=gateway and MCP_TRANSPORT=http. In this mode the server is stateless (a fresh MCP server + transport per request) and reads credentials from per-request HTTP headers injected by the gateway. A request missing either header gets HTTP 401 and does not fall back to INFORCER_REGION or INFORCER_API_KEY.
The container image defaults to MCP_TRANSPORT=http and AUTH_MODE=gateway. /health always returns 200, does not require authentication, and does not read vendor credentials.
Docker Deployment
See docker-compose.yml. The checked-in Compose service is gateway mode. It publishes 127.0.0.1:8080:8080, requires CONDUIT_S2S_SECRET, and does not set INFORCER_REGION, INFORCER_API_KEY, or env_file.
Single-tenant HTTP (AUTH_MODE=env) still requires the S2S secret, then uses INFORCER_REGION and INFORCER_API_KEY. It is separate from the gateway Compose service:
Local HTTP without a secret is development-only. It binds 127.0.0.1 only and logs a warning. A non-loopback MCP_HTTP_HOST is ignored and the override is logged:
Development
Testing
Contributing
See CONTRIBUTING.md for guidelines.
License
Apache 2.0 — Copyright WYRE Technology
来源:README.md,提交 dceb738
工具
0版本历史
1- v1.1.0最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。