Logo vun Outlook Desktop MCP

Outlook Desktop MCP

Communautéit
Aanerud

Turn your running Outlook Desktop into an MCP server. No Microsoft Graph API, no Entra app registration, no OAuth tokens — just your local Outlook and the authentication you already have.

EditeurAanerud
Repositoryoutlook-desktop-mcp
SproochPython
Forks
46
Stären
70
Disponibel Tools
0
Transporttypstdio
LizenzAGPL-3.0
Linken
  • Tools mat KI-Workflows verbannen

    Outlook Desktop MCP stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    70 Stären an 46 Forks aus dem verlinkte Repository.

outlook-desktop-mcp

PyPI Python Platform

Turn your running Outlook Desktop into an MCP server. No Microsoft Graph API, no Entra app registration, no OAuth tokens — just your local Outlook and the authentication you already have.

Any MCP client (Claude Code, Claude Desktop, etc.) can then send emails, manage your calendar, create tasks, handle attachments, and more — all through your existing Outlook session.

Quick Start

1. Install (requires Python 3.12+):

bash
pip install outlook-desktop-mcp

2. Register with Claude Code:

bash
claude mcp add outlook-desktop -- outlook-desktop-mcp

3. Open Outlook and start a Claude Code session. That's it — tools are available immediately.

How It Works — Platform Routing

When the server starts, it checks which operating system it is running on and takes one of two paths:

                        outlook-desktop-mcp starts
                                  |
                          sys.platform check
                         /                  \
                   "win32"                "darwin"
                      |                      |
              ┌───────┴────────┐    ┌────────┴────────┐
              │  server.py     │    │  server_mac.py   │
              │  COM Bridge    │    │  AppleScript     │
              │  (29 tools)    │    │  Bridge          │
              │                │    │  (22 tools)      │
              └───────┬────────┘    └────────┬─────────┘
                      |                      |
              OUTLOOK.EXE via         Microsoft Outlook
              COM / STA thread        via osascript
                      |                      |
              Exchange / M365         Exchange / M365

Both paths use your locally running Outlook app and its existing authenticated session. No cloud credentials, no Graph API tokens — the server inherits whatever account Outlook is signed into.

Why two paths?

Windows Outlook (Classic) exposes a rich COM automation interface — the Outlook Object Model (MSOUTL.OLB). This has been the standard way to programmatically control Outlook on Windows for over 20 years. It provides deep access to mail rules, categories, MAPI properties, and the full folder hierarchy.

Mac Outlook does not support COM. Instead, it exposes an AppleScript dictionary that can be driven via the osascript command. The AppleScript interface covers the core operations — email, calendar, tasks — but does not expose rules, categories, or certain advanced MAPI features. This is a limitation of what Microsoft chose to include in Outlook for Mac's scripting dictionary, not a limitation of this project.

The server is structured as two parallel implementations with identical tool names and signatures, so MCP clients see the same interface regardless of platform. Tools that are not available on a given platform are simply not registered.

Requirements

Windows

  • Outlook Desktop (Classic) — the OUTLOOK.EXE that comes with Microsoft 365 / Office. The new "modern" Outlook (olk.exe) does not support COM
  • Python 3.12+ (x64 or ARM64)
  • Outlook must be running when the MCP server starts

Both x64 and ARM64 Windows are supported. On ARM64, all dependencies (pywin32, mcp, pydantic-core, cryptography, cffi, rpds-py) have prebuilt win_arm64 wheels — see the ARM64 install notes below for the one extra pip flag you need.

Outlook "Programmatic Access" security prompts

When the MCP server first touches Outlook's COM API, Outlook may show a dialog: "A program is trying to access email address information stored in Outlook" (the Object Model Guard / Programmatic Access prompt). This is Outlook's protection against malicious automation.

You have three options:

  1. Click "Allow access for 10 minutes" every time you start a session. Fine for casual use.

  2. Get the antivirus status to "Valid" in File > Options > Trust Center > Trust Center Settings > Programmatic Access. When that line reads Valid, the "Never warn me about suspicious activity" radio becomes selectable and the prompts go away. On most personal machines with current Defender this works out of the box.

  3. Apply the registry policy in docs/suppress-outlook-oom-prompts.reg. From an elevated PowerShell or Command Prompt (Win+X → Terminal (Admin)), run:

    powershell
    reg import "C:\path\to\outlook-desktop-mcp\docs\suppress-outlook-oom-prompts.reg"

    Then fully quit Outlook (check Task Manager for stray OUTLOOK.EXE processes) and reopen it. This writes AdminSecurityMode=3 and approves all PromptOOM* categories under HKLM\Software\Policies\Microsoft\Office\16.0\Outlook\Security, which Outlook honors regardless of AV status. On Intune/MDM-managed corporate devices, HKCU\Software\Policies\...\Outlook is locked and the HKLM keys may be overwritten on next policy sync — if reg import fails or the prompts come back, ask IT to push the equivalent settings via Group Policy.

