一个提供AI助手安全访问Microsoft Graph API的MCP(模型上下文协议)服务器。通过您的AI助手访问用户数据,管理Azure AD资源,并执行管理任务。
在您的claude_desktop_config.json中添加:
{
"mcpServers": {
"graph-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--init",
"-e",
"LOG_LEVEL=INFO",
"-v",
"graph-mcp-server:/tmp",
"ghcr.io/jackinsightsv2/microsoft-graph-mcp:latest"
]
}
}
}
在您的MCP配置中添加:
{
"graph-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--init",
"-e",
"LOG_LEVEL=
INFO",
"-v",
"graph-mcp-server:/tmp",
"ghcr.io/jackinsightsv2/microsoft-graph-mcp:latest"
],
"env": {},
"working_directory": null,
"start_on_launch": true
}
}
在您的MCP配置或Docker环境中设置这些变量:
AZURE_CLIENT_ID: 您的Azure AD应用程序客户端IDAZURE_TENANT_ID: 您的Azure AD租户IDAZURE_CLIENT_SECRET: 您的客户端密钥(可选,用于应用权限){
"mcpServers": {
"graph-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--init",
"-e",
"AZURE_CLIENT_ID=your-client-id",
"-e",
"AZURE_TENANT_ID=your-tenant-id",
"-e",
"AZURE_CLIENT_SECRET=your-client-secret",
"-v",
"graph-mcp-server:/tmp",
"ghcr.io/jackinsightsv2/microsoft-graph-mcp:latest"
]
}
}
}
{
"mcpServers": {
"graph-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"--init",
"-e",
"AZURE_CLIENT_ID=your-client-id",
"-e",
"AZURE_TENANT_ID=your-tenant-id",
"-v",
"graph-mcp-server:/tmp",
"ghcr.io/jackinsightsv2/microsoft-graph-mcp:latest"
]
}
}
}
为了完全写入访问,在您的Azure AD应用注册中配置以下应用权限:
User.ReadWrite.All - 读取和写入所有用户的完整资料User.ManageIdentities.All - 管理用户身份UserAuthenticationMethod.ReadWrite.All - 读取和写入身份验证方法Group.ReadWrite.All - 读取和写入所有组GroupMember.ReadWrite.All - 读取和写入组成员资格Device.ReadWrite.All - 读取和写入设备DeviceManagementConfiguration.ReadWrite.All - 读取和写入设备配置DeviceManagementManagedDevices.ReadWrite.All - 读取和写入托管设备Application.ReadWrite.All - 读取和写入应用程序AppRoleAssignment.ReadWrite.All - 读取和写入应用角色分配Directory.ReadWrite.All - 读取和写入目录数据RoleManagement.ReadWrite.Directory - 读取和写入目录角色SecurityEvents.ReadWrite.All - 读取和写入安全事件IdentityRiskEvent.ReadWrite.All - 读取和写入身份风险事件Mail.ReadWrite - 读取和写入邮件Calendars.ReadWrite - 读取和写入日历Files.ReadWrite.All - 读取和写入文件Sites.ReadWrite.All - 读取和写入站点您可以将应用注册限定到您所需的权限。例如,仅限用户管理:
User.ReadWrite.AllGroup.ReadWrite.AllDirectory.Read.AllMIT许可证 - 详情见LICENSE文件。