Get the FREE Ultimate OpenClaw Setup Guide →

mcp -graph-api

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

How to use

The mcp-graph-api server is a Model Context Protocol (MCP) implementation designed specifically for interacting with the Microsoft Graph API using C#. This server allows developers to seamlessly integrate Microsoft 365 services into their applications, enabling capabilities such as user management, file manipulation, and calendar synchronization through a unified protocol. By connecting to this server, you can leverage the rich features of the Microsoft ecosystem while maintaining an organized context for your data transactions.

Once connected to the mcp-graph-api server, you can interact with the Microsoft Graph API by sending well-structured requests that conform to the MCP format. You can execute a variety of queries, such as retrieving user profiles, accessing OneDrive files, or managing Outlook calendars. For optimal results, ensure your queries include the necessary scope and permissions to interact with the specific Microsoft services you are targeting. You can also utilize the built-in logging features to monitor your request and response cycles for easier debugging.

How to install

To install the mcp-graph-api server, ensure you have the following prerequisites:

  • .NET SDK (version 5.0 or later)

Option A: Quick start with npx

Currently, there is no NPM package available for this server, so this option is not applicable.

Option B: Global install alternative

You can clone the repository directly from GitHub and run it locally. Use the following commands:

git clone https://github.com/MartinM85/mcp-server-graph-api.git
cd mcp-server-graph-api
dotnet run

Ensure you are in the project directory before executing dotnet run to start the server.

Additional notes

When configuring the mcp-graph-api, ensure you set up the necessary environment variables for authentication, such as CLIENT_ID, CLIENT_SECRET, and TENANT_ID, to successfully connect to the Microsoft Graph API. A common gotcha is neglecting to grant the appropriate permissions in your Azure Active Directory application, which can lead to access errors when attempting to make API calls. Always refer to the official Microsoft Graph API documentation for the latest permission requirements.

Related MCP Servers

Sponsor this space

Reach thousands of developers