Skip to content

msgvault

Archive a lifetime of email and chat. Fast keyword search, opt-in semantic search, and local AI workflows.

Quick Start GitHub Discord

msgvault TUI showing the Senders view

Supports Gmail, Google Calendar, Microsoft Teams, Discord, Slack, Granola, Circleback, Beeper Desktop, IMAP, and Microsoft 365 mail sync; verifiable backup snapshots; PST, MBOX, and Apple Mail import; and chat/text import from WhatsApp, iMessage, Google Voice, Facebook Messenger, and SMS Backup & Restore.

Read the Introduction to learn more about why this project was created.

Install

curl -fsSL https://msgvault.io/install.sh | bash

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://msgvault.io/install.ps1 | iex"

Then set up OAuth credentials and start syncing. You can also build from source.

New in 0.19.0

Explore relationships in the new Web UI; archive Slack workspaces and Discord guilds; ingest meetings through the API; export bounded message windows; discover source identities; and manage durable person profiles. See the Changelog for the full release notes.

Why msgvault?

Your email and message data is yours. msgvault downloads a complete local copy of your email (from Gmail, IMAP, or local archives) and imports chats and texts from WhatsApp, iMessage, Google Voice, Facebook Messenger, and SMS Backup & Restore, and can sync Teams conversations, Discord guilds, Slack workspaces, Beeper chats, plus Granola and Circleback meeting notes. Keyword search, analytics, the Web UI, the TUI, and the MCP server query your archive. Source services are contacted only by authorization/registration, sync, media-backfill, provider-backed identity discovery, and deletion workflows that you run or schedule explicitly. Optional vector search calls only the embedding endpoint you configure; use a local or self-hosted endpoint if message text must never leave your machine or network.

Years of PDFs, photos, documents, and spreadsheets buried in your inbox become deduplicated content-addressed objects that can be searched and exported by hash. Your data is no longer locked behind a provider's web interface or API; it lives in an archive on disk that you own and control.

Features

Full Email Backup

Downloads complete messages from Gmail or any IMAP server, including raw MIME, labels, metadata, and every attachment. Every PDF, photo, spreadsheet, and document you've ever received or sent is extracted and stored locally, deduplicated by content hash.

Calendar Sync

Archive Google Calendar alongside email. Events — including organizers, attendees, recurring series, and cancellations — become searchable by keyword and by meaning, and their participants dedupe with your email contacts. Read-only and incremental.

Teams Sync

Archive Microsoft Teams chats, channels, replies, link attachments, and inline media through delegated Microsoft Graph. Teams records use message_type = teams so they can be searched and queried separately from email.

Discord Sync

Archive guild channels, threads, forum posts, and attachments through a dedicated read-only bot. Resumable per-container checkpoints and bounded repair preserve history safely under message_type = discord.

Slack, Meetings & Beeper

Archive Slack workspaces, sync Granola and Circleback notes and transcripts, and archive chats and media from networks connected to Beeper Desktop. Explore each source in the Web UI or its dedicated TUI mode.

Backup Snapshots

Create incremental, append-only backup repositories for the SQLite archive and attachments. Verify snapshots byte-for-byte, restore into a fresh archive home, and sync the repository off-site with ordinary file tools.

Lightning-Fast TUI

Explore hundreds of thousands of messages with instant aggregation and drill-down. Powered by DuckDB over Parquet, hundreds of times faster than SQL JOINs, in a small footprint.

Full-Text Search

SQLite FTS5-powered search with Gmail-like query syntax. Search by sender, date, label, size, attachments, and more.

Semantic & Hybrid Search

Opt-in semantic search with vectors stored locally, plus hybrid ranking that fuses BM25 and vector similarity via Reciprocal Rank Fusion. Point msgvault at a local or self-hosted OpenAI-compatible embedding endpoint and query by meaning, not just keywords. Search mode and index coverage stay explicit in the Web UI.

Multi-Account

Archive multiple sources in a single database, group accounts into collections, manage per-account identities, and deduplicate safely.

Incremental Sync

Uses Gmail History API for efficient updates after initial full sync. Resumable checkpoints for interrupted syncs.

MCP Server

Expose your archive to AI assistants through the Model Context Protocol. Search metadata or bodies lexically, run semantic search, and find matches within one message.

Agent Skills

Install bundled read-only skills that teach Claude Code and Codex how to search the archive, retrieve attachments, and run analytics from the terminal.

Analytical Web UI & API

Open a dense, keyboard-driven archive interface served directly by the daemon. Search and group across modalities, inspect people and files, monitor sources, review deletions, or use the same server through its REST API.

Local Import

Import PST archives, MBOX archives, Apple Mail .emlx exports, and chats/texts from WhatsApp, iMessage, Google Voice, Facebook Messenger, and SMS Backup & Restore. Messages are indexed and searchable alongside your email data.

Safe Deletion

Review and stage messages in the Web UI, TUI, or via an AI assistant, then explicitly execute the manifest against Gmail or your IMAP provider while preserving the local archive.

How It Works

msgvault architecture: Gmail API syncs to SQLite, then offline Parquet analytics, FTS5 search, TUI, and MCP Server