Microsoft Entra ID MCP Server
MCP ServerFree** - A Python MCP server for Microsoft Entra ID (Azure AD) directory, user, group, device, sign-in, and security operations via Microsoft Graph.
Capabilities14 decomposed
oauth 2.0 token lifecycle management with automatic refresh
Medium confidenceImplements GraphAuthManager component that handles Microsoft Entra ID OAuth 2.0 authentication flows, including token acquisition, caching, and automatic refresh before expiration. Uses a facade pattern to abstract token lifecycle from resource modules, ensuring all Graph API calls execute with valid credentials without manual token management by the caller.
GraphAuthManager abstracts token lifecycle as a reusable component across 11 resource modules, eliminating per-module authentication logic and centralizing token refresh. Uses facade pattern to decouple authentication from Graph API calls, enabling seamless integration with FastMCP's tool registration system.
Simpler than manual OAuth 2.0 implementations because token refresh is automatic and transparent to resource modules, reducing boilerplate compared to direct Microsoft Graph SDK usage.
fastmcp server with schema-based tool registration and json-rpc orchestration
Medium confidenceExposes 40+ tools via FastMCP server that translates MCP JSON-RPC requests into structured Graph API calls. Each tool is registered with input/output schemas that enforce type safety and parameter validation. The server layer (server.py) acts as an orchestration hub, routing client requests to appropriate resource modules and translating responses back to MCP format.
Uses FastMCP's declarative tool registration pattern where each resource module exposes tools via @mcp.tool() decorators, enabling automatic schema generation and JSON-RPC routing without manual request parsing. Server.py centralizes tool registration across 11 resource modules into a single MCP endpoint.
Cleaner than REST API wrappers because schema validation is declarative and MCP clients (Claude, Cursor) natively understand tool schemas, eliminating the need for custom client-side tool discovery.
device management and compliance status discovery
Medium confidenceImplements device management tools that query Microsoft Graph /devices endpoint to enumerate registered and managed devices, retrieve device properties (OS, compliance status, owner), and discover device-to-user mappings. Returns structured device objects including device name, OS version, compliance state, and registered owner identity. Supports filtering by device name, owner, or compliance status for device inventory and compliance audits.
Exposes device inventory and compliance status as dedicated tools that query the /devices endpoint with owner and compliance filtering, enabling agents to correlate device compliance with user access policies. Separates device enumeration from compliance status discovery.
More accessible than Intune console because it returns structured JSON suitable for programmatic analysis; enables device compliance automation that would be tedious to implement through manual portal navigation.
resource module pattern with domain-specific tool organization
Medium confidenceImplements a modular architecture where 11 resource modules (users.py, groups.py, applications.py, service_principals.py, signin_logs.py, audit_logs.py, mfa.py, conditional_access.py, password.py, devices.py, permissions.py) each encapsulate domain-specific tools and Graph API integration logic. Each module exposes tools via @mcp.tool() decorators and uses a shared GraphClient facade for HTTP requests. Enables clean separation of concerns and independent testing of identity management domains.
Uses a resource module pattern where each domain (users, groups, security, devices) is a separate Python module with its own tool definitions and Graph API integration, enabling independent development and testing. Shared GraphClient facade abstracts HTTP communication and error handling across all modules.
More maintainable than monolithic tool registration because each domain is isolated; more extensible than hardcoded tool lists because new tools can be added by creating new modules with @mcp.tool() decorators.
graphclient http facade with error translation and retry logic
Medium confidenceImplements GraphClient utility class that wraps HTTP requests to Microsoft Graph API with automatic error handling, response parsing, and retry logic for transient failures. Translates Graph API error responses (4xx, 5xx) into structured exceptions with meaningful error messages. Handles pagination automatically for endpoints that return large result sets, enabling seamless iteration over multi-page results.
Centralizes Graph API communication in a single GraphClient class that all resource modules use, enabling consistent error handling and retry logic across 40+ tools. Abstracts pagination and error translation so resource modules focus on business logic rather than HTTP mechanics.
More reliable than direct Graph API calls because it includes automatic retry logic for transient failures; more maintainable than per-tool error handling because error translation is centralized.
mcp client integration with claude desktop and cursor ide configuration
Medium confidenceProvides configuration patterns and deployment instructions for integrating the MCP server with Claude Desktop (via ~/.claude/mcp.json) and Cursor IDE (via uv run on-demand execution). Enables AI agents in Claude and Cursor to invoke Entra ID tools directly through the MCP protocol. Supports persistent server mode (Claude Desktop) and on-demand execution (Cursor IDE) for different deployment scenarios.
Provides explicit configuration patterns for both Claude Desktop (persistent mode) and Cursor IDE (on-demand mode), enabling flexible deployment depending on use case. Supports both server-mode and CLI-mode execution patterns for different client integration scenarios.
More flexible than REST API wrappers because MCP clients (Claude, Cursor) natively understand tool schemas and can invoke tools without custom client code; more accessible than direct Graph API usage because agents don't need to understand OAuth or Graph API details.
user identity search and attribute retrieval with role and group membership discovery
Medium confidenceImplements search_users, get_user_by_id, get_privileged_users, get_user_roles, and get_user_groups tools that query Microsoft Graph /users endpoint with OData filters and expand parameters. Supports searching by display name, email, or user principal name; retrieving full user profiles including job title, department, and manager; and discovering assigned roles and group memberships through transitive queries.
Combines multiple Graph API endpoints (users, memberOf, appRoleAssignments) into a single logical capability, allowing agents to discover user identity, roles, and group context in one operation. Uses OData $expand parameters to reduce API round-trips compared to sequential queries.
More efficient than Azure Portal UI because it supports programmatic filtering and bulk discovery; faster than Azure CLI because it uses Graph API directly with optimized OData queries rather than CLI parsing.
group crud and membership management with owner/member role distinction
Medium confidenceExposes 11 tools for group lifecycle management including create_group, update_group, delete_group, add_group_member, remove_group_member, add_group_owner, remove_group_owner, and search_groups. Implements role-based membership where owners have administrative privileges over group settings and members have basic access. Uses Microsoft Graph /groups endpoint with nested /members and /owners collections.
Separates owner and member management into distinct tools (add_group_owner vs add_group_member) rather than generic role assignment, reflecting Entra ID's permission model where owners have administrative control. Uses Graph API's /members and /owners collections directly rather than generic role assignment endpoints.
More granular than PowerShell cmdlets because each operation is a separate tool with clear input/output contracts; more flexible than Azure Portal because it supports programmatic bulk operations and conditional membership logic.
service principal and application identity management with permission discovery
Medium confidenceImplements tools for service principal CRUD (create, read, update, delete) and application registration management (list_applications, get_application_by_id, create_application, update_application, delete_application). Includes permission discovery tools that enumerate assigned Graph API permissions (delegated and application-scoped) and role assignments. Uses /servicePrincipals and /applications endpoints with appRoleAssignments and oauth2PermissionGrants expansion.
Combines application registration and service principal management into a unified capability set, reflecting Entra ID's dual-identity model. Permission discovery tool uses appRoleAssignments and oauth2PermissionGrants to enumerate both application-scoped and delegated permissions in a single query.
More comprehensive than Azure Portal because it exposes permission discovery as a programmatic tool; faster than manual audit because it aggregates permissions across multiple Graph endpoints into a single result.
sign-in log retrieval with 7-day historical window and filtering
Medium confidenceImplements get_user_sign_ins tool that queries Microsoft Graph /auditLogs/signIns endpoint with date filtering and user principal name matching. Returns structured sign-in records including timestamp, client IP, device info, authentication method, and success/failure status. Supports filtering by date range (default 7 days) and user identity to enable security investigation and anomaly detection.
Exposes sign-in logs as a dedicated tool with pre-configured 7-day window, eliminating the need for agents to calculate date ranges or understand Graph API's auditLogs endpoint structure. Filters by user principal name directly rather than requiring user ID lookup.
Simpler than Azure Portal sign-in log viewer because it returns structured JSON suitable for programmatic analysis; faster than Azure CLI because it uses Graph API directly with optimized OData filtering.
audit log retrieval with 30-day historical window and activity filtering
Medium confidenceImplements get_user_audit_logs tool that queries Microsoft Graph /auditLogs/directoryAudits endpoint with date filtering and activity type matching. Returns structured audit records including timestamp, activity type (user creation, group modification, role assignment), actor identity, target resource, and result status. Supports filtering by date range (default 30 days) and activity category for compliance and forensic investigation.
Separates audit logs from sign-in logs as distinct tools, reflecting Entra ID's dual-log architecture where audit logs track administrative changes and sign-in logs track authentication events. Pre-configures 30-day window and activity type filtering to simplify agent queries.
More comprehensive than sign-in logs because it captures administrative changes; more accessible than Azure Portal audit log viewer because it returns structured JSON suitable for programmatic analysis and alerting.
multi-factor authentication (mfa) status discovery for users and groups
Medium confidenceImplements get_user_mfa_status and get_group_mfa_status tools that query Microsoft Graph /users and /groups endpoints with authentication method expansion to determine MFA enrollment status. Returns structured MFA capability including registered authentication methods (phone, authenticator app, FIDO2 key), MFA enforcement status, and compliance with organizational MFA policies. Uses /authentication/methods endpoint for detailed method enumeration.
Exposes MFA status as a dedicated tool that aggregates authentication method data from Graph API's /authentication/methods endpoint, eliminating the need for agents to understand the relationship between users, authentication methods, and MFA enrollment. Provides both user-level and group-level MFA discovery.
More accessible than Azure Portal MFA status viewer because it returns structured JSON; faster than manual audits because it aggregates MFA enrollment across users and groups in a single query.
conditional access policy retrieval and evaluation
Medium confidenceImplements get_conditional_access_policies and get_conditional_access_policy_by_id tools that query Microsoft Graph /identity/conditionalAccess/policies endpoint. Returns structured policy definitions including conditions (user/group/app/location/device), grant controls (MFA requirement, device compliance), session controls (sign-in frequency, persistent browser), and enabled/disabled status. Supports policy enumeration and detailed policy inspection for compliance and security analysis.
Exposes conditional access policies as read-only tools that return fully structured policy definitions, enabling agents to analyze policy conditions and controls without manual Azure Portal navigation. Separates policy enumeration from detailed policy retrieval to support both discovery and deep-dive analysis.
More accessible than Azure Portal policy editor because it returns structured JSON suitable for programmatic analysis; enables policy compliance automation that would be tedious to implement manually.
user password reset with direct and email-based notification options
Medium confidenceImplements reset_user_password_direct and related password management tools that invoke Microsoft Graph /users/{id}/authentication/passwordReset endpoint. Generates temporary passwords and optionally sends reset notifications via email. Supports both immediate password reset (direct) and user-initiated reset flows. Returns reset status and temporary password (if applicable) for credential provisioning workflows.
Separates direct password reset from email-based notification, allowing agents to choose between immediate reset (for provisioning) and user-initiated reset (for self-service). Uses Microsoft Graph's dedicated passwordReset endpoint rather than generic password update operations.
More secure than manual password sharing because temporary passwords are generated by Microsoft and can be sent via email; more flexible than Azure Portal because it supports programmatic reset as part of automated workflows.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with Microsoft Entra ID MCP Server, ranked by overlap. Discovered automatically through the match graph.
klavis
Klavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
mcp-auth
Plug and play auth for Model Context Protocol (MCP) servers
mcp-auth
Plug and play auth for Model Context Protocol (MCP) servers
FHIR MCP
** - MCP Server that connects AI agents to FHIR servers
@mcp-use/cli
The mcp-use CLI is a tool for building and deploying MCP servers with support for ChatGPT Apps, Code Mode, OAuth, Notifications, Sampling, Observability and more.
mcp-remote
Remote proxy for Model Context Protocol, allowing local-only clients to connect to remote servers using oAuth
Best For
- ✓Teams deploying MCP servers in Claude Desktop or Cursor IDE environments
- ✓Developers building AI agents that need persistent Entra ID access without token refresh logic
- ✓AI agent developers integrating Entra ID management into Claude or Cursor workflows
- ✓Teams building MCP servers that need structured tool registration with schema validation
- ✓Organizations standardizing on MCP for identity and access management automation
- ✓Mobile device management (MDM) teams auditing device compliance and inventory
- ✓Security teams identifying non-compliant devices for access restriction
- ✓Developers building device inventory and compliance reporting agents
Known Limitations
- ⚠Requires client credentials (app ID, secret, tenant ID) stored in .env file — no interactive user login flow
- ⚠Token caching is in-memory only — server restart clears cached tokens
- ⚠No built-in token rotation or key management — relies on Azure app registration configuration
- ⚠Tools are synchronous only — no streaming or async tool execution support
- ⚠Schema validation happens at registration time, not runtime — invalid parameters may fail at Graph API call
- ⚠No built-in rate limiting or request queuing — relies on Microsoft Graph API throttling (429 responses)
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
About
** - A Python MCP server for Microsoft Entra ID (Azure AD) directory, user, group, device, sign-in, and security operations via Microsoft Graph.
Categories
Alternatives to Microsoft Entra ID MCP Server
Are you the builder of Microsoft Entra ID MCP Server?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →