GraphAPI MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "GRAPH_API_REQUESTROCKET_URL=${GRAPH_API_REQUESTROCKET_URL}" -e "GRAPH_API_REQUESTROCKET_KEY=${GRAPH_API_REQUESTROCKET_KEY}" graphapi -- python "<FULL_PATH_TO_GRAPHAPI_MCP>/dist/index.js"

Replace <FULL_PATH_TO_GRAPHAPI_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:GRAPH_API_REQUESTROCKET_URLGRAPH_API_REQUESTROCKET_KEY+ 1 optional
README.md

Minimal Python MCP server for authenticated Microsoft Graph API calls

graph-mcp

Minimal Python MCP server that exposes one tool, graphapi, for authenticated Microsoft Graph API calls through a RequestRocket proxy.

Setup

pip install -r requirements.txt

Copy .env.example to config.env or .env in this directory (same folder as server.py) and set:

  • GRAPH_API_REQUESTROCKET_URL — proxy base URL (no trailing slash required; it is stripped)
  • GRAPH_API_REQUESTROCKET_KEY — authorization value sent as the Authorization header

Alternatively, set those variables in your environment. To load credentials from another file (for example Cowork’s config.env), set:

export DOTENV_PATH=/path/to/config.env

Run

python server.py

The server uses stdio transport (FastMCP default). On startup it logs the proxy URL and tool signature to stdout.

Tool: `graphapi`

Argument Description
method GET, POST, PATCH, PUT, or DELETE
path Graph path such as /me/messages. A leading https://graph.microsoft.com/v1.0 prefix is stripped.
params Optional query parameters (e.g. {"$top": 10})
body Optional JSON body for POST / PATCH / PUT

Successful responses return {"status": <code>, "data": ...} where data is parsed JSON or plain text if the body is not JSON. HTTP errors return {"status": <code>, "error": "<body>"}. Connection failures return {"error": "<message>"}.

Cowork (local MCP)

Add a local MCP connector:

python /path/to/graph-mcp/server.py

If credentials live elsewhere, set DOTENV_PATH to that file, for example:

DOTENV_PATH=/Users/you/project/config.env

Requirements

See requirements.txt: mcp[cli], httpx, python-dotenv, pydantic.

Tools (1)

graphapiExecutes authenticated Microsoft Graph API calls using standard HTTP methods.

Environment Variables

GRAPH_API_REQUESTROCKET_URLrequiredProxy base URL for Microsoft Graph API requests
GRAPH_API_REQUESTROCKET_KEYrequiredAuthorization value for the proxy header
DOTENV_PATHOptional path to a custom environment file

Configuration

claude_desktop_config.json
{"mcpServers": {"graphapi": {"command": "python", "args": ["/path/to/graph-mcp/server.py"], "env": {"GRAPH_API_REQUESTROCKET_URL": "your-proxy-url", "GRAPH_API_REQUESTROCKET_KEY": "your-key"}}}}

Try it

Fetch my recent messages from Microsoft Graph using the /me/messages endpoint.
Get the top 10 items from my calendar using the graphapi tool.
Update my profile status by sending a PATCH request to /me.

Frequently Asked Questions

What are the key features of GraphAPI MCP?

Authenticated Microsoft Graph API interaction. Supports GET, POST, PATCH, PUT, and DELETE HTTP methods. Automatic stripping of graph.microsoft.com/v1.0 prefix. JSON response parsing and error handling. Proxy-based architecture via RequestRocket.

What can I use GraphAPI MCP for?

Automating retrieval of Outlook emails and calendar events. Managing Microsoft 365 user profile data via LLM. Integrating Microsoft Graph services into custom AI workflows.

How do I install GraphAPI MCP?

Install GraphAPI MCP by running: pip install -r requirements.txt

What MCP clients work with GraphAPI MCP?

GraphAPI MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep GraphAPI MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare