Get the FREE Ultimate OpenClaw Setup Guide →

emailbox

This is MCP server to work with Email Box over IMAP/SMTP with support of both STDIO and Streaming HTTP transports and support of MCP Notifications

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gelembjuk-emailbox-mcp-server go build -o mcp-email-http ./http-server/main.go

How to use

EmailBox MCP Server provides email capabilities to MCP-compatible agents over two transports: a local STDIO server and a networked HTTP server. It exposes tools to send emails, read inbox contents, fetch full email bodies including attachments, and receive new-email notifications. Use the STDIO server for local development and testing, or deploy the HTTP server to interact with remote agents and services. Tools include send_email, get_inbox, get_email_contents, and get_attachment to manage and retrieve email data programmatically within MCP workflows.

How to install

Prerequisites:

  • Go 1.23+ installed on your system
  • Access to an email account with IMAP/SMTP enabled (e.g., Gmail with App Passwords)

Installation steps:

  1. Clone the repository or download the source code.

  2. In the repository root, build both servers:

    • Build STDIO server: go build -o mcp-email-stdio ./stdio-server/main.go

    • Build HTTP server: go build -o mcp-email-http ./http-server/main.go

  3. Run the servers:

    • STDIO server (local usage): ./mcp-email-stdio

    • HTTP server (network usage): ./mcp-email-http

  4. Create and populate your config.json in the same directory as the binary, following the example in config.json.example if provided. Ensure IMAP/SMTP credentials are correctly configured.

Tips:

  • Ensure network access for the HTTP server if hosting behind a firewall or reverse proxy.
  • If Gmail is used, consider using an App Password instead of OAuth for compatibility with this MCP server.

Additional notes

Notes and tips:

  • The server supports sending emails in text, Markdown, and HTML formats via SMTP.
  • Read inbox messages via IMAP with optional filters such as limit and unread status.
  • Full email contents including attachments can be fetched; attachments are retrievable as base64.
  • Background polling provides new-email notifications for the HTTP server deployment.
  • If you encounter IMAP/SMTP authentication failures, verify credentials, server addresses, and that IMAP/SMTP access is enabled for the account. For Gmail, App Passwords are recommended.
  • If you run into port conflicts for the HTTP server, configure a different port or reverse proxy as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers