mail-mcp

mail-mcp

An IMAP helper for Thunderbird workflows that allows searching, reading, and creating/updating/deleting drafts with HTML and attachments via MCP or CLI, but cannot send emails.

Category
Visit Server

README

mail-mcp

Built on davidvornholt/standards.

A draft-only IMAP helper for Thunderbird workflows, exposed to Codex, Claude, and other compatible clients as an MCP server and to you as a mail CLI over one shared Effect core. Through the MCP server it can search and read mail and create, update, or delete drafts with HTML and attachments; the mail CLI covers login, status, folder/search/read, and plain-text draft creation. It cannot send emails: drafts sync into Thunderbird for review and sending.

Layout

apps/mail            the application (MCP server + CLI)
  src/app            entrypoints: server.ts (MCP, stdio), cli.ts (the `mail` bin)
  src/features/mail  schemas, tagged errors, and Effect services (config, secrets, status, IMAP, draft, login)
  src/shared         app-local infrastructure (arg parsing, hidden-input terminal prompt)
packages/*           canonical shared config synced from the standards template

See apps/mail/README.md for the tool list, configuration, and secret handling.

Setup

bun install

# put the `mail` command on your PATH (one-time; links the app's bin into
# ~/.bun/bin). After this, run `mail …` from anywhere.
bun link --cwd apps/mail

# configure your accounts (non-secret: addresses, IMAP hosts, and ports). The real
# file is git-ignored so your addresses never land in git.
cp apps/mail/accounts.example.toml apps/mail/accounts.toml
# …edit apps/mail/accounts.toml…

# verify each account's password against IMAP, then store it in the OS keyring
# (hidden prompt — nothing is echoed or written to disk). Run this yourself;
# the secret never leaves your machine.
mail login you@example.com

# confirm each account authenticates cleanly (or shows what still needs a login)
mail status

Register the MCP server with Codex:

codex mcp add mail -- bun run <repo>/apps/mail/src/app/server.ts
codex mcp get mail

Codex defers MCP tool definitions until they are relevant, so registering the server does not eagerly add every mail tool schema to the model context. Restart Codex after adding it, then use /mcp to inspect the connected server.

For explicit write approvals and more headroom for IMAP operations, edit the generated entry in ~/.codex/config.toml:

[mcp_servers.mail]
command = "bun"
args = ["run", "<repo>/apps/mail/src/app/server.ts"]
startup_timeout_sec = 15
tool_timeout_sec = 120
default_tools_approval_mode = "writes"

[mcp_servers.mail.tools.delete_draft]
approval_mode = "prompt"

For Claude Code (user scope), use:

claude mcp add --scope user mail -- bun run <repo>/apps/mail/src/app/server.ts

Once a password is stored, ask your MCP client to search your mail or compose a draft. You can also drive the review-first CLI yourself:

mail search you@example.com invoice

Not ready to link a global command? Every example also works as bun run apps/mail/src/app/cli.ts <args>.

Requirements

  • Bun (see packageManager in package.json).
  • A running, unlocked Secret Service provider (gnome-keyring) for the OS keyring.

Quality gate

bun run check runs the standards drift check, then lint, type-check, tests, build, and a11y across every workspace. It must pass before a change is done.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured