mail-archive
Enables AI assistants to query and manage per-project Outlook mail archives, providing tools to list projects, search emails, and update archives incrementally.
README
mail-archive
Per-project Outlook PST / live-folder mail archive with incremental sync. Designed to be driven either from a plain CLI or from any AI assistant (Claude, Gemini, ChatGPT, local LLMs) via an MCP server or by piping JSON output.
Status: pre-alpha. APIs and config schema will change.
What it does
Given one or more Outlook folders (or PST files) already split by project,
mail-archive incrementally ingests new mail into a per-project local
archive stored as JSON. Downstream tools (an AI, a script, a MCP client) can
then answer questions about that history without re-parsing Outlook every
time.
Requirements
- Windows + Outlook desktop (for the live-folder / COM source)
- Python 3.11+
pip install mail-archive[outlook]for the pywin32 dependency
Only pywin32 is required for basic use; [mcp] adds AI-client support.
Quick start
# 1. Install
pip install "mail-archive[outlook]"
# 2. Create a config file (edit projects afterwards)
mail-archive init
# 3. Ingest the first batch (Outlook must be running)
mail-archive ingest --project "ProjectA"
# 4. Later, sync everything incrementally
mail-archive update-all
Config
~/.mail-archive/config.toml:
storage_dir = "~/.mail-archive/storage"
[[project]]
name = "ProjectA"
source = "outlook-folder"
folder = "Inbox/ProjectA"
auto_update = true
[[project]]
name = "ProjectB"
source = "outlook-folder"
folder = "Inbox/ProjectB"
Using it from an AI assistant (MCP)
mail-archive ships a Model Context Protocol server so any MCP-capable client
— Claude Desktop, Cursor, Cline, Zed, Continue, and others — can query the
archive directly.
pip install "mail-archive[outlook,mcp]"
Then point your client at the mail-archive-mcp command. Example config for
Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"mail-archive": {
"command": "mail-archive-mcp",
"args": ["--config", "C:/Users/you/.mail-archive/config.toml"]
}
}
}
Cursor / Cline / Zed use the same shape — look for their mcpServers
JSON block and drop in the same command + args.
The server exposes four tools: list_projects, query_emails,
update_project, and update_all. Once loaded, you can ask the AI things
like "show me the three most recent emails about topic X in ProjectA" and
it will pick the right tool and arguments on its own.
Design
- Storage layout is stable:
<storage_dir>/_index.json+<storage_dir>/<project>/emails.jsonl. - Every CLI subcommand is pure Python and prints JSON on stdout (except
update-all, which is quiet by default). - The MCP server is a thin wrapper over the same library functions — no subprocesses, no duplicated logic.
- Sources are pluggable: implement one function in
mail_archive.sourcesand dispatch to it fromfetch_for_project.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.