Microsoft Graph MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Microsoft Graph MCP Serverassign a Microsoft 365 E3 license to john.doe@company.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
[!Version](https://github.com/ry-ops/microsoft-graph-mcp-server/releases) [!License](LICENSE) [!Python](https://python.org) [!MCP](https://modelcontextprotocol.io)
Microsoft Graph API MCP Server
A Model Context Protocol (MCP) server that integrates Microsoft Graph API with Claude, enabling management of Microsoft 365 users, licenses, and groups.
Features
User Management: Create new Microsoft 365 users
License Management: Assign licenses to users with optional service plan customization
Group Management: Add users to groups
Query Operations: List available licenses, groups, and search for users
A2A Protocol Support: Agent-to-Agent communication for automated M365 administration
Related MCP server: Microsoft Graph MCP Server
Prerequisites
Microsoft Azure App Registration:
An Azure AD application with the following API permissions:
User.ReadWrite.AllDirectory.ReadWrite.AllGroup.ReadWrite.AllOrganization.Read.All
Admin consent granted for these permissions
A client secret generated
Python 3.10+ and uv package manager
Setup
1. Install uv (if not already installed)
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"2. Clone and Setup Project
# Create project directory
mkdir microsoft-graph-mcp
cd microsoft-graph-mcp
# Copy the server files
# (copy mcp_graph_server.py and pyproject.toml to this directory)
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate # On Windows: .venv\Scriptsctivate
uv pip install -e .3. Configure Environment Variables
Create a .env file in the project root:
MICROSOFT_TENANT_ID=your-tenant-id
MICROSOFT_CLIENT_ID=your-client-id
MICROSOFT_CLIENT_SECRET=your-client-secretTo find these values:
Go to Azure Portal
Navigate to Azure Active Directory → App registrations
Select your app registration
Tenant ID: Found in the Overview page
Client ID: Application (client) ID in the Overview page
Client Secret: Create one in Certificates & secrets
4. Configure Claude Desktop
Add the server configuration to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: `%APPDATA%\Claude
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
*Updated June 17th 2025** Manage your Microsoft 365 services effortlessly. Create and manage distr…
Permissioned access to Outlook, OneDrive and Teams via the user's own Microsoft account
Manage repositories, users, releases, and automate GitHub workflows
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceProvides comprehensive management of Microsoft 365 services including Exchange, SharePoint, Teams, Azure AD, Intune device management, security & compliance frameworks, and universal access to 1000+ Microsoft Graph API endpoints with advanced features like batch operations, delta queries, and real-time webhooks.5015-
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to interact with Microsoft 365 services (users, mail, calendar, files) via Microsoft Graph API.28 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants and automation tools to manage Microsoft 365, Entra ID, and Intune resources through 32 tools for user/device/file management and infrastructure monitoring.6MIT
- AlicenseAqualityBmaintenanceEnables identity provisioning and management for Microsoft 365/Entra ID via Microsoft Graph, including user creation, license assignment, group membership management, and more, with a focus on least-privilege and idempotency.18Apache 2.0