Skip to main content
Glama
wborcherdt26

intune-mcp

by wborcherdt26

intune-mcp

通过 Microsoft Graph API 提供对 Microsoft Intune 的只读访问的 MCP 服务器。允许 Claude(或任何 MCP 客户端)查询托管设备、应用、合规性策略和配置配置文件。

前提条件

  • Node.js >= 18

  • 具有委派权限的 Azure AD(Entra ID)应用注册

  • 用于自动注册应用的 Azure CLI(az)(可选)

Related MCP server: azure-query-mcp

快速开始

1. 注册 Azure AD 应用

# Automated (requires Azure CLI + admin consent permissions)
.\scripts\register-app.ps1 -WriteEnv

# Or manually: create a public client app in Entra ID with these delegated permissions:
#   - DeviceManagementManagedDevices.Read.All
#   - DeviceManagementApps.Read.All
#   - DeviceManagementConfiguration.Read.All
# Then create .env:
#   AZURE_CLIENT_ID=<your-app-client-id>
#   AZURE_TENANT_ID=<your-tenant-id>

2. 安装并构建

npm install
npm run build

3. 进行身份验证

npm run auth

按照设备代码提示,使用您的 Microsoft 帐户登录。

4. 运行

# Stdio mode (for local MCP clients like Claude Code)
npm start

# HTTP mode (for shared/remote deployment)
npm run start:http

传输模式

模式

标志

用途

Stdio

(默认)

本地、单用户、预认证

HTTP

--httpTRANSPORT=http

共享部署、多会话、每会话认证

HTTP 模式会在端口 3000 上启动一个 Express 服务器(可通过 --portPORT 环境变量进行配置),并提供以下端点:

路径

方法

用途

/mcp

POST

MCP JSON-RPC(Streamable HTTP)

/mcp

GET

SSE 流,用于服务器通知

/mcp

DELETE

会话终止

/health

GET

健康检查(状态、版本、会话数)

可用工具

类别

工具

说明

认证

authenticate

设备代码登(仅限 HTTP 模式)

设备

list_devices

列出受管设备(支持 OData 筛选)

设备

get_device

按 ID 获取设备详细信息

设备

search_devices

按名称、UPN 或序列号搜索

应用

get_device_installed_apps

设备上检测到的应用(beta API)

应用

list_managed_apps

Intune 中的 LOB/商店/Web 应用

合规性

list_compliance_policies

所有合规性策略

合规性

get_device_compliance_status

每台设备的合规性状态

合规性

get_noncompliant_devices

状态为不合规的设备

合规性

get_policy_device_statuses

某个策略下每台设备的状态

配置配置文件

list_configuration_profiles

设备配置配置文件

配置配置文件

get_profile_device_statuses

某个配置文件下每台设备的状态

配置配置文件

get_device_configuration_status

设备上的配置文件状态

所需权限(委派)

  • DeviceManagementManagedDevices.Read.All

  • DeviceManagementApps.Read.All

  • DeviceManagementConfiguration.Read.All

开发

npm run dev          # TypeScript watch mode
npm test             # Run unit tests
npm run build        # Compile to dist/

实时验证

针对真实 Intune 租户测试全部 12 个端点(需要事先完成身份验证):

node scripts/validate-tools.mjs

架构

MCP Client -> Transport (stdio | HTTP) -> McpServer -> Tool Handlers -> GraphClient -> Microsoft Graph API
  • 认证: MSAL 设备代码流程,基于文件的令牌缓存位于 ~/.intune-mcp/token-cache.json

  • 日志: 结构化 JSON 行,存储于 ~/.intune-mcp/logs/intune-mcp.log(10 MB 轮转,保留 5 个文件)

  • Graph 客户端: 自动重试并采用指数退避(429、401、5xx),支持 Retry-After,30 秒请求超时,自动分页最多 10 页

  • HTTP 模式: 每会话认证,30 分钟会话 TTL,100 个会话上限

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Enables read-only querying of Azure Log Analytics and Azure Resource Graph through MCP, supporting KQL queries, workspace discovery, and resource inventory exploration with Azure RBAC authentication.
    5
    2
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    A read-only MCP server for Microsoft Intune and Entra ID that enables list, get, search, and reporting operations for tenant visibility, audits, troubleshooting, and health reporting without write actions. It includes authentication helpers, report exports, and metadata discovery tools.
    36
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for Microsoft Entra ID (Azure AD) that enables querying user sign-in logs, group memberships, and assigned Microsoft 365 licenses via Microsoft Graph API. Provides security and audit visibility without any write operations.

View all related MCP servers

Related MCP Connectors

  • XFA's remote MCP server — query device posture, compliance, policies & CVEs. Read-only.

  • Read-only MCP server for ClassQuill, a tutoring-business-management platform.

  • Official Microsoft MCP Server to query Microsoft Entra data using natural language

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wborcherdt26/Intune-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server