MCP Microsoft Office MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "AZURE_CLIENT_ID=${AZURE_CLIENT_ID}" -e "AZURE_TENANT_ID=${AZURE_TENANT_ID}" mcp-microsoft-office -- npx -y @aanerud/mcp-microsoft-office
Required:AZURE_CLIENT_IDAZURE_TENANT_ID
README.md

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:

  1. MCP Client -- the AI you interact with
  2. MCP Adapter -- a Node.js process that translates MCP protocol to HTTP requests (runs on the same machine as the client)
  3. 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

  1. Go to Azure Portal > Microsoft Entra ID > App registrations > New registration
  2. 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 Registration
AZURE_TENANT_IDrequiredThe Directory (tenant) ID from Azure App Registration

Configuration

claude_desktop_config.json
{"mcpServers": {"microsoft-office": {"command": "npx", "args": ["-y", "@aanerud/mcp-microsoft-office"], "env": {"AZURE_CLIENT_ID": "your-client-id", "AZURE_TENANT_ID": "your-tenant-id"}}}}

Try it

Check my calendar for any meetings scheduled for this afternoon and summarize them.
Draft an email to my team lead about the project status update and save it as a draft.
Find the latest document uploaded to my OneDrive regarding the Q4 budget.
Send a message to the project team channel in Teams confirming the meeting time.
List my pending tasks for today and prioritize them by deadline.

Frequently Asked Questions

What are the key features of MCP Microsoft Office?

Supports 78 tools across 9 modules including Mail, Calendar, Files, and Teams.. Enables multi-user environments with isolated data per user.. Performs real operations against actual Microsoft 365 tenant data via Graph API.. Secure architecture with tokens encrypted at rest.. Supports both basic and admin-consented permission scopes for advanced features..

What can I use MCP Microsoft Office for?

Automating email responses and calendar scheduling for busy professionals.. Managing file organization and sharing within OneDrive directly from an AI interface.. Streamlining team communication by sending automated updates to Microsoft Teams channels.. Integrating AI agents into real-world Microsoft 365 workflows for testing and productivity..

How do I install MCP Microsoft Office?

Install MCP Microsoft Office by running: npx -y @aanerud/mcp-microsoft-office

What MCP clients work with MCP Microsoft Office?

MCP Microsoft Office 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 MCP Microsoft Office 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