techtv-mail
techtv-mail — 一个面向 pete@techtv.live 的 Cowork 连接器
这是一个小型 MCP 服务器,可让 Claude (Cowork) 通过你的 cPanel 托管的 pete@techtv.live 邮箱读取和发送邮件——其工作方式与你现有的 Microsoft 365 和 Gmail 账号相同,只是专门为这个邮箱构建,因为 Anthropic 没有针对通用 IMAP/cPanel 邮件提供预置连接器。
它向 Claude 暴露了四个工具:
list_folders— 查看存在哪些邮件文件夹search_emails— 按发件人、主题、正文或时间新近度搜索某个文件夹get_email— 获取一封邮件的完整文本/HTMLsend_email— 以 pete@techtv.live 的身份发送邮件
1. 部署到始终在线的地方
这个服务需要运行在一台能够 24/7 通过公网访问的小型服务器上——它不能放在你自己的电脑上,也不能放在 Claude 会话中,因为这两者都会离线。对于这种规模很小的服务来说,最便宜、最简洁的选择是:
Railway (railway.app) — 免费/低价套餐,可直接从 zip 或 GitHub 仓库部署,并自动为你设置
PORT。Render (render.com) — 类似,为小型服务提供免费套餐(免费套餐在空闲时会休眠,之后遇到第一个请求会多几秒延迟)。
一台你已经有的小型 VPS(如果你更愿意自己运行)。
无论你选择哪一个,步骤都是一样的:
上传这个文件夹(或者把它推送到一个 GitHub 仓库,然后关联该仓库)。
设置让它先运行
npm install,然后运行npm start(或node server.js)。在对应平台的控制台中设置下面这些环境变量——绝对不要把真实凭据写进代码里,也不要提交到 git 中。
部署完成后,平台会提供一个公共 URL,例如
https://techtv-mail-production.up.railway.app。
Related MCP server: IMAP MCP Server
2. 需要在服务器上设置的环境变量
变量 | 值 |
|
|
|
|
|
|
|
|
| 该邮箱的真实密码 |
| 一个很长的随机字符串——见下文 |
要生成一个好的 ACCESS_TOKEN,你可以在任何装有 Node 的机器上运行下面这段命令,或者直接用密码生成器生成一个至少 40 个字符的随机字符串:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"这个 token 会变成服务器 URL 的一部分,而且它是连接公共互联网和你的邮箱之间唯一的屏障,所以要把它当作密码一样对待——足够长、足够随机、绝不分享、绝不公开贴到任何地方。
3. 把它作为自定义连接器添加到 Cowork
部署完成之后,在 Claude 应用中:
转到 Customize > Connectors(或者在对话中点击“+” / 输入“/”,然后选择 “Manage connectors”)。
点击 + 进行浏览,然后选择 Add custom connector。
对于服务器 URL,请输入:
https://<your-host-domain>/mcp/<ACCESS_TOKEN>(这两部分都来自你的部署——你所在平台给你的域名,以及你设置为环境变量的那个 token)。
将 OAuth Client ID/Secret 字段留空——这个服务器不使用 OAuth,URL 中的 token 就是访问控制手段。
保存/连接。之后,每当该连接器在某个对话中启用时,Claude 就应该会列出
list_folders、search_emails、get_email和send_email作为可用的工具。
安全说明
邮箱密码只存在于平台的托管环境中,绝不会出现在这段代码里,也绝不会输入到与 Claude 的对话中。
任何人只要获得了完整的连接器 URL(包括其中的 token),就能针对这个邮箱使用这些工具,所以绝不要在公共场合粘贴这个 URL(比如共享文档、公共仓库、别人能看到的 Slack 频道)。如果你怀疑 URL 已经泄露,请生成一个新的
ACCESS_TOKEN,在平台上更新它,并在 Cowork 的连接器设置中重新输入新的 URL——旧的 URL 会立即失效。这个邮箱的真正密码也应该和平时一样只存放在你的密码管理器中;这个服务器只需要在部署时以环境变量的形式使用它一次。
本地测试(可选,部署之前)
你可以先在本地运行,以确认你的真实凭据有效:
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然后在另一个终端中运行:
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"}}}'如果响应成功,会看到返回的 result 块包含了服务器信息——如果得到的是身份验证错误,请再次检查 EMAIL_PASS,并确认在 cPanel 中该邮箱的 IMAP/SMTP 访问没有被阻止。
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
- AlicenseAqualityAmaintenanceEnables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.4041776MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to read, search, send, and manage emails across multiple IMAP/SMTP accounts via a single deployment.
- AlicenseNot gradedqualityDmaintenanceEnables reading, sending, and managing emails via IMAP/SMTP through natural language, including listing folders, searching, moving emails, and sending attachments.6MIT
- FlicenseBqualityBmaintenanceEnables Claude to read, send, and manage emails via IMAP/SMTP for Strato mail accounts, including folder navigation, attachment handling, and draft management.15
Related MCP Connectors
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
AI email inbox and sending tools with attachments, search, live events, and webhooks.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
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/GPeteWarren/techtv-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server