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 Server assign 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.
✨ Ask things like
"Onboard Jordan Lee to Sales with an E3 license." "Which licenses do we have, and how many are free?" "Who's in the Finance group?" "Find everyone called Taylor." "Move Sam from Marketing to Sales." "Who has access to the Projects SharePoint site? Give Alex read access."
Related MCP server: mcp-m365-mgmt
⚙️ How it works, and what it needs
The server signs in as an app registration with MSAL's client-credentials flow, with no user sign-in, and calls Microsoft Graph with that app-only token. What it can do is exactly what the application permissions you grant that app allow.
Area | Tools | Application permission |
Users (4) |
|
|
Licenses (2) |
|
|
Groups (4) |
|
|
SharePoint (9) |
|
|
✎ = changes your tenant. New users get a temporary password and must change it at first sign-in, unless you say otherwise.
🚀 Setup
1. Register an app in the Entra admin center: go to App registrations → New registration. Then:
add the application permissions from the table above for the areas you want, and grant admin consent;
create a client secret;
note the tenant ID and client ID.
AZURE_SETUP.md walks through it step by step. Add the Sites.* permissions if you want the SharePoint tools.
2. Install. You need Python 3.10+ and uv.
git clone https://github.com/ry-ops/microsoft-graph-mcp-server
cd microsoft-graph-mcp-server
uv sync3. Connect Claude Desktop. Add this to claude_desktop_config.json: ~/Library/Application Support/Claude/ on macOS, or %APPDATA%\Claude\ on Windows. There's a copy in claude_desktop_config.example.json.
{
"mcpServers": {
"microsoft-graph": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/microsoft-graph-mcp-server", "run", "mcp_graph_server.py"],
"env": {
"MICROSOFT_TENANT_ID": "your-tenant-id",
"MICROSOFT_CLIENT_ID": "your-client-id",
"MICROSOFT_CLIENT_SECRET": "your-client-secret"
}
}
}
}Quit and reopen Claude Desktop to load it. There are worked examples in EXAMPLES.md, a short version in QUICKSTART.md, and the design in PROJECT_OVERVIEW.md.
🔒 Security
Grant only the permissions you'll use. For a look-only assistant, use the
.Read.Allvariants and leave SharePointFullControlout.App-only tokens are powerful. They act across the whole tenant, not as one person. Keep the client secret in your MCP client's
envor a secrets manager, and rotate it.Keep your MCP client's tool approval on. Creating users, assigning licenses and changing site access take effect immediately.
🤝 Agent-to-agent (A2A)
agent-card.json describes the server's skills, inputs and authentication for other agents to discover.
🩺 Troubleshooting
Set MICROSOFT_TENANT_ID, MICROSOFT_CLIENT_ID and MICROSOFT_CLIENT_SECRET in the env block.
The app is missing an application permission for that tool, or admin consent wasn't granted. Check the table above.
Add Sites.Read.All, plus Sites.FullControl.All for the site-permission tools, and grant admin consent again.
🙌 Contributors
SharePoint site management was contributed by @caffeinebounce in #1. Thank you!
License
MIT. See LICENSE.
Available Tools
19 toolsadd_site_permissionC
Add a user permission to a SharePoint site
Inputs: site_id (required), user_id (required), role.
add_user_to_groupB
Add a user to a group (also grants access to group-connected SharePoint sites)
Inputs: user_id (required), group_id (required).
assign_licenseC
Assign a license to a user
Inputs: sku_id (required), user_id (required), disabled_plans.
create_userC
Create a new user in Microsoft 365
Inputs: password (required), display_name (required), mail_nickname (required), user_principal_name (required), +2 more.
get_group_membersC
Get all members of a group
Inputs: group_id (required).
get_root_siteB
Get the root SharePoint site for the tenant
Inputs: no named parameters.
get_siteA
Get details for a specific SharePoint site by ID
Inputs: site_id (required).
get_site_by_urlB
Get a SharePoint site by hostname and path
Inputs: hostname (required), site_path (required).
get_userC
Get details for a specific user
Inputs: user_id (required).
list_available_licensesA
List all available licenses (SKUs) in the tenant
Inputs: no named parameters.
list_groupsB
List all groups in the tenant
Inputs: no named parameters.
list_site_drivesB
List document libraries in a SharePoint site
Inputs: site_id (required).
list_site_listsC
List all lists in a SharePoint site
Inputs: site_id (required).
list_site_permissionsC
List all permissions on a SharePoint site
Inputs: site_id (required).
list_sitesA
List SharePoint sites in the tenant. Optionally search by name.
Inputs: search.
list_usersC
List all users in the tenant
Inputs: top.
remove_site_permissionC
Remove a permission from a SharePoint site
Inputs: site_id (required), permission_id (required).
remove_user_from_groupC
Remove a user from a group
Inputs: user_id (required), group_id (required).
search_userC
Search for users by display name or email
Inputs: search_term (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have clearly distinct resource+action targets, but the site-lookup family (get_site, get_site_by_url, get_root_site, plus list_sites with an optional search) offers four overlapping ways to reach a site, and search is a separate tool for users but a parameter for sites. User read tools (list_users, get_user, search_user) are distinguishable but close enough to occasionally confuse an agent.
Every tool follows a consistent snake_case verb_noun pattern (create_user, list_site_permissions, remove_site_permission, get_group_members). Verbs are used predictably for their operations (list_ for enumeration, get_ for single-resource retrieval, add_/remove_ for membership and permissions).
At 19 tools covering users, licenses, groups, SharePoint sites, permissions, drives, and lists, each tool maps to a distinct resource scope and the set is reasonably scoped. It sits at the upper end of comfortable, with the four site-getter tools being the main candidates for consolidation.
The surface is list/create-heavy: users can be created but not updated or deleted, licenses can be assigned but not revoked, and permissions can be added and removed but not updated. Most notably, list_site_drives is a dead end—there are no tools to enumerate drive items or read/write file content, which is a core Graph/SharePoint workflow left uncovered.
Maintenance
Related MCP Connectors
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
Microsoft 365, CRM, Partner Center and tenant operations for organisations and MSPs.
*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
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 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.8MIT
- 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
- AlicenseNot gradedqualityBmaintenanceEnables interaction with Microsoft 365 and Office services through the Microsoft Graph API, including email, calendar, files, Teams, SharePoint, and more.MIT