MCP Server for the Microsoft Graph Api
@MartinM85
About MCP Server for the Microsoft Graph Api
Model-context-protocol (MCP) server for the Microsoft Graph API in C#
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"graphApi": {
"command": "dotnet",
"args": [
"run",
"--project",
"path/to/folder/with/console_project",
"--no-build"
],
"env": {
"TENANT_ID": "<tenant_id>",
"CLIENT_ID": "<client_id>",
"CLIENT_SECRET": "<client_secret>",
"NATIONAL_CLOUD": "Global"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP Server for the Microsoft Graph Api?
An MCP (Model Context Protocol) server written in C# that enables AI assistants (such as Claude or Azure OpenAI) to interact with the Microsoft Graph API and answer questions about your Microsoft Entra tenant.
How to use MCP Server for the Microsoft Graph Api?
Register an Entra ID application with at least User.Read.All permission, then configure the server in claude_desktop_config.json with your tenant ID, client ID, client secret, and optional national cloud endpoint. Build the solution, and the MCP server will be automatically discovered by the Claude Desktop app.
Key features of MCP Server for the Microsoft Graph Api
- Connects AI assistants to the Microsoft Graph API
- Supports multiple national clouds (Global, US Gov, China, Germany)
- Uses app‑only authentication via Entra ID client secret
- Exposes Graph API tools through the Model Context Protocol
- Compatible with Claude Desktop and any MCP client
- Optionally works with Azure OpenAI Service or Anthropic Claude API
Use cases of MCP Server for the Microsoft Graph Api
- Let an AI assistant query user or group information from your Microsoft 365 tenant
- Automate common administration tasks by sending natural language requests to Microsoft Graph
- Integrate Copilot or similar tools with your tenant’s directory data
FAQ from MCP Server for the Microsoft Graph Api
What runtime and dependencies are required?
The project is a .NET console application built with C#. You need the .NET SDK installed to build and run it (using the dotnet command).
How does authentication work?
The server uses an Entra ID application with a client secret (app‑only authentication). You must grant at least the User.Read.All application permission and provide the tenant ID, client ID, and client secret in environment variables.
Can I use a national cloud other than the global Microsoft Graph service?
Yes. Set the NATIONAL_CLOUD environment variable to Global, US_GOV, US_GOV_DOD, China, or Germany to target the corresponding Microsoft Graph endpoint.
Which transports and authentication are supported by the MCP server?
The server uses command‑line stdio (standard input/output) for transport, as configured in claude_desktop_config.json. Authentication is always via Entra ID client credentials.
Where are logs stored if something goes wrong?
When using Claude Desktop, logs can be found in %APPDATA%\Claude\logs on Windows.
More Developer Tools MCP servers
Smithery CLI
smithery-aiInstall, manage and develop MCP servers and skills for agents
nuxt-mcp / vite-plugin-mcp
antfuMCP server helping models to understand your Vite/Nuxt app better.
MCP-Scan: An MCP Security Scanner
invariantlabs-aiSecurity scanner for AI agents, MCP servers and agent skills.
Huoshan Test
volcengineDevDocs by CyberAGI 🚀
cyberagiincCompletely free, private, UI based Tech Documentation MCP server. Designed for coders and software developers in mind. Easily integrate into Cursor, Windsurf, Cline, Roo Code, Claude Desktop App
Comments