A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
A Model Context Protocol (MCP) server for Microsoft 365 integration. Provides 24 consolidated tools for email, calendar,
This is a comprehensive implementation of the Office MCP (Model Context Protocol) server that connects Claude with Microsoft 365 services through the Microsoft Graph API.
Headless Operation! Run without browser authentication after initial setup. Automatic token refresh and Windows Task Scheduler support for invisible background operation. See TASK_SCHEDULER_SETUP.md for Windows setup guide.
DEVELOPMENT STATUS: This project is under active development and is not yet production-ready. APIs, interfaces, and functionality may change without notice. Use at your own risk for evaluation and testing purposes only. Not recommended for production deployments.
.Shared scopesgit clone https://github.com/yourusername/office-mcp.git
cd office-mcp
npm install
cp .env.example .env
Configure your .env file with:
Run initial authentication:
npm run auth-server
# Visit http://localhost:3000/auth and sign in
The server uses a consolidated tool design where each Microsoft 365 domain is exposed as a single tool with operation (and optionally entity) routing. This minimizes LLM context overhead while providing full functionality.
| Tool | Domain | Operations |
|---|---|---|
system | Auth & server info | about, authenticate, check_status |
mail | list, read, send, reply, draft, search, move, folder, rules, categories, focused | |
calendar | Calendar events | list, get, create, update, delete, find_free_slots |
teams_meeting | Teams meetings | create, update, cancel, find, list_transcripts, get_transcript, get_recordings |
teams_channel | Teams channels | list, create, get, update, delete, send_message, list_messages, list_members |
teams_chat | Teams chat | list, create, get, send_message, list_messages, list_members |
files | OneDrive/SharePoint | list, get, search, upload, download, create_folder, delete, move, copy, share — all operations support cross-drive via driveId |
search | Unified search | Keyword-based search across mail, files, events — returns ID and DriveID for actionable results |
contacts | Outlook contacts | list, get, create, update, delete, search, list_folders |
planner | Microsoft Planner | Entity+operation: plan.list, task.create, bucket.get_tasks, user.lookup, etc. |
todo | Microsoft To Do | list_lists, create_list, list_tasks, create_task, update_task, list_checklist, etc. |
groups | M365 Groups | list, get, create, update, delete, list_members, add_member, remove_member, list_owners, get_drive, list_drives |
directory | User directory | lookup_user, get_profile, get_manager, get_reports, get_presence, search_users |
notifications | Webhooks | create, list, renew, delete |
All tools are wrapped with safeTool() which provides:
isError: true responses for failures[calendar.create] Error: ...)To use this MCP server you need to first register and configure an app in Azure Portal. The following steps will take you through the process of registering a new app, configuring its permissions, and generating a client secret.
# Azure App Registration
OFFICE_CLIENT_ID=your-azure-app-client-id
OFFICE_CLIENT_SECRET=your-azure-app-client-secret
OFFICE_TENANT_ID=common
# Authentication
OFFICE_REDIRECT_URI=http://localhost:3000/auth/callback
# Local file paths (customize to your system)
SHAREPOINT_SYNC_PATH=/path/to/your/sharepoint/sync
ONEDRIVE_SYNC_PATH=/path/to/your/onedrive/sync
TEMP_ATTACHMENTS_PATH=/path/to/temp/attachments
SHAREPOINT_SYMLINK_PATH=/path/to/sharepoint/symlink
# Server settings
USE_TEST_MODE=false
TRANSPORT_TYPE=stdio # or 'http' for SSE headless mode
HTTP_PORT=3333
HTTP_HOST=127.0.0.1
Locate your Claude Desktop configuration file:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonAdd the MCP server configuration:
{
"mcpServers": {
"office-mcp": {
"command": "node",
"args": ["/path/to/office-mcp/index.js"],
"env": {
"OFFICE_CLIENT_ID": "your-client-id",
"OFFICE_CLIENT_SECRET": "your-client-secret",
"SHAREPOINT_SYNC_PATH": "/path/to/sharepoint",
"ONEDRIVE_SYNC_PATH": "/path/to/onedrive"
}
}
}
}
Restart Claude Desktop
In Claude, use the system tool with operation: "authenticate" to connect to Microsoft 365
Test the server directly using the MCP Inspector:
npx @modelcontextprotocol/inspector node index.js
Enable test mode to use mock data without API calls:
USE_TEST_MODE=true node index.js
npm test
./start-auth-server.sh (or use npm run auth-server)system tool with operation: "authenticate" to get an authentication URL~/.office-mcp-tokens.jsonAfter initial authentication, the server automatically refreshes tokens without user interaction.
For headless environments, use SSE transport:
TRANSPORT_TYPE=http HTTP_PORT=3333 node index.js
The server exposes /sse (GET) for SSE connections and /message (POST) for client messages.
For Windows background operation:
Authentication Errors
~/.office-mcp-tokens.jsonEmail Search with Date Filters
* for all emails in a date rangestartDate and endDate support ISO format (2025-08-27) or relative (7d/1w/1m/1y)Email Attachment Issues
.envAPI Rate Limits
Permission Errors
.env filesContributions are welcome! Please:
MIT License - See LICENSE file for details
A Jetbrains IDE IntelliJ plugin aimed to provide coding agents the ability to leverage intelliJ's indexing of the codeba
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots