Skip to main content

MCP server for Outlook — enables AI assistants to access email, contacts, and calendars via win32com

Project description

outlook-mcp

PyPI version Python License: MIT

MCP server for Outlook — enables AI assistants to access email, contacts, and calendars via Windows COM interface.

Built on the Model Context Protocol (MCP), works with Claude Code and other MCP-compatible clients.

Features

  • Email: Search, read, send, reply, forward, flag, move, delete
  • Contacts: Search by name or email
  • Calendar: List calendars, create events
  • Multi-account: Supports all accounts configured in Outlook
  • Safe by design: Send/reply/forward opens Outlook compose window for user confirmation — never auto-sends
  • Local only: All operations via local COM interface, no cloud API or OAuth needed

Requirements

  • Windows with Outlook desktop client installed and running
  • Python >= 3.10

Install

pip install outlook-mcp-server

Verify installation:

outlook-mcp --version

Usage with Claude Code

Add to your project's .mcp.json:

{
  "mcpServers": {
    "outlook": {
      "command": "outlook-mcp"
    }
  }
}

Then restart Claude Code. The 14 Outlook tools will be available to Claude automatically.

Alternative: run from source

git clone https://github.com/lihaokun/outlook-mcp.git
cd outlook-mcp
pip install -e .
{
  "mcpServers": {
    "outlook": {
      "command": "uv",
      "args": [
        "--directory", "C:\\path\\to\\outlook-mcp",
        "run", "outlook-mcp"
      ]
    }
  }
}

Available Tools

Accounts & Folders

Tool Description
listAccounts List all configured email accounts (name, email, type)
listFolders List all folders with message counts and unread counts
createFolder Create a new subfolder under a specified parent

Email Search & Read

Tool Description
searchMessages Search by keyword (subject/sender/recipient), with date range and sort
getRecentMessages Get recent messages by days, folder, and unread filter
getMessage Read full message content (body, HTML, attachments)

Email Operations

Tool Description
sendMail Compose new email (opens Outlook compose window)
replyToMessage Reply or reply-all (opens compose window)
forwardMessage Forward with original attachments (opens compose window)
updateMessage Mark read/unread, flag/unflag, move to folder, or trash
deleteMessages Batch delete messages

Contacts & Calendar

Tool Description
searchContacts Search contacts by name or email
listCalendars List all calendars with item count and writable status
createEvent Create calendar event (opens Outlook event window)

Safety

This server is designed with safety as a priority:

  • No auto-send: sendMail, replyToMessage, forwardMessage, and createEvent all call .Display() instead of .Send() / .Save(). This opens the Outlook compose window so the user can review and confirm before sending.
  • Outlook Object Model Guard: Outlook may show additional security prompts for send operations. This is expected behavior.
  • Local only: All data stays on your machine. No external API calls, no cloud services, no OAuth tokens.

Technical Details

  • COM interface: Uses pywin32 (win32com.client) to control Outlook
  • MCP transport: stdio (standard input/output)
  • Message ID: Uses Outlook's EntryID as unique identifier
  • Search: Uses Items.Restrict() with DASL filters for efficient server-side filtering
  • Internationalization: Automatically handles both "Inbox" and "收件箱" folder names

Related Projects

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

outlook_mcp_server-0.1.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

outlook_mcp_server-0.1.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file outlook_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: outlook_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for outlook_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a7da72f8f6c5dd56f72abc0b98a1af5cb57e9a84098b292d13ca22b5d3080dd5
MD5 53dd9f06dd8142ee045b9c489c276c9a
BLAKE2b-256 2f2b432911b29bc0c8b8f1fa852e0c5060c40ed782c6e842913b9a2009132f0f

See more details on using hashes here.

File details

Details for the file outlook_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for outlook_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a232a07a6eb3b94e9e2d404f5aabc0b2f9c17477349a0d052d3065d70a85aa6a
MD5 30b7501ad65cc227cb6a6ca378641c13
BLAKE2b-256 1dab7e6c30449227a9d459e52ce7cb3a91580868a002aa7f545cc3e2722d55c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page