MailAtlas Docs
MailAtlas makes email accessible to AI agents. It imports email from live mailboxes or archives, turns complex messages into clean source-linked views, and gives agents a queryable email workspace for reading, exporting, and sending.
MailAtlas is currently alpha. Expect CLI, schema, and packaging details to keep improving as the project matures.
Choose how your agent gets email
Section titled “Choose how your agent gets email”Start with the source you already have. Live mailboxes, individual email files, and mailbox archives all write to the same email workspace.
Connect selected folders over IMAP so your agent can work from current mailbox data in the same email workspace.
Gmail Gmail mailboxFetch Gmail messages with read-only OAuth and store them as clean, source-linked documents for your agent.
Files Email filesImport individual .eml files when you want the fastest local check or already have messages exported to disk.
Import an exported mailbox archive and create one clean, source-linked document per message.
Install
Section titled “Install”Install MailAtlas from PyPI, then choose the source you want to connect or import.
python3.12 -m venv .venvsource .venv/bin/activatepython -m pip install mailatlasFor a quick local check, import one sample email file:
git clone https://github.com/mailatlas/sample-data.gitexport MAILATLAS_HOME="$PWD/.mailatlas"mailatlas ingest sample-data/fixtures/eml/atlas-market-map.emlmailatlas listWhat MailAtlas handles for you
Section titled “What MailAtlas handles for you”MailAtlas handles MIME structure, HTML, attachments, embedded images, metadata, and provenance so your agent can work with clean email views without losing the original source context.
Use MailAtlas from your agent stack
Section titled “Use MailAtlas from your agent stack”Use the CLI for local runs, scripts, inspection, exports, provider-backed sends, self-checks, and MCP server startup.
Python Python APIUse the Python API when you want to embed MailAtlas in an application, worker, notebook, test suite, or pipeline.
MCP MCP serverUse MCP tools when agent clients should read email, inspect exports, prepare drafts, and optionally send through an explicit approval gate.
What your agent can do
Section titled “What your agent can do”receiveFetch Gmail or IMAP messages from a live mailbox and store clean source-linked documents locally.ingestImport.emlfiles or anmboxarchive from disk.readUsemailatlas listandmailatlas getto find, inspect, and query stored email.exportWrite JSON, Markdown, HTML, or PDF views from stored messages while keeping assets and source links connected.sendSend through SMTP, Cloudflare, or Gmail and store sent messages in the same email workspace.
Core Concepts
Section titled “Core Concepts”MailAtlas stores email in a workspace your agent can query. Each message keeps its clean text, HTML view, attachments, embedded images, metadata, exports, and source reference together, so the agent can read the clean version and still trace back to the original email when needed.
Learn how email workspaces, documents, assets, parser metadata, exports, and sent messages fit together.
Workspace Workspace ModelUnderstand the email workspace: stored messages, HTML snapshots, assets, exports, receive state, sent messages, and SQLite lookup.
Document Document SchemaReview the normalized document fields, asset fields, parser metadata, source provenance, and path behavior used by the CLI and Python API.
Cleaning Parser CleaningTune how MailAtlas turns complex email source into clean text and HTML views for agents, exports, review, and tests.
Export Export FormatsChoose between JSON, Markdown, HTML, and PDF outputs, and understand how exported files relate to stored documents and assets.
Outbound Outbound EmailRender and send messages through configured providers, then store sent email in the same workspace.
Common terms
Section titled “Common terms”.eml
A single email message file on disk.
mbox
A mailbox file on disk that can contain many messages.
The local copy of received and sent email that your agent can query, inspect, and export.
The clean, structured MailAtlas record created from one email message.
The original message MailAtlas keeps linked to cleaned text, HTML, assets, metadata, and exports.
An inline image or regular file attachment extracted from a message and linked to a document.
The mailbox or sending service MailAtlas connects to, such as IMAP, Gmail, SMTP, or Cloudflare.
A derived JSON, Markdown, HTML, or PDF artifact written from a stored document.
A message MailAtlas rendered and sent through a configured provider, stored in the same email workspace as received email.
Next step
Section titled “Next step”New users should start with Installation. Then use Manual IMAP Sync for a live mailbox or Quickstart for sample email files. After that, use Outbound Email, Python API, or MCP Server depending on how your agent will use MailAtlas.