Connects AI assistants to Microsoft 365 accounts to manage M365 workflows.
MCP Microsoft Office
One MCP server. Multiple users. Real Microsoft 365 traffic on your test tenant.
The Problem
Test tenants sit empty. Static test data does not exercise real workflows. When you need agents that send real emails, schedule real meetings, and collaborate in real Teams channels, mocks and stubs fall short.
What This Solves
This project connects any MCP-compatible AI client to Microsoft 365 through the Graph API. Each agent authenticates as a distinct tenant user and performs real operations against real data.
- 78 tools across 9 modules: Mail, Calendar, Files, Teams, Contacts, To-Do, Groups, People, Search
- Multi-user: one server supports your entire team, each with isolated data
- Real Graph API calls: every operation hits the actual tenant, not a mock
- Secure: tokens encrypted at rest, no credentials stored on third-party servers
Architecture
┌──────────────────┐
│ MCP Client │
│ (Claude, etc.) │
└────────┬─────────┘
│ JSON-RPC (stdin/stdout)
┌────────▼─────────┐
│ MCP Adapter │
│ (runs locally) │
└────────┬─────────┘
│ HTTP + Bearer Token
┌────────▼─────────┐
│ MCP Server │
│ (local or │
│ remote) │
└────────┬─────────┘
│ Microsoft Graph API
┌────────▼─────────┐
│ Microsoft 365 │
│ (your tenant) │
└──────────────────┘
Three parts:
- MCP Client -- the AI you interact with
- MCP Adapter -- a Node.js process that translates MCP protocol to HTTP requests (runs on the same machine as the client)
- MCP Server -- handles authentication and calls the Microsoft Graph API (runs locally or on a remote server)
Permissions
The server requires 18 Microsoft Graph delegated permissions. Twelve work without admin consent. Six require a tenant administrator to grant consent.
No Admin Consent Required
| Permission | Tools Unlocked |
|---|---|
User.Read |
Authentication, user profile |
Mail.ReadWrite |
readMail, readMailDetails, markEmailRead, flagMail, getMailAttachments, addMailAttachment, removeMailAttachment |
Mail.Send |
sendMail, replyToMail |
Calendars.ReadWrite |
getEvents, createEvent, updateEvent, cancelEvent, acceptEvent, tentativelyAcceptEvent, declineEvent, getAvailability, findMeetingTimes, getRooms, getCalendars, addAttachment, removeAttachment |
Files.ReadWrite.All |
listFiles, uploadFile, downloadFile, getFileMetadata, getFileContent, setFileContent, updateFileContent, createSharingLink, getSharingLinks, removeSharingPermission, listChannelFiles, uploadFileToChannel, readChannelFile |
Contacts.ReadWrite |
listContacts, getContact, createContact, updateContact, deleteContact, searchContacts |
Tasks.ReadWrite |
listTaskLists, getTaskList, createTaskList, updateTaskList, deleteTaskList, listTasks, getTask, createTask, updateTask, deleteTask, completeTask |
Chat.ReadWrite |
listChats, createChat, getChatMessages, sendChatMessage |
Channel.ReadBasic.All |
listTeamChannels, getChannelMessages |
ChannelMessage.Send |
sendChannelMessage, replyToMessage |
Channel.Create |
createTeamChannel |
OnlineMeetings.ReadWrite |
createOnlineMeeting, getOnlineMeeting, listOnlineMeetings, getMeetingByJoinUrl |
Requires Admin Consent
| Permission | Additional Tools Unlocked |
|---|---|
User.Read.All |
Resolve user IDs across Teams, People search |
People.Read.All |
findPeople, getRelevantPeople, getPersonById |
Group.Read.All |
listGroups, getGroup, listGroupMembers, listMyGroups |
ChannelMember.ReadWrite.All |
addChannelMember |
ChannelMessage.Read.All |
Read channel message history |
OnlineMeetingTranscript.Read.All |
getMeetingTranscripts, getMeetingTranscriptContent |
Without admin consent, you get Mail, Calendar, Files, Contacts, To-Do, Chat, and basic Teams channel operations. With admin consent, you add People directory search, Groups, channel member management, and meeting transcripts.
Quick Start
Prerequisites
- Node.js 18+ (download)
- Claude Desktop (download) or another MCP client
- Microsoft 365 account (work, school, or personal)
Step 1: Azure App Registration
- Go to Azure Portal > Microsoft Entra ID > App registrations > New registration
- Name it
MCP-Microsoft-Office, register wi
Tools (5)
sendMailSends an email message from the authenticated user account.createEventCreates a new calendar event.uploadFileUploads a file to the user's OneDrive.sendChatMessageSends a message to a specific Microsoft Teams chat.listTasksLists tasks from the user's To-Do lists.Environment Variables
AZURE_CLIENT_IDrequiredThe Application (client) ID from Azure App RegistrationAZURE_TENANT_IDrequiredThe Directory (tenant) ID from Azure App RegistrationConfiguration
{"mcpServers": {"microsoft-office": {"command": "npx", "args": ["-y", "@aanerud/mcp-microsoft-office"], "env": {"AZURE_CLIENT_ID": "your-client-id", "AZURE_TENANT_ID": "your-tenant-id"}}}}