For The Microsoft Graph Api MCP Server

Model-context-protocol (MCP) server for the Microsoft Graph API in C#

Local serverstdio

What is the For The Microsoft Graph Api MCP server?

Model-context-protocol (MCP) server for the Microsoft Graph API in C#. The for the microsoft graph api mcp server wraps that behind the Model Context Protocol, so an assistant can use it rather than through you.

What it actually does

Register a new Entra ID application, add and grant at least the User.Read.All application permission and create a new client secret.

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Configuration

You will need 5 environment variables: TENANT_ID, CLIENT_ID, CLIENT_SECRET, NATIONAL_CLOUD, AZURE_OPENAI_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the for the microsoft graph api mcp server does with a few real requests.

When to reach for it

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. It is maintained by MartinM85; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

How to install the For The Microsoft Graph Api MCP server

{
    "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"
            }
        }
    }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
TENANT_IDConfiguration value read at startup.Optional
CLIENT_IDConfiguration value read at startup.Optional
CLIENT_SECRETCredential the server authenticates with.Yes
NATIONAL_CLOUDConfiguration value read at startup.Optional
AZURE_OPENAI_API_KEYCredential the server authenticates with.Yes

Frequently asked questions

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).