BOD-25-01-CSA-Microsoft-Policy-MCP
CISA M365 MCP 服务器
为 Microsoft 365 (Azure AD/Entra ID) 实施 CISA 绑定操作指令 25-01 安全控制的模型上下文协议 (MCP) 服务器。
目录
Related MCP server: SharePoint MCP Server
概述
此 MCP 服务器提供根据 BOD 25-01 要求配置和管理 Microsoft 365 安全设置的工具。它与 Microsoft Graph API 集成,以强制执行安全控制、监视合规性并提供详细的报告。
主要特点
旧式身份验证控制
基于风险的访问控制
多因素身份验证管理
应用程序注册和同意控制
密码策略管理
特权角色管理
仅限云的帐户执行
PAM系统集成
全面的合规报告
基于令牌的身份验证
类型安全参数验证
详细的错误处理和日志记录
安全控制
MS.AAD.1.1v1
到期日:2025年6月20日
阻止旧式身份验证:
禁用旧式身份验证协议
减少攻击面
改善安全态势
实施细节:
await graphClient
.api('/policies/authenticationMethodsPolicy')
.patch({
allowLegacyAuthentication: false,
blockLegacyAuthenticationMethods: true,
});MS.AAD.2.1v1 和 MS.AAD.2.3v1
到期日:2025年6月20日
阻止高风险用户和登录:
阻止被检测为高风险的用户
阻止被检测为高风险的登录
利用微软的威胁情报
实施细节:
await graphClient
.api('/policies/identitySecurityDefaultsEnforcementPolicy')
.patch({
blockHighRiskUsers: true,
riskLevelForBlocking: 'high',
});MS.AAD.3.1v1、MS.AAD.3.2v1、MS.AAD.3.3v1
到期日:2025年6月20日
MFA 配置:
实施防网络钓鱼 MFA
配置替代的 MFA 方法
在 Microsoft Authenticator 中显示登录上下文
实施细节:
await graphClient
.api('/policies/authenticationMethodsPolicy')
.patch({
policies: {
fido2: {
isEnabled: true,
isSelfServiceRegistrationAllowed: true,
},
windowsHelloForBusiness: {
isEnabled: true,
isSelfServiceRegistrationAllowed: true,
},
},
});MS.AAD.5.1v1、MS.AAD.5.2v1、MS.AAD.5.3v1、MS.AAD.5.4v1
到期日:2025年6月20日
应用程序控制:
限制仅管理员注册应用程序
限制仅管理员获得应用许可
配置管理员同意工作流程
阻止群组所有者同意
实施细节:
await graphClient
.api('/policies/applicationRegistrationManagement')
.patch({
restrictAppRegistration: true,
restrictNonAdminUsers: true,
});MS.AAD.6.1v1
到期日:2025年6月20日
密码策略:
禁用密码过期
遵循现代安全最佳实践
实施细节:
await graphClient
.api('/policies/passwordPolicy')
.patch({
passwordExpirationPolicy: {
passwordExpirationDays: 0,
neverExpire: true,
},
});MS.AAD.7.1v1 到 MS.AAD.7.8v1
到期日:2025年6月20日
特权角色管理:
限制全局管理员数量
执行细粒度的角色
需要仅限云的帐户
强制使用 PAM 系统
配置审批工作流程
设置警报
实施细节:
await graphClient
.api('/policies/roleManagementPolicies')
.patch({
enforceGranularRoles: true,
blockGlobalAdminForGeneralUse: true,
requireApprovalForGlobalAdmin: true,
});建筑学
成分
服务器类
处理 MCP 协议实现
管理工具注册和执行
实现错误处理和日志记录
验证
使用 Microsoft Graph API 进行基于令牌的身份验证
自动令牌刷新
安全凭证管理
Graph客户端
Microsoft Graph API 的包装器
类型安全的请求/响应处理
重试逻辑和错误处理
工具
旧式身份验证控制
基于风险的访问管理
MFA 配置
应用程序控制
密码策略管理
角色管理
警报配置
政策状态报告
数据流
graph TD
A[MCP Client] -->|Request| B[MCP Server]
B -->|Authentication| C[Token Manager]
C -->|Access Token| D[Graph Client]
D -->|API Calls| E[Microsoft Graph]
E -->|Response| D
D -->|Results| B
B -->|Response| A先决条件
Node.js 18.x 或更高版本
具有管理员访问权限的 Microsoft 365 租户
具有所需权限的 Azure AD 应用程序:
策略.读写.全部
角色管理.读写.全部
用户.读取.全部
应用程序.读写.全部
安装
通过 Smithery 安装
要通过Smithery自动安装 CISA M365 MCP 服务器:
npx -y @smithery/cli install cisa-m365您还可以直接从Smithery 协议目录复制 MCP 设置和定义,并将 MCP 服务器添加到支持 MCP 协议的 Claude 或 LLM 设置中。
克隆存储库:
git clone https://github.com/DynamicEndpoints/BOD-25-01-CSA-MCP.git
cd cisa-m365安装依赖项:
npm install构建服务器:
npm run build配置
创建 Azure AD 应用程序:
导航至 Azure 门户 > Azure Active Directory
注册新应用程序
添加所需的 API 权限
创建客户端机密
配置环境变量:
cp .env.example .env编辑.env文件:
TENANT_ID=your-tenant-id
CLIENT_ID=your-client-id
CLIENT_SECRET=your-client-secret配置 MCP 设置:
{
"mcpServers": {
"cisa-m365": {
"command": "node",
"args": ["path/to/cisa-m365/build/index.js"],
"env": {
"TENANT_ID": "your-tenant-id",
"CLIENT_ID": "your-client-id",
"CLIENT_SECRET": "your-client-secret"
}
}
}
}用法
可用工具
block_legacy_auth
阻止传统的身份验证方法。
{}阻止高风险用户
阻止被检测为高风险的用户。
{}强制执行防钓鱼_mfa
对所有用户强制实施防网络钓鱼的 MFA。
{}配置全局管理员
配置全局管理员角色分配。
{
"userIds": ["user1-id", "user2-id"]
}获取策略状态
获取所有安全策略的当前状态。
{}示例用法
// Block legacy authentication
const result = await client.callTool('block_legacy_auth', {});
// Get policy status
const status = await client.callTool('get_policy_status', {});API 参考
策略设置 API
interface PolicySettings {
legacyAuthentication: {
blocked: boolean;
compliant: boolean;
};
highRiskUsers: {
blocked: boolean;
compliant: boolean;
};
mfa: {
phishingResistant: boolean;
alternativeEnabled: boolean;
compliant: boolean;
};
applications: {
registrationRestricted: boolean;
consentRestricted: boolean;
compliant: boolean;
};
passwords: {
expirationDisabled: boolean;
compliant: boolean;
};
roles: {
globalAdminCount: number;
granularRolesEnforced: boolean;
pamEnforced: boolean;
compliant: boolean;
};
}错误处理
服务器实现了全面的错误处理:
身份验证错误
令牌获取失败
权限问题
租户配置问题
API 错误
Graph API 请求失败
速率限制
服务不可用
验证错误
无效参数
缺少必需参数
类型不匹配
运行时错误
网络问题
超时问题
资源限制
错误响应示例:
{
"error": {
"code": "InvalidParams",
"message": "Invalid role assignment arguments",
"details": {
"parameter": "userIds",
"constraint": "Must have between 2 and 8 users",
"received": "1 user"
}
}
}测试
运行单元测试:
npm test运行集成测试:
npm run test:integration运行合规性测试:
npm run test:compliance安全注意事项
验证
使用安全令牌存储
实施代币轮换
监控可疑活动
API 访问
遵循最小特权原则
定期权限审核
监控 API 使用情况
数据保护
无敏感数据记录
安全配置存储
定期安全扫描
遵守
定期合规性检查
自动策略验证
审计日志
贡献
分叉存储库
创建功能分支
进行更改
运行测试
提交拉取请求
指南:
遵循现有的代码风格
添加新功能测试
更新文档
保持提交的原子性
执照
麻省理工学院
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
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables interaction with Microsoft Dynamics 365 CRM from Claude Desktop, allowing users to retrieve, create, and update CRM data through natural language.521MIT
- AlicenseBqualityNot gradedmaintenanceA lightweight MCP server that enables integration with Microsoft SharePoint, allowing clients to interact with documents and folders through the Model Context Protocol.965
- FlicenseNot gradedqualityDmaintenanceThis MCP Server provides a natural language interface to interact with Google's Policy Analyzer API, allowing users to analyze policies and evaluate compliance through conversations.
- FlicenseNot gradedqualityDmaintenanceAn MCP Server that enables interaction with Google's Organization Policy API, allowing users to manage organization policies that control resource behavior within Google Cloud environments.
Related MCP Connectors
MCP server teaching AI agents to implement TideCloak: auth, E2EE, IGA, security analysis
Official Microsoft MCP Server to query Microsoft Entra data using natural language
MEOK MCP Hardening MCP — automated security red-team for any MCP server. Maps OWASP LLM Top 10
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/DynamicEndpoints/Automated-BOD-25-01-CISA-Microsoft-Policies-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server