
A cross-platform MCP server that processes Microsoft Outlook emails, generates vector embeddings using Ollama, and provides semantic search capabilities. Works on , , and .
概览
A cross-platform MCP server that processes Microsoft Outlook emails, generates vector embeddings using Ollama, and provides semantic search capabilities. Works on , , and . The server complies with the and uses the official MCP SDK. - Process emails from Outlook with date range filtering - Store emails in SQLite database with proper connection management - Generate vector embeddings using Ollama (nomic-embed-text) - Semantic search across email content via MongoDB vector store - Multi-mailbox and multi-account support - Support for Inbox, Sent Items, and optionally Deleted Items folders - : Native Outlook COM automation via pywin32 - : AppleScript integration with Outlook for Mac - : Microsoft Graph API for cloud-based access (Windows, macOS, Linux, containers) - : Tools return properly typed, validated Pydantic models - : Supports both STDIO and HTTP (Streamable HTTP) transports - : Declares protocol version during handshake - : Tool titles and descriptions for better UI...
README
以下为原文 README 节选,完整内容请查看原文。
Email Processing MCP Server
A cross-platform MCP server that processes Microsoft Outlook emails, generates vector embeddings using Ollama, and provides semantic search capabilities. Works on Windows, macOS, and any platform via Microsoft Graph API.
The server complies with the Model Context Protocol (MCP) 2025-06-18 specification and uses the official MCP SDK.
Features
Core Capabilities
- Process emails from Outlook with date range filtering
- Store emails in SQLite database with proper connection management
- Generate vector embeddings using Ollama (nomic-embed-text)
- Semantic search across email content via MongoDB vector store
- Multi-mailbox and multi-account support
- Support for Inbox, Sent Items, and optionally Deleted Items folders
Cross-Platform Support
- Windows: Native Outlook COM automation via pywin32
- macOS: AppleScript integration with Outlook for Mac
- Any Platform: Microsoft Graph API for cloud-based access (Windows, macOS, Linux, containers)
MCP 2025-06-18 Compliance
- Structured Tool Results: Tools return properly typed, validated Pydantic models
- HTTP Transport: Supports both STDIO and HTTP (Streamable HTTP) transports
- Protocol Negotiation: Declares protocol version during handshake
- Enhanced Metadata: Tool titles and descriptions for better UI integration
Available Tools (12+)
| Category | Tools |
|---|---|
| Email Processing | process_emails |
| Search & Analysis | search_emails, analyze_email_sentiment, find_actionable_items |
| Data Export | export_email_data (CSV, JSON, HTML, Excel) |
| Folder Management | list_outlook_folders, get_folder_statistics, organize_emails_by_rules |
| Contact Management | extract_contacts |
| Statistics | get_email_statistics, check_data_consistency |
Prerequisites
Required (All Platforms)
- Python 3.10 or higher
- Ollama running locally with
nomic-embed-textmodel - MongoDB server (for storing embeddings)
Platform-Specific Requirements
| Platform | Requirement |
|---|---|
| Windows | Microsoft Outlook installed + pywin32 |
| macOS | Microsoft Outlook for Mac installed |
| Graph API | Azure AD app registration with Mail.Read permission |
Installation
1. Install uv (if not already installed)
pip install uv
2. Create and activate virtual environment
uv venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
3. Install dependencies
Core installation (required):
uv pip install -e .
Platform-specific extras:
# Windows (adds pywin32 for COM automation)
uv pip install -e ".[windows]"
# Graph API support (cross-platform cloud access)
uv pip install -e ".[graph]"
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"outlook-email": {
"command": "C:/path/to/.venv/Scripts/python",
"args": ["C:/path/to/src/mcp_server.py"],
"env": {
"MONGODB_URI": "mongodb://localhost:27017/MCP?authSource=admin",
"SQLITE_DB_PATH": "C:\\path\\to\\data\\emails.db",
"EMBEDDING_BASE_URL": "http://localhost:11434",
"EMBEDDING_MODEL": "nomic-embed-text",
"COLLECTION_NAME": "outlook-emails",
"OUTLOOK_PROVIDER": "windows",
"LOCAL_TIMEZONE": "America/Chicago"
}
}
}
}