Connect MultiMail to LibreChat for AI Email

Add email capabilities to your self-hosted LibreChat instance through MCP. Send, read, and manage email with any supported LLM.


LibreChat is an open-source, self-hosted AI chat platform that supports multiple LLM providers including OpenAI, Anthropic, Google, and local models. With MCP integration, you can extend LibreChat's capabilities with external tools like MultiMail, giving any connected model access to email operations.

MCP servers in LibreChat are configured in the platform's YAML configuration file, typically librechat.yaml. LibreChat supports both stdio and SSE transport, and the MultiMail server connects via stdio. Once configured, email tools are available across all conversations in your LibreChat instance.

For teams and organizations running their own AI chat infrastructure, the LibreChat and MultiMail combination provides email tools with full data sovereignty. You control the chat platform, choose your LLM provider, and MultiMail handles the email operations with configurable oversight.

Get started

1

Get your MultiMail API key

Sign up at multimail.dev and create an API key from your dashboard. This key authenticates all MCP server requests.

2

Create an agent mailbox

In the MultiMail dashboard, create a mailbox for your LibreChat instance. Set oversight to gated_send so outbound emails require approval.

3

Configure MCP in librechat.yaml

Add the MultiMail MCP server to your LibreChat configuration file.

json
mcpServers:
  multimail:
    type: stdio
    command: npx
    args:
      - "-y"
      - "@multimail/mcp-server"
    env:
      MULTIMAIL_API_KEY: "mm_live_your_key_here"
4

Restart LibreChat

Restart your LibreChat instance to load the new MCP configuration. If using Docker, run 'docker compose restart' or rebuild with 'docker compose up -d'.

5

Verify the connection

Start a new conversation in LibreChat and ask the AI to list your MultiMail mailboxes. If the MCP server is connected, email tools will be available in the conversation.


Available MCP tools

ToolDescriptionExample
send_emailSend an email from your agent mailbox to any recipient.Send a summary of a team discussion to all participants.
reply_emailReply to a received email, maintaining the thread context.Reply to a client inquiry using information from the chat history.
check_inboxCheck a mailbox for new or unread messages.Check for new support tickets in the shared team inbox.
read_emailRead the full content of a specific email including headers and body.Read a detailed customer inquiry to draft a thorough response.
create_mailboxCreate a new agent mailbox on your MultiMail account.Create a department-specific mailbox for the LibreChat instance.
list_mailboxesList all mailboxes on your MultiMail account.View available mailboxes to select the right sender identity.
get_threadRetrieve an entire email thread to see the full conversation history.Pull up a full customer support thread for context.
search_contactsSearch your contact list by name, email, or tags.Find contacts by department to send targeted announcements.
add_contactAdd a new contact to your MultiMail contact list.Add a new vendor contact after receiving their first email.
tag_emailTag or categorize an email for organization and filtering.Tag support emails by issue category for reporting.
list_pendingList all emails currently awaiting human approval.Review all queued outbound emails before end of business.
decide_emailApprove or reject a pending email in the oversight queue.Approve a customer response after reviewing it for accuracy.

Usage examples

LibreChat YAML configuration
yaml
mcpServers:
  multimail:
    type: stdio
    command: npx
    args:
      - "-y"
      - "@multimail/mcp-server"
    env:
      MULTIMAIL_API_KEY: "mm_live_your_key_here"

Add this to your librechat.yaml to connect MultiMail.

Docker Compose with Node.js
yaml
# In your docker-compose.yml, ensure the LibreChat service
# has Node.js available. If using the official image, Node.js
# is typically pre-installed. Otherwise, add:
services:
  librechat:
    image: ghcr.io/danny-avila/librechat:latest
    environment:
      - MULTIMAIL_API_KEY=mm_live_your_key_here
    volumes:
      - ./librechat.yaml:/app/librechat.yaml

Ensure Node.js is available in your LibreChat Docker container for npx.

Team support workflow
text
Check the support inbox for unread emails. For each one, categorize it as 'billing', 'technical', or 'general'. Draft a response for each technical issue, referencing our documentation. Queue the responses for my review.

Use LibreChat as a shared support agent with email capabilities.

Multi-provider email composition
text
Read the latest email in my inbox. Draft three different response options: one formal, one friendly, and one brief. Let me choose which to send.

Leverage LibreChat's multi-provider support for email drafting.


Best practices

Ensure Node.js is available in Docker

If you run LibreChat in Docker, verify that Node.js and npx are available inside the container. The official LibreChat Docker image typically includes Node.js. If using a custom image, you may need to install Node.js for the MCP server to work.

Use presets for email workflows

LibreChat supports conversation presets with pre-configured system prompts. Create a preset for email operations that instructs the AI to check the inbox first, summarize messages, and await your instructions before sending replies.

Share email tools across your team

Since LibreChat is multi-user, all users on your instance can access the configured MultiMail tools. Use MultiMail's oversight mode to ensure proper review of outbound emails, regardless of which team member initiates them.

Use environment variables for secrets

Instead of hardcoding your API key in librechat.yaml, use an environment variable reference. Set MULTIMAIL_API_KEY in your Docker Compose environment or .env file, and reference it in the YAML config.


Common questions

Does LibreChat support MCP natively?
Yes, LibreChat has built-in MCP support configured through its librechat.yaml file. It supports both stdio and SSE transport for MCP servers. The MultiMail server uses stdio transport, which works with LibreChat's process management system.
Can multiple LibreChat users share the same MultiMail connection?
Yes. The MCP server is configured at the LibreChat instance level, so all users on your LibreChat deployment can access MultiMail tools. Emails are sent from the configured agent mailbox regardless of which user initiates the action. Use MultiMail's oversight mode to review all outbound emails.
Which LLM providers work with MCP tools in LibreChat?
MCP tool use in LibreChat works with providers that support function calling, including OpenAI (GPT-4), Anthropic (Claude), and compatible local models. Not all models support tool use equally well, so use a capable model like GPT-4 or Claude for reliable MCP tool invocation.
How do I update the MCP server in a Docker deployment?
The npx command fetches the latest version of @multimail/mcp-server each time it runs. To update, simply restart your LibreChat container. If you want to pin a specific version, specify it in the args like '@multimail/[email protected]'.
Can I use SSE transport instead of stdio?
LibreChat supports both stdio and SSE transport. While MultiMail's npm package uses stdio, you could potentially host the MCP server separately and connect via SSE. For most deployments, stdio is simpler and recommended since the server runs as a child process of LibreChat.

More MCP clients

The only agent email with a verifiable sender

Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.