cpanel-mail-mcp
Provides tools for working with cPanel-hosted mailboxes via IMAP, SMTP, and CalDAV. Supports reading mail (listing folders, listing/searching messages, fetching messages and attachments), sending and drafting mail (send, reply with reply-all and quoting, forward with attachments, create drafts), organizing mail (flags, move, archive, spam, trash, folder creation/renaming/deletion, emptying trash), and optional CalDAV calendar operations (list calendars, list/create/update/delete events).
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., "@cpanel-mail-mcpshow me my unread emails from this 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.
__ __ _ ___ _ __ __ ____ ____
| \/ | / \ |_ _| | | \/ |/ ___| _ \
| |\/| | / _ \ | || | | |\/| | | | |_) |
| | | |/ ___ \ | || |___ | | | | |___| __/
|_| |_/_/ \_\___|_____| |_| |_|\____|_|cpanel-mail-mcp
cPanel posta kutunu Claude'a bağla. · Connect your cPanel mailbox to Claude.
IMAP · SMTP · CalDAV · stdio MCP
Türkçe
cPanel posta kutuları için stdio MCP sunucusu. Claude Code ve Claude masaüstü uygulamasına doğrudan bağlanır; OAuth shim, reverse proxy veya sürekli açık bir sunucu gerekmez.
Ekip üyeleri için adım adım kurulum rehberi: KURULUM.md
🚀 Kurulum
npx -y https://github.com/Burak-Kumas/cpanel-mail-mcp/archive/refs/heads/main.tar.gz setupAdım | Ne olur |
1 | Sihirbaz cPanel posta hesabının kullanıcı adını, şifresini, sunucusunu ve IMAP/SMTP portlarını sorar. Sunucu ve portlar cPanel varsayılanlarıyla dolu gelir. |
2 | Kaydetmeden önce gerçek bir IMAP ve SMTP girişiyle doğrular, takvimin var olup olmadığını kendisi tespit eder. |
3 | Hem Claude Code'a hem masaüstü uygulamasına kaydeder. |
Kurulum ~/.cpanel-mail-mcp/ altına yapılır (npx önbelleği geçici olduğu için
kalıcı bir dizine kopyalanır), ayarlar ~/.cpanel-mail-mcp/.env dosyasında
600 izniyle tutulur.
Kurulum git yerine GitHub'ın.tar.gz arşivinden yapılır: npm 12 ve sonrası
github: kaynaklarını varsayılan olarak reddeder (EALLOWGIT).
🧰 Araçlar
Grup | Araçlar |
📥 Okuma |
|
✉️ Yazma |
|
🗂️ Düzenleme |
|
📁 Klasörler |
|
📅 Takvim |
|
Kalıcı silme: delete_message yalnızca ALLOW_DELETE=true ise açılır.
Varsayılan kapalıdır; normal silme trash_message ile çöp kutusuna taşır ve
geri alınabilir. INBOX klasörü silinemez.
🔒 Tasarım kararı
Sunucu process başına tek posta kutusu çalışır. Herkes kendi makinesinde kendi kimlik bilgisiyle bir örnek çalıştırır; şifre o makineden hiç çıkmaz.
Merkezî bir kurulum bilinçli olarak tercih edilmedi: cPanel'de mail için OAuth ya da uygulama şifresi yoktur, dolayısıyla merkezî bir sunucu herkesin düz IMAP şifresini saklamak zorunda kalırdı. O şifre kutuyu okuma ve o kişi adına mail gönderme yetkisinin tamamıdır; tek bir ihlal tüm ekibin yazışmasını açar.
🛠️ Geliştirme
git clone https://github.com/Burak-Kumas/cpanel-mail-mcp.git
cd cpanel-mail-mcp
npm install
npm run build
cp .env.example .env # kendi değerlerini gir
npm startbuild/ depoya dahildir; npx ile tarball kurulumunun derleme adımı olmadan
çalışabilmesi için gereklidir. Kaynak değiştirdiğinde npm run build çalıştırıp
build/ çıktısını da commit et.
Ayarlar sunucunun kendi klasöründeki
.envdosyasından okunur; gerçek ortam değişkenleri verilirse onlar önceliklidir.cPanel'in
cpdavdservisi multistatus yanıtlarında yanlışhrefdöndürdüğü için CalDAV keşfi elle yapılır (tsdav'ın otomatik keşfi bu sunucularda "cannot find homeUrl" hatası verir).Taslak klasörü IMAP
SPECIAL-USEbayrağından bulunur; cPanel'de bu klasörDraftsdeğilINBOX.Draftsşeklindedir.Masaüstü uygulaması kullanıcının kabuğunu yüklemez, bu yüzden kayıt sırasında
nodeyerine mutlak yol kullanılır (nvm bir kabuk fonksiyonudur ve masaüstü uygulamasında çözülmez).SMTP teslimatı Gönderilenler'e bir şey koymaz; gönderilen mesaj IMAP
APPENDile oraya ayrıca yazılır. Mesaj bir kez derlenip hem gönderilir hem kaydedilir, böylece iki kopyanınMessage-ID'si aynı olur.rawile gönderirken nodemailer alıcıları başlıklardan okumaz; envelopeMailComposer.getEnvelope()ile ayrıca verilir (Bcc'yi de o taşır).Mesaj gövdeleri
mailparserile çözülür; ham kaynaktan başlık kesmek çok parçalı ve base64 kodlu mesajlarda okunaksız çıktı veriyordu.
Related MCP server: better-email-mcp
English
A stdio MCP server for cPanel mailboxes. It plugs straight into Claude Code and the Claude desktop app; no OAuth shim, reverse proxy or always-on server needed.
Step-by-step guide for teammates (Turkish): KURULUM.md
🚀 Install
npx -y https://github.com/Burak-Kumas/cpanel-mail-mcp/archive/refs/heads/main.tar.gz setupStep | What happens |
1 | The wizard asks for the cPanel mailbox username, password, server and IMAP/SMTP ports. Server and ports come pre-filled with the cPanel defaults. |
2 | Before saving, it verifies them with a real IMAP and SMTP login and detects whether a calendar is available. |
3 | It registers the server with both Claude Code and the desktop app. |
The server is installed under ~/.cpanel-mail-mcp/ (copied to a permanent
directory because the npx cache is temporary), and settings are kept in
~/.cpanel-mail-mcp/.env with mode 600.
Installation uses GitHub's.tar.gz archive instead of git: npm 12 and later
refuse github: sources by default (EALLOWGIT).
🧰 Tools
Group | Tools |
📥 Read |
|
✉️ Write |
|
🗂️ Organize |
|
📁 Folders |
|
📅 Calendar |
|
Permanent delete: delete_message is only exposed when ALLOW_DELETE=true.
It is off by default; regular deletion uses trash_message, which moves mail
to Trash and can be undone. The INBOX folder cannot be deleted.
🔒 Design decision
The server runs one mailbox per process. Everyone runs their own instance on their own machine with their own credentials; the password never leaves that machine.
A central deployment was deliberately ruled out: cPanel mail has no OAuth or app passwords, so a central server would have to store everyone's plain IMAP password. That password grants full rights to read the mailbox and send mail as that person; a single breach would expose the whole team's correspondence.
🛠️ Development
git clone https://github.com/Burak-Kumas/cpanel-mail-mcp.git
cd cpanel-mail-mcp
npm install
npm run build
cp .env.example .env # fill in your own values
npm startbuild/ is committed so the npx tarball install works without a build step.
After changing the source, run npm run build and commit the build/ output
too.
Settings are read from the
.envfile in the server's own directory; real environment variables take precedence when set.cPanel's
cpdavdreturns the wronghrefin multistatus responses, so CalDAV discovery is done by hand (tsdav's automatic discovery fails on these servers with "cannot find homeUrl").The drafts folder is found via the IMAP
SPECIAL-USEflag; on cPanel it isINBOX.Drafts, notDrafts.The desktop app does not load the user's shell, so registration uses an absolute path instead of
node(nvm is a shell function and does not resolve in the desktop app).SMTP delivery does not put anything in Sent; the sent message is written there separately with IMAP
APPEND. The message is compiled once and both sent and filed, so both copies share the sameMessage-ID.When sending
raw, nodemailer does not read recipients from the headers; the envelope is passed separately viaMailComposer.getEnvelope()(it also carries Bcc).Message bodies are decoded with
mailparser; slicing headers out of the raw source produced unreadable output for multipart and base64-encoded messages.
This server cannot be deployed
Maintenance
Related MCP Connectors
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Programmable email inbox for AI agents — JMAP, PoW auth, stdio MCP server.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to read, search, compose, and send emails by connecting to any IMAP/SMTP provider. It supports comprehensive mailbox management, including draft handling and message deletion, directly through natural language.10327 npm10MIT
- AlicenseNot gradedqualityCmaintenanceIMAP/SMTP email for AI agents -- read, send, organize folders, and manage attachments across multiple accounts, with auto-discovery.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to read, search, and manage email via IMAP, and send emails with attachments via SMTP, using natural language commands.468 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read, send, organize, and search emails across multiple IMAP/SMTP mailboxes.499 npmMIT