techtv-mail
Enables Claude/Cowork to read and send email through a cPanel-hosted IMAP/SMTP mailbox, providing tools to list folders, search messages, fetch message content, and send email as that mailbox.
README
techtv-mail — a Cowork connector for pete@techtv.live
This is a small MCP server that lets Claude (Cowork) read and send email
through your cPanel-hosted pete@techtv.live mailbox — the same way it
already works with your Microsoft 365 and Gmail accounts, just built
specifically for this mailbox since Anthropic doesn't have a pre-built
connector for generic IMAP/cPanel mail.
It exposes four tools to Claude:
list_folders— see what mail folders existsearch_emails— search a folder by sender, subject, body text, or recencyget_email— fetch the full text/html of one messagesend_email— send mail as pete@techtv.live
1. Deploy it somewhere that's always on
This needs to live on a small server that's reachable over the public internet 24/7 — it can't live on your own computer or in a Claude session, since both go offline. The cheapest, simplest options for something this small:
- Railway (railway.app) — free/cheap tier, deploys straight from a zip
or a GitHub repo, sets
PORTfor you automatically. - Render (render.com) — similar, has a free tier for small services (may sleep when idle on the free tier, which adds a few seconds' delay on the first request after a while).
- A small VPS you already have, if you'd rather run it yourself.
Whichever you pick, the steps are the same shape:
- Upload this folder (or push it to a GitHub repo and connect that repo).
- Set it to run
npm installthennpm start(ornode server.js). - Set the environment variables below in that host's dashboard — never put real credentials in the code or commit them to git.
- Once deployed, the host gives you a public URL, e.g.
https://techtv-mail-production.up.railway.app.
2. Environment variables to set on the host
| Variable | Value |
|---|---|
MAIL_HOST |
mail.techtv.live |
IMAP_PORT |
993 |
SMTP_PORT |
465 |
EMAIL_USER |
pete@techtv.live |
EMAIL_PASS |
the mailbox's real password |
ACCESS_TOKEN |
a long random string — see below |
To generate a good ACCESS_TOKEN, run this on any machine with Node or
just use a password generator for something like 40+ random characters:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
This token becomes part of the server's URL and is the only thing standing between the public internet and your mailbox, so treat it exactly like a password — long, random, never shared, never posted anywhere public.
3. Add it to Cowork as a custom connector
Once deployed, in the Claude app:
-
Go to Customize > Connectors (or click "+" / type "/" in a chat and choose "Manage connectors").
-
Click + to browse, then Add custom connector.
-
For the server URL, enter:
https://<your-host-domain>/mcp/<ACCESS_TOKEN>(both pieces come from your deployment — the domain your host gave you, and the token you set as an environment variable).
-
Leave the OAuth Client ID/Secret fields blank — this server doesn't use OAuth, the token in the URL is the access control.
-
Save/Connect. Claude should now list
list_folders,search_emails,get_email, andsend_emailas available tools whenever this connector is enabled in a chat.
Security notes
- The mailbox password only ever lives in the host's environment variables — it's never in this code, never typed into a chat with Claude.
- Anyone who obtains the full connector URL (including the token) could use these tools against the mailbox, so don't paste that URL anywhere public (a shared doc, a public repo, a Slack channel others can see).
- If you ever suspect the URL has leaked, generate a new
ACCESS_TOKEN, update it on the host, and re-enter the new URL in Cowork's connector settings — the old URL stops working immediately. - This mailbox's actual password should also just live in your password manager as normal; this server needs it once, at deploy time, as an environment variable.
Local test (optional, before deploying)
You can run it locally first to make sure your real credentials work:
npm install
MAIL_HOST=mail.techtv.live IMAP_PORT=993 SMTP_PORT=465 \
EMAIL_USER=pete@techtv.live EMAIL_PASS='<real password>' \
ACCESS_TOKEN=test123 PORT=3000 node server.js
Then in another terminal:
curl -s -X POST http://localhost:3000/mcp/test123 \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
A successful response looks like a result block naming the server —
if instead you get an authentication error, double check EMAIL_PASS and
that IMAP/SMTP access isn't blocked for this mailbox in cPanel.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。