MCP server lets AI tools manage .eml email archives

A new MCP server called eml-mcp lets AI assistants search, read, write, and update email archives stored as .eml files. It works with Power Automate flows that export Outlook mail to OneDrive, then exposes inbox, sent items, and drafts through structured tools.

MCP server lets AI tools manage .eml email archives

A new MCP server called eml-mcp is designed to give AI assistants direct access to email archives stored as .eml files. According to the project description, it can search, read, compose, update, open, and delete messages across inbox, sent items, and drafts when those files are organized in a local folder structure.

The setup is meant to work with two Microsoft Power Automate flows that export Outlook email into OneDrive as .eml files. The first flow watches incoming messages in Outlook’s Inbox, exports each message using the Office 365 Outlook “Export email (V2)” action, and saves the raw MIME content into a OneDrive folder such as /Outlook/inbox. A second flow is duplicated from the first and switched to Sent Items so sent messages are written to /Outlook/outbox.

⚡ New to this?

This news is about a tool that lets AI assistants work with email files as structured data instead of just raw text. .eml is a file format that stores an email in a standard message form, and MCP, or Model Context Protocol, is a way for apps to expose tools to AI systems. For non-experts, the main point is that it can connect an AI agent to email archives in a controlled, local setup.

🦞 OpenClaw angle

If you build self-hosted agents, this is a useful pattern for treating email as a file-backed system instead of a live mailbox integration. Keep the archive local, index it separately, and expose only the actions you need - search, read, draft, and attachment handling - rather than giving an agent broad mail credentials. If you use MCP servers, mirror this design for other document stores so your agents operate on structured files with explicit tool boundaries.

According to the project notes, eml-mcp then indexes those files and makes them available to connected AI tools through the Model Context Protocol, or MCP. MCP is a standard that lets external tools expose structured actions to AI assistants, rather than forcing the assistant to work only with plain text.

The server supports Node.js 20 or later and expects a OneDrive folder that is synced locally. On first run, it creates inbox/, outbox/, and drafts/ subdirectories automatically inside the email directory. The project also supports a SQLite index, with a default database path at ~/.eml-mcp/index.db unless changed by the user.

The tool list includes search_emails for full-text search with filters such as sender, date, attachments, and folder. It also includes get_email to parse and return a single message, compose_email to create a new draft .eml file, update_email to edit an existing draft, and open_email to launch a file in the default mail client.

Other tools handle file management and attachments. Users can delete email files, refresh the index to reflect new or changed disk contents, extract attachments to a directory, open attachments with the default application, and search for messages containing attachments by filename, type, or keyword.

The project includes setup examples for several AI coding tools. For Claude Code, the instructions show adding the server with claude mcp add eml. For GitHub Copilot, the project provides a JSON snippet for ~/.copilot/mcp-config.json. For Codex CLI, it shows a config entry in ~/.codex/config.toml.

To install locally, the project says to run npm install and npm run build, then register the local build with the relevant MCP client. The README also notes that the --from flag can be used to set the from address for composed drafts, with a default of draft@eml-mcp if not provided.

In short, eml-mcp is a local email archive server for AI assistants, built around .eml files exported from Outlook and organized by folder so connected tools can read and write mail through MCP commands.

Source: HN Show HN ↗

More from OpenClaw News