process_emailsLABSCO SUMMARY
Your mail archive, embedded on your own machine.
Embedding runs through a local Ollama model and storage is your own SQLite and MongoDB, so message bodies do not leave your infrastructure in order to become searchable. The setup bill is real: Ollama, MongoDB and a working Outlook or Graph path all have to be in place before the first email is processed.
What it is
A cross-platform server that processes Outlook email into SQLite, embeds it with Ollama, and searches it semantically through a MongoDB vector store.
What you get
- Emails processed over a date range you set, across Inbox, Sent Items and optionally Deleted Items (process_emails)
- Contacts extracted from the mail it has processed (extract_contacts)
- Embeddings generated locally with Ollama's nomic-embed-text model, and semantic search across the content
- Multiple mailboxes and multiple accounts
- Three routes into Outlook: COM automation on Windows, AppleScript on macOS, or Microsoft Graph on any platform
- STDIO and Streamable HTTP transports, with typed, validated tool results
Requirements
Python 3.10 or higher, Ollama running locally with the nomic-embed-text model, and a MongoDB server for the embeddings. Then Outlook installed on Windows or macOS, or an Azure AD app registration with Mail.Read for the Graph route.
Setup effort
Build from source — git clone https://github.com/Cam10001110101/mcp-server-outlook-email.git
USE CASES
Finding an email you can describe but cannot keyword-search
Process the date range it fell in, then search by meaning rather than by exact words.
Building a searchable archive of a period that matters
Process Inbox and Sent Items across those dates and keep the store for later questions.
Pulling the contacts out of a project's correspondence
Extract them from the mail already processed instead of scraping signatures by hand.
Searching mail without sending it to a cloud service
Keep embedding on the local Ollama model and storage in your own database.
11 tools
Listed in project docs. Your client may show a different list.
search_emailsanalyze_email_sentimentfind_actionable_itemsexport_email_datalist_outlook_foldersget_folder_statisticsorganize_emails_by_rulesextract_contactsget_email_statisticscheck_data_consistencyBEFORE YOU INSTALL
What to know first
Tools you get
11 tools named in the project's documentation.
Requires
- python on PATH
- Python 3.10 or later
- MONGODB_URI in your environment
- SQLITE_DB_PATH in your environment
- COLLECTION_NAME in your environment
Optional
- GRAPH_CLIENT_ID in your environment
- GRAPH_CLIENT_SECRET in your environment
- GRAPH_TENANT_ID in your environment
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/Cam10001110101/mcp-server-outlook-email.git
cd mcp-server-outlook-email
pip install uv
uv venv .venv
source .venv/bin/activateOn Windows, activate it with .venv\Scripts\activate instead
uv pip install -e .
ollama pull nomic-embed-textMCP Clients
Claude Desktop — Windows
{
"mcpServers": {
"outlook-email": {
"command": "<YOUR_PATH_TO_VENV>/Scripts/python",
"args": [
"<YOUR_PATH_TO_SRC>/mcp_server.py"
],
"env": {
"MONGODB_URI": "mongodb://localhost:27017/MCP?authSource=admin",
"SQLITE_DB_PATH": "<YOUR_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"
}
}
}
}Claude Desktop — macOS
{
"mcpServers": {
"outlook-email": {
"command": "<YOUR_PATH_TO_VENV>/bin/python",
"args": [
"<YOUR_PATH_TO_SRC>/mcp_server.py"
],
"env": {
"MONGODB_URI": "mongodb://localhost:27017/MCP?authSource=admin",
"SQLITE_DB_PATH": "<YOUR_PATH_TO_DATA>/emails.db",
"EMBEDDING_BASE_URL": "http://localhost:11434",
"EMBEDDING_MODEL": "nomic-embed-text",
"COLLECTION_NAME": "outlook-emails",
"OUTLOOK_PROVIDER": "mac",
"LOCAL_TIMEZONE": "America/Los_Angeles"
}
}
}
}Claude Desktop — Microsoft Graph
{
"mcpServers": {
"outlook-email": {
"command": "<YOUR_PATH_TO_VENV>/bin/python",
"args": [
"<YOUR_PATH_TO_SRC>/mcp_server.py"
],
"env": {
"MONGODB_URI": "mongodb://localhost:27017/MCP",
"SQLITE_DB_PATH": "/data/emails.db",
"EMBEDDING_BASE_URL": "http://localhost:11434",
"EMBEDDING_MODEL": "nomic-embed-text",
"COLLECTION_NAME": "outlook-emails",
"OUTLOOK_PROVIDER": "graph",
"GRAPH_CLIENT_ID": "<YOUR_GRAPH_CLIENT_ID>",
"GRAPH_CLIENT_SECRET": "<YOUR_GRAPH_CLIENT_SECRET>",
"GRAPH_TENANT_ID": "<YOUR_GRAPH_TENANT_ID>",
"GRAPH_USER_EMAILS": "All"
}
}
}
}Claude Desktop does not start this command inside your clone, so both paths are full paths: <YOUR_PATH_TO_VENV> and <YOUR_PATH_TO_SRC> are the .venv and src folders in your clone (on Windows the interpreter is .venv/Scripts/python).
Any MCP client — HTTP
From the cloned folder, with the virtual environment active and the variables under Requires set in that shell:
Start the server over HTTP
python src/mcp_server.py --httpPoint your client at it
{
"mcpServers": {
"mcp-server-outlook-email": {
"url": "http://localhost:8000/mcp"
}
}
}