io.github.p-w-4-z/inbox-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.p-w-4-z/inbox-mcp show me unread emails from the last week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
inbox-mcp
Provider-agnostic email MCP server for AI assistants. Connect any IMAP mailbox to Claude Desktop, Cursor, VS Code, or any MCP-compatible client.
Features
8 email tools: get_summary, list_messages, read_message, search, list_folders, mark_read, move_message, create_folder
Provider auto-detection: Automatically configures Gmail, Outlook, GMX from your email address
Any IMAP server: Works with any standard IMAP provider out of the box
Read-only mode: Optional safety mode that disables all write operations
Security-first: No delete operations exposed. Ever.
Related MCP server: Errol-Mail
Quick Start
pip install inbox-mcpConfiguration
Set two environment variables:
export INBOX_MCP_EMAIL="you@gmail.com"
export INBOX_MCP_PASSWORD="your-app-password"All Environment Variables
Variable | Required | Default | Description |
| Yes | — | Your email address |
| Yes | — | Password or app password |
| No | Auto-detected | IMAP server hostname |
| No | 993 | IMAP port |
| No | Auto-detected | Force provider: gmail, outlook, gmx, generic |
| No | false | Set to |
Provider Auto-Detection
Email Domain | Provider | IMAP Host |
gmail.com, googlemail.com | gmail | imap.gmail.com |
outlook.com, hotmail.com, live.com | outlook | outlook.office365.com |
gmx.net, gmx.at, gmx.de, gmx.ch, gmx.com | gmx | imap.gmx.net |
yahoo.com, ymail.com, rocketmail.com | yahoo | imap.mail.yahoo.com |
anything else | generic | imap.{domain} |
Gmail Setup
Gmail requires an App Password:
Enable 2-Step Verification on your Google account
Go to App Passwords
Generate a password for "Mail"
Use that as
INBOX_MCP_PASSWORD
Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"inbox": {
"command": "inbox-mcp",
"env": {
"INBOX_MCP_EMAIL": "you@gmail.com",
"INBOX_MCP_PASSWORD": "your-app-password"
}
}
}
}Claude Code
claude mcp add -e INBOX_MCP_EMAIL=you@gmail.com -e INBOX_MCP_PASSWORD=your-app-password inbox inbox-mcpCursor / VS Code
Add to .cursor/mcp.json or .vscode/mcp.json:
{
"mcpServers": {
"inbox": {
"command": "inbox-mcp",
"env": {
"INBOX_MCP_EMAIL": "you@gmail.com",
"INBOX_MCP_PASSWORD": "your-app-password"
}
}
}
}Running Directly
# As entry point
inbox-mcp
# As module
python -m inbox_mcpTools
Tool | Description | Write? |
| Inbox stats: total, unread, last 7 days | No |
| List messages with filters (all, unread, today, week) | No |
| Full message body by sequence number | No |
| Search by subject or sender | No |
| List all IMAP folders/labels | No |
| Set messages as read | Yes |
| Move messages between folders | Yes |
| Create a new IMAP folder | Yes |
Write tools are disabled when INBOX_MCP_READ_ONLY=true.
Multiple Accounts
Run multiple instances with different names:
{
"mcpServers": {
"work-email": {
"command": "inbox-mcp",
"env": {
"INBOX_MCP_EMAIL": "you@company.com",
"INBOX_MCP_PASSWORD": "work-password",
"INBOX_MCP_HOST": "mail.company.com"
}
},
"personal-email": {
"command": "inbox-mcp",
"env": {
"INBOX_MCP_EMAIL": "you@gmail.com",
"INBOX_MCP_PASSWORD": "gmail-app-password"
}
}
}
}License
Dual-licensed:
AGPL-3.0 — free for open-source use (see LICENSE)
Commercial — for proprietary use (see LICENSE-COMMERCIAL)
If your project is open-source, you can use inbox-mcp under AGPL-3.0 at no cost. For proprietary/closed-source use, contact hello@breact.com for a commercial license.
Available Tools
8 toolscreate_folderB
Create a new IMAP folder.
Args: folder_name: Name of the folder to create (e.g. 'Archive/2024')
Inputs: folder_name (required). Returns: result
get_summaryA
Get inbox statistics: total messages, unread count, and messages from the last 7 days.
Inputs: no named parameters. Returns: result
list_foldersA
List all available IMAP folders/labels in the email account.
Inputs: no named parameters. Returns: result
list_messagesA
List messages from a mailbox folder.
Args: folder: IMAP folder to read from (default: INBOX) filter: Message filter — 'all', 'unread', 'today', or 'week' (default: unread) limit: Maximum number of messages to return, up to 50 (default: 20)
Inputs: folder, filter, limit. Returns: result
mark_readA
Mark one or more messages as read (sets the IMAP Seen flag).
Args: message_ids: List of IMAP sequence numbers to mark as read folder: IMAP folder containing the messages (default: INBOX)
Inputs: message_ids (required), folder. Returns: result
move_messageA
Move one or more messages to a different folder. Creates the target folder if needed.
Args: message_ids: List of IMAP sequence numbers to move target_folder: Destination IMAP folder source_folder: Source IMAP folder (default: INBOX)
Inputs: message_ids (required), target_folder (required), source_folder. Returns: result
read_messageA
Read the full body of a specific email by its sequence number.
Args: message_id: The IMAP sequence number of the message (from list_messages) folder: IMAP folder containing the message (default: INBOX)
Inputs: message_id (required), folder. Returns: result
searchA
Search messages by subject or sender.
Args: query: Search term to look for in subject and sender fields folder: IMAP folder to search in (default: INBOX) limit: Maximum number of results, up to 50 (default: 20)
Inputs: query (required), folder, limit. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: folder creation, summary stats, folder listing, message listing, marking read, moving, reading, and searching. No overlaps.
All tool names follow a consistent verb_noun snake_case pattern (e.g., create_folder, list_messages, mark_read). 'search' is a verb but fits the pattern.
8 tools cover the core inbox management operations without bloat. The count is appropriate for the domain.
Covers main actions: folder creation, listing, message reading, marking read, moving, searching. Missing delete/mark unread/send are minor gaps but not critical for the stated purpose.
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email for AI agents: read, search and send from your Gmail, Outlook, Yahoo, iCloud or IMAP inbox.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Your IMAP mailbox as an MCP server: read, search and (if you allow it) organize mail. Open source.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP server that receives emails on your domain and allows AI assistants to search, read, and manage them via natural language queries.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI assistants comprehensive access to Apple Mail accounts, enabling email discovery, reading, flag management, and server-side message retrieval.MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for any IMAP mailbox that lets AI models read, search, send, and manage email, including processing attachments as images.1-
- AlicenseNot gradedqualityDmaintenanceA self-hosted, multi-mailbox MCP server that exposes IMAP/SMTP operations as tools for AI agents, enabling email management like listing folders, reading, searching, sending, and moving messages via natural language.MIT