Inforcer MCP Server

Inforcer MCP Server

An MCP server providing AI assistants read-only access to Inforcer Microsoft 365 governance data, including tenants, baselines, policies, and audit logs, with one write action to trigger assessments.

Category
访问服务器

README

Inforcer MCP Server

Build Status License Node.js

A Model Context Protocol (MCP) server that gives AI assistants structured, read-only access to Inforcer Microsoft 365 baseline-governance data — tenants, baselines, alignment/drift, policies, secure scores, identity, and audit logs — plus a single write action to trigger an assessment run.

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 one:

  • inforcer_assessments_run — triggers an assessment run for a tenant. It is HIGH-IMPACT (not destructive): it kicks off real work in Inforcer and is visible to operators. It is annotated accordingly and asks 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):

claude mcp add inforcer-mcp \
  -e INFORCER_REGION=us \
  -e INFORCER_API_KEY=your-api-key \
  -- npx -y github:wyre-technology/inforcer-mcp

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_navigate to explore domains, then call domain-specific tools
  • 🧭 Flexible Tenant Resolution: Most tools accept a tenant as a numeric Client Tenant ID, a tenant DNS name, an Azure AD GUID, or a friendly name — resolved automatically
  • 🔒 Secure Authentication: Inf-Api-Key header 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

Option 1: Claude Code (CLI)

claude mcp add inforcer-mcp \
  -e INFORCER_REGION=us \
  -e INFORCER_API_KEY=your-api-key \
  -- npx -y github:wyre-technology/inforcer-mcp

Option 2: Docker

docker compose up

Or pull the pre-built image:

docker run -d \
  -e INFORCER_REGION=us \
  -e INFORCER_API_KEY=your-key \
  -p 8080:8080 \
  ghcr.io/wyre-technology/inforcer-mcp:latest

Option 3: From Source

git clone https://github.com/wyre-technology/inforcer-mcp.git
cd inforcer-mcp
export NODE_AUTH_TOKEN=$(gh auth token)   # to install @wyre-technology/* from GitHub Packages
npm ci
npm run build

Configuration

Variable Description Default
INFORCER_REGION Required. Inforcer API region — one of anz, eu, uk, us. There is no default; the server errors clearly if it is missing.
INFORCER_API_KEY Required. Inforcer API key, sent as the Inf-Api-Key header.
MCP_TRANSPORT Transport mode (stdio or http) stdio
MCP_HTTP_PORT HTTP server port 8080
AUTH_MODE Auth mode (env or gateway) env
LOG_LEVEL Log level (debug, info, warn, error) info

Both INFORCER_REGION and INFORCER_API_KEY are required for any API call. Tool discovery (tools/list) works without them; the first real call will error if either is missing.

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.

Domain Tools Read-only
navigation inforcer_navigate, inforcer_status (live baselines.list() connectivity check)
tenants inforcer_tenants_list, inforcer_tenants_get, inforcer_tenants_resolve
baselines inforcer_baselines_list
alignment inforcer_alignment_scores, inforcer_alignment_details (per-tenant drift)
policies inforcer_policies_list (by tenant)
secure-scores inforcer_secure_scores_get (by tenant)
identity inforcer_users_list, inforcer_users_get, inforcer_groups_list, inforcer_groups_get, inforcer_roles_list
audit inforcer_audit_event_types, inforcer_audit_search
assessments inforcer_assessments_list (✅), inforcer_assessments_run (⚠ HIGH-IMPACT, not read-only) mixed

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:

Header Maps to
x-inforcer-region INFORCER_REGION
x-inforcer-api-key INFORCER_API_KEY

When both headers are present the server updates the environment and invalidates its cached client so the next call uses the freshly-injected credentials. tools/list still works without credentials, so discovery is never blocked. The container image defaults to MCP_TRANSPORT=http; /health reports ok when credentials are configured and degraded otherwise.

Docker Deployment

See docker-compose.yml for full configuration. Copy .env.example to .env and fill in your credentials:

cp .env.example .env
# Edit .env with INFORCER_REGION and INFORCER_API_KEY
docker compose up -d

Development

export NODE_AUTH_TOKEN=$(gh auth token)
npm ci
npm run build       # Build the project
npm run dev         # Watch mode
npm run test        # Run tests
npm run lint        # Type-check
npm run clean       # Remove dist/

Testing

npm test            # Run test suite
npm run test:watch  # Watch mode

Contributing

See CONTRIBUTING.md for guidelines.

License

Apache 2.0 — Copyright WYRE Technology

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选