microsoft-graph
MCP server integrating Microsoft Graph API for managing Microsoft 365 users, licenses, and groups
claude mcp add --transport stdio ry-ops-microsoft-graph-mcp-server uvx microsoft_graph_mcp_server
How to use
This MCP server exposes Microsoft Graph capabilities through an integration with Claude, enabling automated administration of Microsoft 365 users, licenses, and groups. It supports creating new users, assigning licenses with optional service plan customization, adding users to groups, and querying available licenses or groups. The server uses a Python-based implementation and is designed to be managed through MCP tooling and Claude agent-to-agent communications for automated workflows. After starting the server, you can invoke its commands via MCP clients to perform common admin tasks, as well as leverage Claude to generate or modify user records, group memberships, and license configurations in a conversational or scripted fashion.
How to install
Prerequisites:
- Python 3.10+ installed
- uv package manager (uv) installed
Installation steps:
-
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"
-
Clone or set up the project directory mkdir microsoft-graph-mcp cd microsoft-graph-mcp
-
Prepare Python environment and install the server package
Create and activate a virtual environment using uv
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install the package in editable mode (as described in the repo)
uv pip install -e .
-
Configure environment variables (see below) and start using the MCP server
Environment variables and configuration: Create a .env file in the project root with: MICROSOFT_TENANT_ID=your-tenant-id MICROSOFT_CLIENT_ID=your-client-id MICROSOFT_CLIENT_SECRET=your-client-secret
Notes:
- Ensure you have an Azure AD app registered with the required permissions (User.ReadWrite.All, Directory.ReadWrite.All, Group.ReadWrite.All, Organization.Read.All) and admin consent.
- The server expects these credentials to authenticate to Microsoft Graph.
To run the server in your MCP environment, use the mcp_config shown above (uvx with the appropriate package name).
Additional notes
Tips and common issues:
- Ensure your Azure AD app has the necessary permissions granted and a valid client secret.
- If you encounter environment variable issues, double-check the .env file path and that the file is loaded by the server process.
- If the package name used in the mcp_config does not match your installation, adjust the args to reflect the actual Python package name defined in pyproject.toml or setup.py.
- When running on Windows, use the Windows activation command for the virtual environment and adapt path separators accordingly.
- The server exposes operations for user creation, license assignment, and group management; use Claude’s UI or CLI integrations to invoke these actions through the MCP protocol.
Related MCP Servers
MCP-Bridge
A middleware to provide an openAI compatible endpoint that can call MCP tools
mcp-google-ads
An MCP tool that connects Google Ads with Claude AI/Cursor and others, allowing you to analyze your advertising data through natural language conversations. This integration gives you access to campaign information, performance metrics, keyword analytics, and ad management—all through simple chat with Claude, Cursor or Windsurf.
mcp-rquest
A MCP server providing realistic browser-like HTTP request capabilities with accurate TLS/JA3/JA4 fingerprints for bypassing anti-bot measures. It also supports converting PDF and HTML documents to Markdown for easier processing by LLMs.
asterisk
Asterisk Model Context Protocol (MCP) server.
azure-fhir
Azure AHDS FHIR MCP Server
google-search-console
It connects directly to your Google Search Console account via the official API, letting you access key data right from AI tools like Claude Desktop or OpenAI Agents SDK and others .