Entra ID
MCP server for interacting with EntraID through Microsoft Graph API.
What is Entra ID?
Entra ID is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for interacting with entraid through microsoft graph api.
MCP server for interacting with EntraID through Microsoft Graph API.
This server falls under the Security category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server for interacting with EntraID through Microsoft Gr
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx entraidConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Entra ID
The EntraID MCP Server connects AI assistants to Microsoft Entra ID (formerly Azure Active Directory) via the Microsoft Graph API, enabling natural-language management of users, groups, applications, and security policies. It exposes tools for user lifecycle management, MFA status checks, sign-in log analysis, conditional access policy review, and device management through Intune. Teams use it to automate IAM workflows, audit privileged accounts, and investigate security incidents without leaving their AI assistant. Built with FastMCP and the official Microsoft Graph SDK, it supports delegated and application-level permissions with minimal-privilege guidance.
Prerequisites
- Python 3.10 or newer installed
- An Azure AD (Entra ID) tenant with an App Registration that has the required Microsoft Graph API permissions
- TENANT_ID, CLIENT_ID, and CLIENT_SECRET for the registered application
- fastmcp installed: pip install fastmcp msgraph-sdk azure-identity azure-core msgraph-core
- An MCP-compatible client such as Claude Desktop or Cursor
Clone the repository
Clone the EntraID MCP Server source code from GitHub and enter the project directory.
git clone https://github.com/hieuttmmo/entraid-mcp-server.git
cd entraid-mcp-serverCreate and populate the .env file
Copy the example environment file and fill in your Azure AD tenant credentials. Never commit this file to version control.
cp config/.env.example config/.env
# Edit config/.env and set:
# TENANT_ID=<your-azure-tenant-id>
# CLIENT_ID=<your-app-client-id>
# CLIENT_SECRET=<your-client-secret-value>Install Python dependencies
Install all required packages using pip, including the Microsoft Graph SDK, FastMCP, and Azure Identity libraries.
pip install fastmcp msgraph-sdk azure-identity azure-core msgraph-coreTest the server in development mode
Run the server in FastMCP development mode to verify connectivity to your Entra ID tenant before wiring it into a client.
fastmcp dev 'src/msgraph_mcp_server/server.py'Install the server into Claude Desktop
Use fastmcp install to register the server permanently in Claude Desktop, passing your .env file so credentials are injected at runtime.
fastmcp install 'src/msgraph_mcp_server/server.py' \
--with msgraph-sdk --with azure-identity --with azure-core --with msgraph-core \
-f config/.envConfigure for Cursor (optional)
If using Cursor, add the server configuration to .cursor/mcp.json using uv run so all dependencies are resolved automatically.
Entra ID Examples
Client configuration (Claude Desktop)
Add this block to your claude_desktop_config.json to connect Claude Desktop to the EntraID MCP Server using uv run.
{
"mcpServers": {
"entraid": {
"command": "fastmcp",
"args": [
"run",
"/path/to/entraid-mcp-server/src/msgraph_mcp_server/server.py"
],
"env": {
"TENANT_ID": "<your-tenant-id>",
"CLIENT_ID": "<your-client-id>",
"CLIENT_SECRET": "<your-client-secret>"
}
}
}
}Prompts to try
Example natural-language prompts that leverage the EntraID MCP Server tools for user and group management tasks.
- "List all users in our tenant who have Global Administrator role assigned."
- "Check the MFA registration status for user [email protected]."
- "Show me the last 20 sign-in events for user [email protected] and flag any failures."
- "Create a new security group called 'DevOps-Team' and add [email protected] as an owner."
- "What are the minimal Microsoft Graph permissions I need to reset a user's password?"Troubleshooting Entra ID
Authentication fails with 'ClientAuthenticationError' or 'AADSTS' error codes.
Verify that TENANT_ID, CLIENT_ID, and CLIENT_SECRET in config/.env are correct. Confirm the App Registration in Azure AD has the required Graph API application permissions granted and admin consent has been provided.
Tools return 'Insufficient privileges' errors when querying sign-in logs or audit data.
The App Registration needs AuditLog.Read.All and Directory.Read.All permissions in Microsoft Graph. Navigate to Azure Portal > App registrations > your app > API permissions and grant those scopes with admin consent.
fastmcp install command is not found.
Install FastMCP globally with 'pip install fastmcp', then verify the binary is in your PATH by running 'fastmcp --version'.
Frequently Asked Questions about Entra ID
What is Entra ID?
Entra ID is a Model Context Protocol (MCP) server that mcp server for interacting with entraid through microsoft graph api. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Entra ID?
Follow the installation instructions on the Entra ID GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Entra ID?
Entra ID works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Entra ID free to use?
Yes, Entra ID is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Entra ID Alternatives — Similar Security Servers
Looking for alternatives to Entra ID? Here are other popular security servers you can use with Claude, Cursor, and VS Code.
Casdoor
★ 13.6kAn open-source Agent-first Identity and Access Management (IAM) /LLM MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
ghidraMCP
★ 9.0kAn Model Context Protocol server that enables LLMs to autonomously reverse engineer applications by exposing Ghidra's decompilation and analysis tools. It allows AI agents to list code structures, rename methods, and analyze binaries directly through
HexStrike AI
★ 8.9kHexStrike AI MCP Agents is an advanced MCP server that lets AI agents (Claude, GPT, Copilot, etc.) autonomously run 150+ cybersecurity tools for automated pentesting, vulnerability discovery, bug bounty automation, and security research. Seamlessly b
IDA Pro MCP
★ 8.7kEnables AI-assisted reverse engineering in IDA Pro by providing tools to analyze binaries, decompile functions, manage comments, search patterns, and interact with the IDA database through natural language.
Anthropic Cybersecurity Skills
★ 6.6k754 structured cybersecurity skills for AI agents · Mapped to 5 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND & NIST AI RMF · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platform
Hooker
★ 5.1k🔥🔥 hooker is a Frida-based reverse engineering toolkit for Android. It offers a user-friendly CLI, universal scripts, auto hook generation, memory roaming to detect activities/services, one-click SOCKS5 proxy setup, Frida JustTrustMe, and BoringSSL u
Browse More Security MCP Servers
Explore all security servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Entra ID in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Entra ID?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.