email-mcp · marlinjai — Claude Code MCP server: what it does, how to install
Connects Gmail, Outlook, iCloud, and IMAP inboxes to AI agents. It handles message searching, drafting, replies, and bulk inbox cleanup via prompt.
claude mcp add email-mcp -- npx -y @marlinjai/email-mcpWhat email-mcp does
The server links the model to mail providers using native REST endpoints for Gmail and Microsoft Graph for Outlook. For iCloud and other providers, it falls back to standard IMAP and SMTP protocols. Credentials stay secured locally under AES-256-GCM encryption. Search calls return compact payloads by default, keeping prompt token consumption low.
Account configuration relies on an interactive CLI wizard. Running it requires the -p parameter explicitly; omitting this flag causes the process to freeze on stdin. Shared Gmail OAuth credentials are limited to pre-approved test accounts during Google verification. For regular Gmail usage, you must supply your own Google Cloud OAuth credentials via environment variables.
What it helps with
- search inbox messages using sender and date filters
- clean up hundreds of old emails in one batch
- send email replies directly from the coding assistant
- manage multiple accounts across Gmail, Outlook, and IMAP simultaneously
Example prompts for the agent
- Search my Gmail inbox for invoices received in the past seven days.
- Archive all newsletters older than one month from my Outlook account.
- Check connection status across all configured email accounts.
How to install email-mcp
Platform CLI
claude mcp add email-mcp -- npx -y @marlinjai/email-mcpPlatform CLI
codex mcp add marlinjai-email-mcp -- npx -y @marlinjai/email-mcpConfig file
{
"mcpServers": {
"marlinjai-email-mcp": {
"command": "npx",
"args": [
"-y",
"@marlinjai/email-mcp"
]
}
}
}Config file
{
"servers": {
"marlinjai-email-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@marlinjai/email-mcp"
]
}
}
}Platform CLI
gemini mcp add marlinjai-email-mcp npx -y @marlinjai/email-mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about email-mcp
How to install email-mcp in Claude Code?
First, configure your accounts by running npx -y -p @marlinjai/email-mcp@latest email-mcp-setup. Then register the server by executing claude mcp add email-mcp -- npx -y @marlinjai/email-mcp.
What does email-mcp do?
It gives AI assistants 36 email tools covering search, reading, folder inspection, drafting, and batch organization. Communication uses native APIs for Google and Microsoft, with IMAP compatibility for other services.
Why does the setup wizard freeze without the -p flag?
The npm package contains two separate binaries. Without -p, npx defaults to running the main server executable instead of the wizard, leaving it waiting indefinitely for MCP protocol input on stdin.
Similar MCP servers
Everything for Notes, tasks and projects →email-mcp by other authors comes first.