A half-mounted drive looks exactly like deleting your mail.
If one scan would remove a large share of the archive at once, Mailvec holds the deletion for an hour in case the files come back.
Mailvec keeps a synced copy of your mailbox on a machine you control, indexes every message and attachment, and lets Claude or any MCP client search it by keyword and by meaning. Agents read only what they ask for; they can't send, reply or delete. Embeddings and OCR run locally.
mvMail, plus a vector. The arrow over the mv is the mathematician's notation for one.
The quote is in a PDF attached to a reply in a thread from March. Your mail client's search wants the exact word, and you remember the meaning. And the AI tools that could find it want you to hand your whole mailbox to one more company.
Mailvec keeps a complete, continuously-synced copy of your mailbox. mbsync pulls mail from your IMAP server. The indexer reads every message and extracts text from attachments. The embedder turns it into vectors with a local model, and OCRs scanned documents. Your AI agent asks questions through the MCP server. New mail arrives on a timer (every minute on the server install, every ten on a Mac), or within seconds with IMAP push on the server.
Keyword search finds the exact words: names, order numbers, domains. Semantic search finds the meaning: ask for "the contractor's quote" and get the email that says "estimate". Mailvec runs both and fuses the rankings, so you get exact matches and near-misses in one list, one result per email.
Pick a question to see the tool call your agent makes. Calls and results are from the demo mailbox; the same calls work from any MCP client.
Mailvec extracts the text from PDFs, Word documents, spreadsheets, slides, calendar invites and contact cards, and indexes it with the email. When a search hit came from an attachment, the result says which one. An agent can read the extracted text, or look at a rendered page when the layout matters: tables, forms, signatures.
A scanned PDF has no text to extract. Mailvec's embedder renders each page and transcribes it with a local vision model (qwen2.5vl:7b through Ollama), then indexes the result like any other text. Photos of documents pasted into emails get the same treatment.
A hosted OCR provider is available if you want it faster; it's off unless you turn it on.
Your mail is copied to a disk you own and indexed there. By default nothing leaves your network except the IMAP sync itself: embeddings and OCR run on your own Ollama. On a single Mac the server only listens on localhost. On a Docker host it publishes no ports at all; remote clients such as claude.ai and the Claude iPhone app reach it through a Cloudflare Tunnel behind Cloudflare Access, which can be checked again at the server. Hosted embedding and OCR providers exist for people who want them, and each one is an explicit opt-in.
Anyone can send you an email, so Mailvec treats every message as hostile input. In the Docker deployment, all parsing of mail, HTML, PDFs, Office files and images happens in a separate container with no access to your archive, no credentials and no network route out. Only the sync container holds your mail password. Services run as non-root users with dropped privileges and memory limits. And the server's instructions and every tool description tell the AI that mail content is data from the sender, never instructions.
That last part is a framing, not a guarantee. An agent that can read your mail can be shown a malicious email. Connect Mailvec only to clients you'd trust with your whole mailbox.
Mailvec runs unattended for months. The hard part of that is the failures that don't throw an error: they quietly give wrong answers. A few it now catches:
If one scan would remove a large share of the archive at once, Mailvec holds the deletion for an hour in case the files come back.
If the embedding model changes underneath it, even under the same tag, Mailvec stops instead of mixing two incompatible vector spaces and returning plausible-looking nonsense.
The indexer once rewrote a row per message on every one-minute scan. An unchanged mailbox now costs zero writes, and a test checks for exactly zero.
A rate-limited OCR service never causes a good scan to be marked unreadable; only a real, repeatable failure does.
mailvec eval tool lets you measure your own.Gmail behaviour is tested against recordings from a real Gmail test account, re-recorded weekly in CI. OCR engines were compared head to head before choosing a default.
http://127.0.0.1:3333. Pair it with a local model and nothing leaves the machine at all.Install mbsync and Ollama with Homebrew, sync your mail, run one installer, connect Claude Desktop, Claude Code or any local MCP client. Everything stays on the Mac.
Mac guide →A Linux host with Docker Compose and an Ollama machine on your network. Build locally or pin the published images. Add a Cloudflare Tunnel and Access to reach it from remote clients like claude.ai and your phone.
Server guide →A synthetic demo mailbox generator lets you run the whole pipeline with no real mail.
Demo mailbox →Then ask your agent about an email you know exists.
mxbai-embed-large, plus qwen2.5vl:7b (about 6 GB) for local OCRExpect a wait. The first sync and embedding pass on a large mailbox can take hours or days. Keyword search works from the start.