home / mcp / outlook mcp server
Provides Outlook data access and actions through MCP using Microsoft Graph via Nango for secure authentication.
Configuration
View docs{
"mcpServers": {
"ampcome-mcps-outlook-mcp": {
"command": "uv",
"args": [
"run",
"python",
"outlook_mcp_server.py"
],
"env": {
"NANGO_BASE_URL": "your_nango_base_url",
"NANGO_SECRET_KEY": "your_secret_key",
"NANGO_CONNECTION_ID": "your_connection_id",
"NANGO_INTEGRATION_ID": "your_integration_id"
}
}
}
}You run an MCP server that exposes Outlook data and actions through the Microsoft Graph API, enabling you to manage emails, contacts, calendars, and folders from MCP clients with secure authentication and straightforward commands.
You connect an MCP client to this server to perform common Outlook tasks. Use the MCP client to access and manipulate emails (send, draft, and manage drafts), contacts, calendars, and folders. The server handles authentication via a secure platform, so you donβt store credentials directly in your client. Operate by selecting the appropriate tool in your MCP client, then provide the required arguments like recipient addresses, subject, body content, calendar details, or folder names.
Typical usage patterns include: creating or updating contacts, scheduling events with attendees, sending emails with attachments, and organizing mail into folders. Your MCP client will expose a set of tools (for example, email, calendar, contacts, and folders) that you can invoke with the necessary parameters. If you need to draft an email first, use the draft-related tools, then publish it when ready.
Prerequisites you must have before installing: Python 3.8 or higher, the uv package manager, Microsoft Graph API access via Nango, and a valid Outlook/Microsoft 365 account.
git clone <repository-url>
cd outlook-mcp
uv install -e .Configure environment variables for Nango integration. Create a .env file or set these variables in your environment:
NANGO_CONNECTION_ID=your_connection_id
NANGO_INTEGRATION_ID=your_integration_id
NANGO_BASE_URL=your_nango_base_url
NANGO_SECRET_KEY=your_secret_keyTest the server to verify it is wired up correctly.
uv run python outlook_mcp_server.py --helpThe server uses Nango for secure Microsoft Graph API authentication. There is no direct credential storage on the server; tokens are managed and refreshed automatically. All API communications use HTTPS to protect data in transit.
Common issues you may encounter and how to address them:
Missing environment variables: Ensure all Nango variables are set and the .env file exists with correct formatting.
Connection failed: Confirm the Nango integration is active and the network is reachable. Validate Nango credentials.
Tool execution failed: Check Microsoft Graph API permissions and ensure the connected Outlook account has the necessary access.
uv command not found: Install uv using the recommended installer or via your package manager.
For local development and testing, install in development mode, run tests, and validate tool functionality.
uv install -e .
uv run pytest tests/
uv run python -c "from outlook_mcp.tools.email import get_draft_emails; print(get_draft_emails())"To connect from a Claude Desktop MCP configuration, you provide the MCP server as a stdio-backed entry using your environment variables for Nango. Other MCP clients can run the server via a standard runtime command. Ensure the environment variables for Nango are available in the client environment.
Send emails with TO/CC/BCC, HTML/text content, and attachments.
Create draft emails for later editing and sending.
Send existing draft emails to recipients.
Retrieve all draft emails for review.
Modify details of a draft email.
Remove a draft email.
Add new contacts with full details.
Retrieve all contacts.
Get information for a specific contact.
Modify existing contact details.
Remove a contact.
List all calendars.
Get details for a specific calendar.
Create a new calendar with custom colors.
Modify calendar properties.
Remove a calendar.
Retrieve events from calendars.
Get details for a specific event.
Schedule a new event with attendees.
Remove a calendar event.
List all mail folders.
Get details for a specific folder.
Create new mail folders with nesting.
Rename folders.
Remove folders.
Batch retrieve multiple folders.