home / mcp / outlook mcp server

Outlook MCP Server

Provides Outlook data access and actions through MCP using Microsoft Graph via Nango for secure authentication.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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_key

Test the server to verify it is wired up correctly.

uv run python outlook_mcp_server.py --help

Security & authentication

The 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.

Troubleshooting

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.

Development & testing

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())"

Notes on client configuration

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.

Available tools

send_email

Send emails with TO/CC/BCC, HTML/text content, and attachments.

create_draft_email

Create draft emails for later editing and sending.

send_draft_email

Send existing draft emails to recipients.

get_draft_emails

Retrieve all draft emails for review.

update_draft_email

Modify details of a draft email.

delete_draft_email

Remove a draft email.

create_contact

Add new contacts with full details.

get_all_contacts

Retrieve all contacts.

get_contact_details

Get information for a specific contact.

update_contact

Modify existing contact details.

delete_contact

Remove a contact.

get_all_calendars

List all calendars.

get_calendar_details

Get details for a specific calendar.

create_calendar

Create a new calendar with custom colors.

update_calendar

Modify calendar properties.

delete_calendar

Remove a calendar.

get_all_events

Retrieve events from calendars.

get_event_details

Get details for a specific event.

create_event

Schedule a new event with attendees.

delete_event

Remove a calendar event.

get_all_folders

List all mail folders.

get_folder_details

Get details for a specific folder.

create_folder

Create new mail folders with nesting.

update_folder

Rename folders.

delete_folder

Remove folders.

get_many_folders

Batch retrieve multiple folders.