Microsoft MCP
The Microsoft MCP server is a powerful AI assistant toolkit for managing Microsoft services through the Microsoft Graph API, enabling interactions with:
Email Management: Read, send, reply to emails, manage attachments, organize folders, mark emails as read/unread, and search emails
Calendar Management: Create, update, delete, and respond to events, check availability, and search calendar events
OneDrive Management: Browse, upload, download, delete, and search files and folders
Contact Management: List, create, update, delete, and search contacts
Multi-Account Support: Manage multiple Microsoft accounts (personal, work, school) via the
account_idparameterUnified Search: Search across emails, files, events, and contacts with a single query
AI Assistant Capabilities: Smart email management and intelligent scheduling
Allows cloning the Microsoft MCP server repository for installation and setup purposes.
Provides access to the Microsoft MCP repository for installation and configuration of the server.
Provides testing capabilities for the Microsoft MCP server development.
Used for running the Microsoft MCP server implementation and authentication scripts.
Enables code formatting and linting for the Microsoft MCP server codebase.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Microsoft MCP show my calendar for tomorrow"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Microsoft MCP
Powerful MCP server for Microsoft Graph API - a complete AI assistant toolkit for Outlook, Calendar, OneDrive, and Contacts.
Features
Email Management: Read, send, reply, manage attachments, organize folders
Calendar Intelligence: Create, update, check availability, respond to invitations
OneDrive Files: Upload, download, browse with pagination
Contacts: Search and list contacts from your address book
Multi-Account: Support for multiple Microsoft accounts (personal, work, school)
Unified Search: Search across emails, files, events, and people
Related MCP server: Microsoft 365 MCP Server
Quick Start with Claude Desktop
# Add Microsoft MCP server (replace with your Azure app ID)
claude mcp add microsoft-mcp -e MICROSOFT_MCP_CLIENT_ID=your-app-id-here -- uvx --from git+https://github.com/elyxlz/microsoft-mcp.git microsoft-mcp
# Start Claude Desktop
claudeUsage Examples
# Email examples
> read my latest emails with full content
> reply to the email from John saying "I'll review this today"
> send an email with attachment to alice@example.com
# Calendar examples
> show my calendar for next week
> check if I'm free tomorrow at 2pm
> create a meeting with Bob next Monday at 10am
# File examples
> list files in my OneDrive
> upload this report to OneDrive
> search for "project proposal" across all my files
# Multi-account
> list all my Microsoft accounts
> send email from my work accountAvailable Tools
Email Tools
list_emails- List emails with optional body contentget_email- Get specific email with attachmentscreate_email_draft- Create email draft with attachments supportsend_email- Send email immediately with CC/BCC and attachmentsreply_to_email- Reply maintaining thread contextreply_all_email- Reply to all recipients in threadupdate_email- Mark emails as read/unreadmove_email- Move emails between foldersdelete_email- Delete emailsget_attachment- Get email attachment contentsearch_emails- Search emails by query
Calendar Tools
list_events- List calendar events with detailsget_event- Get specific event detailscreate_event- Create events with location and attendeesupdate_event- Reschedule or modify eventsdelete_event- Cancel eventsrespond_event- Accept/decline/tentative response to invitationscheck_availability- Check free/busy times for schedulingsearch_events- Search calendar events
Contact Tools
list_contacts- List all contactsget_contact- Get specific contact detailscreate_contact- Create new contactupdate_contact- Update contact informationdelete_contact- Delete contactsearch_contacts- Search contacts by query
File Tools
list_files- Browse OneDrive files and foldersget_file- Download file contentcreate_file- Upload files to OneDriveupdate_file- Update existing file contentdelete_file- Delete files or folderssearch_files- Search files in OneDrive
Utility Tools
unified_search- Search across emails, events, and fileslist_accounts- Show authenticated Microsoft accountsauthenticate_account- Start authentication for a new Microsoft accountcomplete_authentication- Complete the authentication process after entering device code
Manual Setup
1. Azure App Registration
Go to Azure Portal → Microsoft Entra ID → App registrations
New registration → Name:
microsoft-mcpSupported account types: Personal + Work/School
Authentication → Allow public client flows: Yes
API permissions → Add these delegated permissions:
Mail.ReadWrite
Calendars.ReadWrite
Files.ReadWrite
Contacts.Read
People.Read
User.Read
Copy Application ID
2. Installation
git clone https://github.com/elyxlz/microsoft-mcp.git
cd microsoft-mcp
uv sync3. Authentication
# Set your Azure app ID
export MICROSOFT_MCP_CLIENT_ID="your-app-id-here"
# Run authentication script
uv run authenticate.py
# Follow the prompts to authenticate your Microsoft accounts4. Claude Desktop Configuration
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"microsoft": {
"command": "uvx",
"args": ["--from", "git+https://github.com/elyxlz/microsoft-mcp.git", "microsoft-mcp"],
"env": {
"MICROSOFT_MCP_CLIENT_ID": "your-app-id-here"
}
}
}
}Or for local development:
{
"mcpServers": {
"microsoft": {
"command": "uv",
"args": ["--directory", "/path/to/microsoft-mcp", "run", "microsoft-mcp"],
"env": {
"MICROSOFT_MCP_CLIENT_ID": "your-app-id-here"
}
}
}
}Multi-Account Support
All tools require an account_id parameter as the first argument:
# List accounts to get IDs
accounts = list_accounts()
account_id = accounts[0]["account_id"]
# Use account for operations
send_email(account_id, "user@example.com", "Subject", "Body")
list_emails(account_id, limit=10, include_body=True)
create_event(account_id, "Meeting", "2024-01-15T10:00:00Z", "2024-01-15T11:00:00Z")Development
# Run tests
uv run pytest tests/ -v
# Type checking
uv run pyright
# Format code
uvx ruff format .
# Lint
uvx ruff check --fix --unsafe-fixes .Example: AI Assistant Scenarios
Smart Email Management
# Get account ID first
accounts = list_accounts()
account_id = accounts[0]["account_id"]
# List latest emails with full content
emails = list_emails(account_id, limit=10, include_body=True)
# Reply maintaining thread
reply_to_email(account_id, email_id, "Thanks for your message. I'll review and get back to you.")
# Forward with attachments
email = get_email(email_id, account_id)
attachments = [get_attachment(email_id, att["id"], account_id) for att in email["attachments"]]
send_email(account_id, "boss@company.com", f"FW: {email['subject']}", email["body"]["content"], attachments=attachments)Intelligent Scheduling
# Get account ID first
accounts = list_accounts()
account_id = accounts[0]["account_id"]
# Check availability before scheduling
availability = check_availability(account_id, "2024-01-15T10:00:00Z", "2024-01-15T18:00:00Z", ["colleague@company.com"])
# Create meeting with details
create_event(
account_id,
"Project Review",
"2024-01-15T14:00:00Z",
"2024-01-15T15:00:00Z",
location="Conference Room A",
body="Quarterly review of project progress",
attendees=["colleague@company.com", "manager@company.com"]
)Security Notes
Tokens are cached locally in
~/.microsoft_mcp_token_cache.jsonUse app-specific passwords if you have 2FA enabled
Only request permissions your app actually needs
Consider using a dedicated app registration for production
Troubleshooting
Authentication fails: Check your CLIENT_ID is correct
"Need admin approval": Use
MICROSOFT_MCP_TENANT_ID=consumersfor personal accountsMissing permissions: Ensure all required API permissions are granted in Azure
Token errors: Delete
~/.microsoft_mcp_token_cache.jsonand re-authenticate
License
MIT
Available Tools
35 toolsauthenticate_accountA
Authenticate a new Microsoft account using device flow authentication
Returns authentication instructions and device code for the user to complete authentication. The user must visit the URL and enter the code to authenticate their Microsoft account.
Inputs: no named parameters.
check_availabilityC
Check calendar availability for scheduling
Inputs: account_id (required), end (required), start (required), attendees.
complete_authenticationB
Complete the authentication process after the user has entered the device code
Args:
flow_cache: The flow data returned from authenticate_account (the _flow_cache field)
Returns:
Account information if authentication was successful
Inputs: flow_cache (required).
create_contactC
Create a new contact
Inputs: account_id (required), given_name (required), email_addresses, phone_numbers, +1 more.
create_email_draftC
Create an email draft with file path(s) as attachments
Inputs: account_id (required), body (required), subject (required), to (required), +2 more.
create_eventC
Create a calendar event
Inputs: account_id (required), end (required), start (required), subject (required), +4 more.
create_fileC
Upload a local file to OneDrive
Inputs: account_id (required), local_file_path (required), onedrive_path (required).
delete_contactD
Delete a contact
Inputs: account_id (required), contact_id (required).
delete_emailC
Delete an email
Inputs: account_id (required), email_id (required).
delete_eventC
Delete or cancel a calendar event
Inputs: account_id (required), event_id (required), send_cancellation.
delete_fileC
Delete a file or folder
Inputs: account_id (required), file_id (required).
get_attachmentC
Download email attachment to a specified file path
Inputs: account_id (required), attachment_id (required), email_id (required), save_path (required).
get_contactD
Get contact details
Inputs: account_id (required), contact_id (required).
get_emailB
Get email details with size limits
Args:
email_id: The email ID
account_id: The account ID
include_body: Whether to include the email body (default: True)
body_max_length: Maximum characters for body content (default: 50000)
include_attachments: Whether to include attachment metadata (default: True)
Inputs: account_id (required), email_id (required), body_max_length, include_attachments, +1 more.
get_eventC
Get full event details
Inputs: account_id (required), event_id (required).
get_fileC
Download a file from OneDrive to local path
Inputs: account_id (required), download_path (required), file_id (required).
list_accountsB
List all signed-in Microsoft accounts
Inputs: no named parameters.
list_contactsD
List contacts
Inputs: account_id (required), limit.
list_emailsC
List emails from specified folder
Inputs: account_id (required), folder, include_body, limit.
list_eventsC
List calendar events within specified date range, including recurring event instances
Inputs: account_id (required), days_ahead, days_back, include_details.
list_filesC
List files and folders in OneDrive
Inputs: account_id (required), limit, path.
move_emailC
Move email to another folder
Inputs: account_id (required), destination_folder (required), email_id (required).
reply_all_emailC
Reply to all recipients of an email
Inputs: account_id (required), body (required), email_id (required).
reply_to_emailC
Reply to an email (sender only)
Inputs: account_id (required), body (required), email_id (required).
respond_eventB
Respond to event invitation (accept, decline, tentativelyAccept)
Inputs: account_id (required), event_id (required), message, response.
search_contactsB
Search contacts. Uses traditional search since unified_search doesn't support contacts.
Inputs: account_id (required), query (required), limit.
search_emailsC
Search emails using the modern search API.
Inputs: account_id (required), query (required), folder, limit.
search_eventsC
Search calendar events using the modern search API.
Inputs: account_id (required), query (required), days_ahead, days_back, +1 more.
search_filesC
Search for files in OneDrive using the modern search API.
Inputs: account_id (required), query (required), limit.
send_emailC
Send an email immediately with file path(s) as attachments
Inputs: account_id (required), body (required), subject (required), to (required), +2 more.
unified_searchB
Search across multiple Microsoft 365 resources using the modern search API
entity_types can include: 'message', 'event', 'drive', 'driveItem', 'list', 'listItem', 'site'
If not specified, searches across all available types.
Inputs: account_id (required), query (required), entity_types, limit.
update_contactD
Update contact information
Inputs: account_id (required), contact_id (required), updates (required).
update_emailC
Update email properties (isRead, categories, flag, etc.)
Inputs: account_id (required), email_id (required), updates (required).
update_eventD
Update event properties
Inputs: account_id (required), event_id (required), updates (required).
update_fileC
Update OneDrive file content from a local file
Inputs: account_id (required), file_id (required), local_file_path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Most tools have distinct purposes targeting specific Microsoft 365 resources (contacts, emails, events, files) with clear action verbs, though some overlap exists between search_* tools and unified_search which could cause confusion about when to use which search method. The authentication tools (authenticate_account and complete_authentication) are clearly sequential rather than overlapping.
Excellent consistency with a clear verb_noun pattern throughout all 35 tools (e.g., create_contact, delete_email, get_event, list_files, update_file). All tools use snake_case exclusively with no deviations in naming convention, making the tool set highly predictable and readable.
35 tools is borderline heavy for a Microsoft 365 integration, though it covers multiple domains (authentication, contacts, email, calendar, OneDrive). The count feels somewhat excessive with separate search tools for each resource type plus a unified search, creating potential redundancy that could be streamlined.
Excellent coverage of Microsoft 365 domains with complete CRUD operations for contacts, emails, events, and files, plus comprehensive search capabilities and authentication workflow. The tool set provides full lifecycle management with no obvious gaps - agents can create, read, update, delete, list, and search across all supported resource types.
Maintenance
Related MCP Connectors
One MCP server for the services your AI needs: memory, files, Microsoft 365, kanban and more.
Hosted MCP server connecting AI assistants to 9,000+ apps and 40,000+ actions via Zapier.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA production-ready MCP server that provides secure, delegated access to Microsoft 365 services including Email, SharePoint, OneDrive, and Calendar. It enables AI models to search messages, browse files, manage calendar events, and parse document contents using OAuth 2.1 authentication.MIT
- AlicenseCqualityNot gradedmaintenanceAn MCP server that enables interaction with Microsoft 365 services like Outlook, OneDrive, Teams, and SharePoint via the Microsoft Graph API. It supports comprehensive operations including email management, file access, and organizational collaboration for personal and work accounts.78-
- AlicenseNot gradedqualityDmaintenanceA secure remote MCP server that integrates Microsoft 365 services with AI assistants, enabling email, calendar, Teams, and contact operations via the Microsoft Graph API.2MIT
- FlicenseBqualityCmaintenanceMCP server providing AI assistants with full access to Microsoft Outlook email and calendar via the Microsoft Graph API, featuring 26 tools for mail, calendar, contacts, and scheduling with delegated authentication.29-