mail-mcp-oauth
mail-mcp-oauth
Servidor MCP autoalojado de IMAP/SMTP para Claude.ai con OAuth 2.1 habilitado: un fork de maxx3250/claude-mail-mcp con una capa integrada de OAuth 2.1 + Dynamic Client Registration + PKCE, y adaptado para ejecutarse como un único proceso sin estado en Render (sin VPS, sin nginx, sin systemd, sin disco persistente).
Multicuenta: una sola implementación sirve varios buzones (Gmail, dominios personalizados, ...), cada uno accesible vía IMAP/SMTP. Cada herramienta MCP acepta un parámetro opcional account para elegir sobre qué buzón actuar.
Qué cambia con respecto al upstream
OAuth 2.1 integrado (src/oauth.ts):
/register(DCR),/authorize(PKCE + formulario de inicio de sesión de un solo usuario),/token. No hay un proceso de shim de OAuth separado: el upstream menciona uno, pero no está publicado, así que este fork lo implementa directamente en la misma aplicación Express.Sin estado por diseño: los tokens de acceso y de actualización son JWT firmados (sin base de datos); los clientes OAuth registrados y los códigos de autorización en curso están en memoria (un reinicio solo hace que Claude.ai se re-registre silenciosamente, algo que su cliente MCP ya controla).
Cuentas desde una variable de entorno:
ACCOUNTS_JSONen lugar de un archivo en disco, porque el sistema de archivos de Render es efímero. El archivoACCOUNTS_FILEsigue funcionando para uso local/VPS.Se eliminaron las herramientas de CalDAV/calendario: no son necesarias para este despliegue y reducen la superficie de dependencias (
tsdav,ical.js).
Related MCP server: IMAP MCP Server
Arquitectura
Claude.ai (web)
│ HTTPS + OAuth 2.1 (DCR, PKCE, JWT)
▼
Render (TLS terminated automatically, custom domain mcp-mail.<domain>)
▼
this process (single Node service)
├── /.well-known/oauth-authorization-server, /register, /authorize, /token (src/oauth.ts)
├── /mcp (Bearer-gated MCP Streamable HTTP transport)
│ ├── ImapClient ──▶ imapflow ──▶ IMAP server (993/143) per account
│ └── SmtpClient ──▶ nodemailer ──▶ SMTP server (465/587) per account
└── /healthConfiguración local
npm install
cp .env.example .env
# fill in PUBLIC_URL, ACCOUNTS_JSON (see docs/ACCOUNTS.md), OAUTH_USER,
# OAUTH_PASS, and JWT_SECRET (openssl rand -hex 32)
npm run devDespliegue en Render
Consulta docs/DEPLOY_RENDER.md para el paso a paso completo (push a GitHub, servicio web Render, dominio personalizado, DNS de Netcup, conexión con Claude.ai).
Cuentas
Consulta docs/ACCOUNTS.md para el esquema de accounts.json y la configuración por proveedor (contraseñas de aplicación de Gmail, Netcup Webhosting IMAP/SMTP, y por qué Hotmail/Outlook.com necesita un flujo OAuth2 separado).
Herramientas expuestas a Claude
Herramienta | Finalidad |
| Lista los buzones configurados (id, label, default, From) — nunca las credenciales |
| Enumera los buzones IMAP |
| Lista los N mensajes más recientes de una carpeta |
| Búsqueda IMAP del lado del servidor |
| Cuerpo completo + encabezados + metadatos de adjuntos |
| Envía por SMTP (opcionalmente, copia en Enviados) |
| Construye RFC-822 y añade (APPEND) a Borradores |
| Controla |
| Mueve entre carpetas |
| Elimina (destructivo: prefiere mover a la Papelera) |
Licencia
MIT — consulta LICENSE. Obra original de Markus Stöger (maxx3250/claude-mail-mcp).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables seamless email management through natural language conversations with Claude. Supports searching, reading, and sending emails securely with Gmail and other email providers.4MIT
- AlicenseAqualityAmaintenanceEnables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.4041776MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read, search, send, label, and trash emails in any Gmail account via Google's Gmail API, using OAuth2 authentication with automatic token refresh.67MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching, reading, moving, tagging, and linking emails in MailMate via MCP tools, allowing Claude to manage email without leaving the conversation.3GPL 3.0
Related MCP Connectors
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/00thies-blip/mail-mcp-oauth'
If you have feedback or need assistance with the MCP directory API, please join our Discord server