MCP Server

Outlook Email MCP

Your emails, analyzed by AI, staying on your machine.

A Model Context Protocol server that gives Claude Desktop read-only access to your Outlook.com emails. Authenticates directly with the Microsoft Graph API using OAuth device flow. Emails are read locally—nothing passes through intermediary servers, cloud connectors, or third-party integrations. Also exports to Markdown if you want local archives.

Why MCP Instead of a Cloud Connector?

MCP (This Tool)

  • Emails read locally on your machine
  • Direct Microsoft Graph API calls
  • OAuth device login—you see the scopes
  • Free forever
  • Zero latency from intermediaries

Cloud Connectors

  • Emails pass through third-party servers
  • Proxied through vendor infrastructure
  • Broad permissions you may not review
  • Monthly subscription fees
  • Added latency from extra hops

Claude Desktop Tools

list_email_folders

List all folders in your mailbox with email counts.

get_recent_emails

Fetch emails from the last N days. Filter by unread or flagged.

search_emails

Custom OData filter queries to search across your mailbox.

get_email_by_id

Get full email content by ID, including attachments.

Example prompts for Claude Desktop

  • "Check my inbox for emails from the last 3 days and summarize any action items"
  • "Show me my unread emails"
  • "Find all flagged emails and list what needs my attention"
  • "Search for emails from [email protected] about the Q4 report"

CLI Export

$ python outlook_export.py --folders Inbox
Exporting Inbox...
Exported 142 emails to ./mail/Inbox/
 
$ python outlook_export.py --search "from:alice importance:high"
Searching with OData filter...
Exported 8 emails to ./mail/Search/
 
$ python outlook_export.py --reauth
Device code: ABCD-EFGH
Open https://microsoft.com/devicelogin
Authenticated. Token cached.

Setup

  1. Authenticate: Run python outlook_export.py --reauth and complete the device code login at Microsoft
  2. Configure Claude Desktop: Add the MCP server to your claude_desktop_config.json
  3. Restart Claude Desktop and start asking about your emails

Features

Free Your emails stay local. Your paranoia stays justified. View on GitHub