Windows 11 ARM64 note: Defender does not register with Outlook's IOfficeAntiVirus interface on ARM64, so Trust Center shows "Antivirus status: Invalid" and the "Never warn me about suspicious activity" radio stays greyed out even when Outlook is launched as Administrator. Option 2 is unavailable on ARM64; the reg import from option 3 is the only durable suppression path.

macOS

  • Microsoft Outlook for Mac — version 16.x or later
  • Python 3.12+
  • Outlook must be running when the MCP server starts

Required macOS permissions

The first time a tool runs, macOS will show two permission prompts that you must approve:

  1. Privacy & Automation — a system dialog asks: "python3.12 wants to control Microsoft Outlook". Click Allow to let the server send AppleScript commands to Outlook.

  2. Accessibility — to read your Exchange/M365 inbox, the server uses macOS UI scripting (System Events). This requires Accessibility access for python3.12:

    • Open System Settings > Privacy & Security > Accessibility
    • Find python3.12 in the list (it appears after the first prompt)
    • Toggle it on

    Without Accessibility enabled, calendar, tasks, and local folder tools will work, but listing Exchange inbox messages will return empty results.

Both permissions are one-time setup — macOS remembers them for future sessions.

Available Tools by Platform

Email

ToolWindowsmacOSDescription
send_emailyesyesSend an email with To/CC/BCC, plain text or HTML body
list_emailsyesyesList recent emails from any folder, with optional unread filter
read_emailyesyesRead full email content by entry ID or subject search
search_emailsyesyesFull-text search across email subjects and bodies
reply_emailyesyesReply or reply-all, preserving the conversation thread
mark_as_readyesyesMark a specific email as read
mark_as_unreadyesyesMark a specific email as unread
move_emailyesyesMove an email to Archive, Trash, or any folder
list_foldersyesyesBrowse the folder hierarchy with item counts

Calendar

ToolWindowsmacOSDescription
list_eventsyesyesList upcoming events within a date range
get_eventyesyesRead full event details by entry ID
create_eventyesyesCreate a personal calendar appointment
create_meetingyesyesCreate a meeting and send invitations to attendees
update_eventyesyesModify an existing event's subject, time, location, etc.
delete_eventyesyesDelete an appointment or cancel a meeting
respond_to_meetingyes—Accept, decline, or tentatively accept a meeting invite
search_eventsyesyesSearch calendar events by keyword within a date range

Tasks

ToolWindowsmacOSDescription
list_tasksyesyesList pending or completed tasks, sorted by due date
get_taskyesyesRead full task details including body and completion status
create_taskyesyesCreate a new task with subject, due date, importance
complete_taskyesyesMark a task as complete
delete_taskyesyesRemove a task

Attachments

ToolWindowsmacOSDescription
list_attachmentsyesyesList all attachments on an email or calendar event
save_attachmentyesyesDownload an attachment to a local directory

Categories, Rules, Out of Office (Windows only)

These tools rely on COM-specific APIs (MAPI property accessors, the Rules object model, and the Categories collection) that Outlook for Mac does not expose through AppleScript.

ToolWindowsmacOSDescription
list_categoriesyes—List all available color categories in Outlook
set_categoryyes—Set or clear categories on any email, event, or task
list_rulesyes—List all mail rules with enabled/disabled status
toggle_ruleyes—Enable or disable a mail rule by name
get_out_of_officeyes—Check whether Out of Office auto-reply is on or off

Total: 29 tools on Windows, 22 tools on macOS.

Architecture Details

Windows: COM Bridge (com_bridge.py)

All Outlook COM operations run on a dedicated thread using the Single-Threaded Apartment (STA) model, as required by COM. The async MCP event loop dispatches tool calls to this thread via a queue and awaits results, keeping COM threading rules respected and the MCP protocol non-blocking.

MCP tool call (async)
  → bridge.call(func, args)
    → queued to STA thread
      → func(outlook, namespace, args) executes on COM thread
    → result returned via threading.Event
  → JSON response back to MCP client

Each tool's inner function receives the live Outlook.Application and MAPI.Namespace COM objects and works directly with the Outlook Object Model — GetItemFromID, CreateItem, Items.Restrict with DASL filters, and so on.

macOS: AppleScript Bridge (applescript_bridge.py)

Each tool call builds an AppleScript string and executes it as a subprocess via osascript. There is no persistent connection — every call is stateless.

MCP tool call (async)
  → build AppleScript string
    → asyncio.create_subprocess_exec("osascript", "-e", script)
    → parse stdout text into structured data
  → JSON response back to MCP client

Each tool constructs a single AppleScript that fetches all needed data in one osascript call (no per-message subprocess loops). Results come back as delimited text, which the server parses into the same JSON structure the Windows server produces.

Key differences from Windows:

  • Entry IDs on macOS are numeric (e.g. 42), not hex strings. They identify items within their folder context.
  • Folder references use AppleScript's locale-independent keywords (inbox, sent items, drafts, deleted items) rather than localized folder names.
  • Search uses AppleScript's whose clause (e.g. messages whose subject contains "query") instead of DASL filters.
  • User input is escaped for safe embedding in AppleScript strings to prevent script injection.

Install from Source

Windows (x64)

bash
git clone https://github.com/Aanerud/outlook-desktop-mcp.git
cd outlook-desktop-mcp
python -m venv .venv
.venv\Scripts\activate
pip install pywin32 "mcp[cli]" -e .
python .venv\Scripts\pywin32_postinstall.py -install

Register from source using the launcher script:

bash
claude mcp add outlook-desktop -- powershell.exe -Command "& 'C:\path\to\outlook-desktop-mcp\outlook-desktop-mcp.cmd' mcp"

Windows (ARM64)

The [cli] extra of mcp transitively pulls in cryptography, and pip's default resolver may pick a version that lacks a win_arm64 wheel — which then fails to build because it requires a Rust toolchain plus OpenSSL. Install without the cli extra and force wheels-only resolution:

powershell
git clone https://github.com/Aanerud/outlook-desktop-mcp.git
cd outlook-desktop-mcp
& "C:\Program Files\Python312-arm64\python.exe" -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install --only-binary=:all: pywin32 mcp
python -m pip install --no-deps -e .
python .venv\Scripts\pywin32_postinstall.py -install

The base mcp package is sufficient for running the stdio server — the [cli] extra is only needed for the mcp developer CLI tools (mcp dev, mcp inspector), which aren't used at runtime.

Register from source the same way as x64:

bash
claude mcp add outlook-desktop -- powershell.exe -Command "& 'C:\path\to\outlook-desktop-mcp\outlook-desktop-mcp.cmd' mcp"

macOS

bash
git clone https://github.com/Aanerud/outlook-desktop-mcp.git
cd outlook-desktop-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install "mcp[cli]" -e .

Register from source:

bash
claude mcp add outlook-desktop -- /path/to/outlook-desktop-mcp/.venv/bin/python -m outlook_desktop_mcp

Usage Examples

Once registered, just talk to Claude naturally:

  • "Show me my 10 most recent inbox emails"
  • "Read the email from Taylor about MLADS"
  • "Send an email to alice@example.com about the project update"
  • "What's on my calendar this week?"
  • "Create a meeting with bob@example.com tomorrow at 2pm for 30 minutes"
  • "Save the attachment from that email to my Downloads folder"
  • "Create a task to review the quarterly report, due Friday, high importance"
  • "Mark that email as read and move it to archive"

Windows-only examples:

  • "What categories do I have? Set this email to 'Follow-up'"
  • "List my mail rules"
  • "Am I set as Out of Office?"

Why Not Microsoft Graph?

Microsoft Graphoutlook-desktop-mcp
Entra app registrationRequiredNot needed
Admin consentRequired for mail permissionsNot needed
OAuth token managementYou handle refresh tokensNot needed
Tenant configurationRequiredNot needed
Works offline / cachedNoYes (reads from local cache)
Setup time30-60 minutes2 minutes
Auth requirementYour own OAuth flowOutlook is open

Project Structure

outlook-desktop-mcp/
  src/outlook_desktop_mcp/
    entrypoint.py            # Platform detection → routes to correct server
    server.py                # Windows MCP server (29 tools, COM automation)
    server_mac.py            # macOS MCP server (22 tools, AppleScript)
    com_bridge.py            # Async-to-COM threading bridge (Windows)
    applescript_bridge.py    # Async osascript execution (macOS)
    tools/
      _folder_constants.py   # Outlook enums and constants (Windows)
    utils/
      formatting.py          # Email/event/task data extraction (Windows)
      errors.py              # COM error formatting (Windows)
      applescript_helpers.py # AppleScript escaping, date formatting (macOS)
  tests/
    phase1_com_test.py       # Email COM validation
    phase3_mcp_test.py       # Email MCP test
    calendar_com_test.py     # Calendar COM validation
    calendar_mcp_test.py     # Calendar MCP test
    extras_com_test.py       # Tasks/attachments/categories/rules/OOF COM test
    extras_mcp_test.py       # Tasks/attachments/categories/rules/OOF MCP test
  outlook-desktop-mcp.cmd   # Windows launcher script
  pyproject.toml

Contributing

See CONTRIBUTING.md for the branching strategy and development setup.

License

See LICENSE file.

Outlook Desktop MCP MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Outlook Desktop MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Outlook Desktop MCP als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Outlook Desktop MCP an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "outlook-desktop-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Outlook Desktop MCP. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Outlook Desktop MCP.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Outlook Desktop MCP?
Outlook Desktop MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat Outlook Desktop MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Outlook Desktop MCP benotzt?

Outlook Desktop MCP ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Outlook Desktop MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Outlook Desktop MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Outlook Desktop MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Outlook Desktop MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Outlook Desktop MCP MCP mat TypingMind?

Outlook Desktop MCP leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Outlook Desktop MCP MCP an TypingMind zur Verfügung?

Outlook Desktop MCP stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Outlook Desktop MCP MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Outlook Desktop MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