- Home
- MCP servers
- Microsoft
Microsoft
- python
39
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"elyxlz-microsoft-mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/elyxlz/microsoft-mcp.git",
"microsoft-mcp"
],
"env": {
"MICROSOFT_MCP_CLIENT_ID": "your-app-id-here"
}
}
}
}You set up and run the Microsoft MCP Server to integrate Microsoft Graph data sources—email, calendar, files, and contacts—into your AI assistant workflow. This server provides a unified interface for reading, sending, scheduling, and managing data across multiple Microsoft accounts, enabling you to build powerful assistants and automations.
How to use
You use an MCP client to connect to the Microsoft MCP Server. Start by configuring the MCP client to point at the local or remote MCP runner, then authenticate your Microsoft accounts. Once connected, you can perform operations such as reading emails, scheduling meetings, uploading files, and listing contacts across your accounts. Each operation can be scoped to a specific account and can include or exclude additional data like attachments, body content, or event details.
Practical workflows you can perform include: reading your latest emails with full content, replying to emails with thread maintenance, creating calendar events with attendees, listing or uploading files to OneDrive, and searching across emails, files, and contacts. You can manage multiple Microsoft accounts from a single client session and switch between them as needed.
How to install
Prerequisites: you need Python and the UV tooling installed to run the MCP server locally, and you will use the MCP client to connect to the server.
Step 1. Clone the MCP server repository and install dependencies.
Step 2. Start the MCP server using the local development command shown in the setup guidance.
Manual setup and configuration
-
Register an Azure app for authentication and grant the required permissions (Mail.ReadWrite, Calendars.ReadWrite, Files.ReadWrite, Contacts.Read, People.Read, User.Read). Capture the Application (client) ID.
-
Set the environment variable MICROSOFT_MCP_CLIENT_ID to your Azure app ID to enable client authentication.
-
Run the authentication flow to connect your Microsoft accounts. Follow prompts to complete the authentication for each account.
Configuration for Claude Desktop integration
Configure Claude Desktop to load the Microsoft MCP Server with the required client ID. The server can be loaded in two ways: a direct development path or a packaged from-source path.
Option 1: Development path (local build) — Claude Desktop should run the MCP server from your local workspace.
Example environment setup for Claude Desktop 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"
}
}
}
}
Alternative local development config for Claude Desktop
{
"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 obtain IDs, then perform actions using the chosen account.
Security notes
Tokens are cached locally to enable smooth authentication flows. Use app-specific passwords if 2FA is enabled. Request only the permissions your app actually needs and consider using a dedicated app registration for production.
Troubleshooting
If authentication fails, verify that the client ID is correct for the Azure app. If you encounter admin consent issues, use the personal accounts flow where applicable. Ensure permissions are granted in Azure and, if you run into token errors, delete the local token cache and re-authenticate.
Available tools
list_emails
List emails with optional body content from a specified account.
get_email
Retrieve a specific email along with its attachments.
create_email_draft
Create a draft email with optional attachments.
send_email
Send an email immediately with optional CC/BCC and attachments.
reply_to_email
Reply to a specific email while maintaining thread context.
reply_all_email
Reply to all recipients in the email thread.
update_email
Mark emails as read or unread.
move_email
Move emails between folders.
delete_email
Delete emails.
get_attachment
Download email attachment content.
search_emails
Search emails by query.
list_events
List calendar events with details.
get_event
Get details for a specific event.
create_event
Create an event with location and attendees.
update_event
Reschedule or modify events.
delete_event
Cancel events.
respond_event
Respond to invitations (accept/decline/tentative).
check_availability
Check free/busy times for scheduling.
search_events
Search calendar events.
list_contacts
List all contacts.
get_contact
Get details for a specific contact.
create_contact
Create a new contact.
update_contact
Update contact information.
delete_contact
Delete a contact.
search_contacts
Search contacts by query.
list_files
Browse OneDrive files and folders.
get_file
Download file content.
create_file
Upload files to OneDrive.
update_file
Update existing file content.
delete_file
Delete files or folders.
search_files
Search files in OneDrive.
unified_search
Search across emails, events, and files.
list_accounts
Show authenticated Microsoft accounts."
authenticate_account
Start authentication for a new Microsoft account.
complete_authentication
Complete the authentication process after device code entry.