HE

hieuttmmo/entraid-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

41 stars 18 forks 质量 49 趋势 0

hieuttmmo/entraid-mcp-server 是从 https://github.com/hieuttmmo/entraid-mcp-server. 导入的 MCP 服务器候选

概览

hieuttmmo/entraid-mcp-server 是从 https://github.com/hieuttmmo/entraid-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

该项目提供了一个模块化、面向资源的FastMCP服务器,用于与Microsoft Graph API交互。它设计为可扩展性、可维护性和安全性,支持用户高级查询、登录日志、多重身份验证状态和特权用户。

特色

  • 模块化资源结构:
  • 每个资源(用户、登录日志、多因素认证等)都集成在其独立模块中,属于src/msgraph_mcp_server/resources/。
  • 易于扩展新资源(如组、设备)。
  • 集中式图客户端:
  • 处理认证和客户端初始化。
  • 所有资源模块共享。
  • 全面的用户运营:
  • 通过姓名/邮箱搜索用户。
  • 通过ID获取用户。
  • 列出所有特权用户(目录角色成员)。
  • 完整的团队生命周期与会员管理:
  • 创建、读取、更新和删除分组。
  • 添加/移除组成员和所有者。
  • 搜索和列出组和组成员。
  • 应用与服务主体管理:
  • 列表、创建、更新和删除应用程序(应用注册)。
  • 列出、创建、更新和删除服务主体。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

EntraID MCP Server (Microsoft Graph FastMCP)

This project provides a modular, resource-oriented FastMCP server for interacting with Microsoft Graph API. It is designed for extensibility, maintainability, and security, supporting advanced queries for users, sign-in logs, MFA status, and privileged users.

Features

  • Modular Resource Structure:
    • Each resource (users, sign-in logs, MFA, etc.) is implemented in its own module under src/msgraph_mcp_server/resources/.
    • Easy to extend with new resources (e.g., groups, devices).
  • Centralized Graph Client:
    • Handles authentication and client initialization.
    • Shared by all resource modules.
  • Comprehensive User Operations:
    • Search users by name/email.
    • Get user by ID.
    • List all privileged users (directory role members).
  • Full Group Lifecycle & Membership Management:
    • Create, read, update, and delete groups.
    • Add/remove group members and owners.
    • Search and list groups and group members.
  • Application & Service Principal Management:
    • List, create, update, and delete applications (app registrations).
    • List, create, update, and delete service principals.
    • View app role assignments and delegated permissions for both applications and service principals.
  • Sign-in Log Operations:
    • Query sign-in logs for a user for the last X days.
  • MFA Operations:
    • Get MFA status for a user.
    • Get MFA status for all members of a group.
  • Password Management:
    • Reset user passwords directly with custom or auto-generated secure passwords.
    • Option to require password change on next sign-in.
  • Permissions Helper:
    • Suggest appropriate Microsoft Graph permissions for common tasks.
    • Search and explore available Graph permissions.
    • Helps implement the principle of least privilege by recommending only necessary permissions.
  • Error Handling & Logging:
    • Consistent error handling and progress reporting via FastMCP context.
    • Detailed logging for troubleshooting.
  • Security:
    • .env and secret files are excluded from version control.
    • Uses Microsoft best practices for authentication.

Project Structure

src/msgraph_mcp_server/
├── auth/           # Authentication logic (GraphAuthManager)
├── resources/      # Resource modules (users, signin_logs, mfa, ...)
│   ├── users.py            # User operations (search, get by ID, etc.)
│   ├── signin_logs.py      # Sign-in log operations
│   ├── mfa.py              # MFA status operations
│   ├── permissions_helper.py # Graph permissions utilities and suggestions
│   ├── applications.py       # Application (app registration) operations
│   ├── service_principals.py # Service principal operations
│   └── ...                 # Other resource modules
├── utils/          # Core GraphClient and other ultilities tool, such as password generator..
├── server.py       # FastMCP server entry point (registers tools/resources)
├── __init__.py     # Package marker

Usage

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →