Metadata-Version: 2.4
Name: mcp-outlook-desktop
Version: 0.1.0
Summary: Microsoft 365 Outlook Mail and Calendar Model Context Protocol (MCP) server for Claude and AI assistants with local Windows MAPI bridge
Author-email: Josh Patching <patchingjoshua@gmail.com>
License: MIT
Keywords: mcp,model-context-protocol,outlook,claude,microsoft-365,ai-agents
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Office/Business :: Scheduling
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: mcp>=1.0.0
Requires-Dist: msal>=1.28.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: python-dateutil>=2.8.0
Requires-Dist: pywin32>=306; sys_platform == "win32"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"

# Microsoft Outlook MCP Server for Claude & Antigravity (AGY)

[![CI](https://github.com/Jpatching/mcp-outlook/actions/workflows/ci.yml/badge.svg)](https://github.com/Jpatching/mcp-outlook/actions)

A high-performance **Model Context Protocol (MCP)** server providing direct, secure access to your **Microsoft 365 Outlook** emails, calendar, and contacts from:
- **Claude Code CLI**
- **Claude Desktop**
- **Antigravity CLI (AGY)**

---

## 🔒 Privacy & Security Architecture

- **Human-in-the-Loop by Design**: All outbound message drafting defaults to your Outlook `Drafts` folder for manual review. Direct unreviewed sends (`outlook_send_mail`) require an explicit `confirm_send=True` flag to prevent accidental dispatches.
- **Indirect Prompt Injection Defense**: Incoming email bodies are encapsulated in `<untrusted_email_body_content>` XML tags to ensure AI models parse external content strictly as passive data.
- **Zero Cloud Tokens / No Passwords**: Connects 100% locally to your running Windows Outlook Desktop application via Windows MAPI (`win32com`).
- **Strict `.gitignore`**: All local configs, caches, and environments are ignored.

---

## 🚀 Installation & Quickstart

### Method 1: Instant Run with `uvx` (No git clone needed)

If you have `uv` installed, you can run the server directly:

```cmd
uvx mcp-outlook
```

#### Claude Desktop Configuration (`%APPDATA%\Claude\claude_desktop_config.json`):
```json
{
  "mcpServers": {
    "outlook": {
      "command": "uvx",
      "args": ["mcp-outlook"]
    }
  }
}
```

#### Claude Code CLI:
```cmd
claude mcp add outlook uvx mcp-outlook
```

---

### Method 2: Local Installation with `pip`

```cmd
pip install mcp-outlook
```

Then in your Claude Desktop config:
```json
{
  "mcpServers": {
    "outlook": {
      "command": "mcp-outlook"
    }
  }
}
```

---

### Method 3: Clone from Source (`C:\projects\mcp-outlook`)

```cmd
cd C:\projects
gh repo clone Jpatching/mcp-outlook
cd mcp-outlook
setup.bat
```

Test connection (with Outlook open):
```cmd
run.bat --status
run.bat --test
```

---

## 🛠️ Available MCP Tools

| Tool Name | Parameters | Description |
| :--- | :--- | :--- |
| `outlook_check_status` | *none* | Check connection to Outlook |
| `outlook_list_messages` | `folder`, `top`, `unread_only` | List recent emails from Inbox, Sent, Drafts |
| `outlook_search_messages` | `query`, `top` | Search messages across mailbox |
| `outlook_get_message` | `message_id` | Retrieve full email body and sender details safely encapsulated in XML boundaries |
| `outlook_create_draft` | `subject`, `body`, `to_recipients`, `reply_to_message_id` | Create a draft email or reply draft in Outlook Drafts folder (Recommended) |
| `outlook_send_mail` | `subject`, `body`, `to_recipients`, `confirm_send` | Send an email directly (diverts to Drafts unless `confirm_send=True`) |
| `outlook_list_calendar_events`| `days_ahead` | List upcoming meetings and appointments |
| `outlook_create_calendar_event`| `subject`, `start_datetime`, `end_datetime`, `attendees`, `location` | Schedule a meeting in Outlook Calendar |
| `outlook_list_folders` | *none* | List mail folders with unread counts |
