ForIT Microsoft Graph
A lean MCP (Model Context Protocol) server for raw Microsoft Graph API access with multi-tenant account management.
The Problem
AI assistants using Microsoft Graph face two challenges:
Context bloat - Existing MCPs expose 30-40 specialized tools, consuming ~12KB of context per conversation
Multi-tenant friction - Managing multiple Microsoft 365 accounts requires constant switching
The Solution
7 tools. ~1KB context. Direct tenant access.
Tool | Description |
| Authenticate with Microsoft (device code flow) |
| Log out from Microsoft account |
| Check authentication status |
| List all cached Microsoft accounts |
| Switch default account |
| Remove an account from cache |
| Execute any Graph API request |
Why This Approach?
Instead of 30+ specialized tools like list-mail-messages, create-calendar-event, get-user, etc., we expose one flexible tool that can call any Graph API endpoint. The AI already knows the Graph API - it doesn't need hand-holding.
Before (Softeria, 37 tools):
After (ForIT, 1 tool):
Multi-Tenant Without Switching
The killer feature: reference any account directly without switching.
Query both tenants in the same conversation. No select-account dance required.
Installation
Quick Start
With Claude Desktop / MCP Client
Login to Multiple Tenants
The graph-request Tool
Parameters
Parameter | Type | Description |
| string | Graph API path (e.g.,
,
,
) |
| enum |
,
,
,
,
(default: GET) |
| object | Request body for POST/PUT/PATCH |
| object | OData params (
,
,
,
, etc.) |
| object | Additional HTTP headers |
| enum |
(default) or
|
| string | Target specific tenant without switching |
Examples
Get current user:
List unread emails:
Create calendar event:
Use beta API:
Cross-tenant query:
Use With PnP CLI
This MCP complements PnP CLI for Microsoft 365:
Use Case | Tool |
Raw Graph API calls | ForIT Microsoft Graph |
SharePoint, Teams, Power Platform | PnP CLI |
Multi-tenant management | ForIT Microsoft Graph |
Specialized admin commands | PnP CLI |
Environment Variables
Variable | Description |
| Azure AD app client ID (optional) |
| Client secret for confidential apps |
| Azure AD tenant ID (default:
) |
Credits
Fork of @softeria/ms-365-mcp-server, rebuilt with a different philosophy: less is more.
License
MIT - See LICENSE