tutamcp MCP Server for Tuta

tutamcp MCP Server for Tuta

MCP server giving Claude access to Tuta mail, calendar, contacts and drive. Supports mail modes (dedicated/shared/folder), trusted sender filtering with E2E verification, and Docker-based setup.

Category
访问服务器

README

tutamcp

MCP server giving Claude access to a Tuta account: mail, calendar, contacts, and drive. Each module is enabled independently. Built on top of tutaproxy's TutaClient — no direct Tuta API calls.

30 MCP tools across 4 modules. Requires tutaproxy-public ≥ v1.3.10.

Quickstart — Docker

The easiest setup: no local dependencies beyond Docker. The image bundles tutaproxy at build time.

git clone https://github.com/peix2/tutamcp-public.git
cd tutamcp-public
docker build -t tutamcp .

Pin a specific tutaproxy release (default: v1.3.10):

docker build --build-arg TUTAPROXY_REF=v1.3.10 -t tutamcp .

Create a credentials file (chmod 600):

TUTA_EMAIL=your@tuta.com
TUTA_PASSWORD=yourpassword

Register in Claude Code (.mcp.json or ~/.claude.json):

{
  "mcpServers": {
    "tutamcp": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-v", "/path/to/credentials.env:/creds.env:ro",
        "-e", "TUTAMCP_CREDENTIALS_FILE=/creds.env",
        "-e", "TUTAMCP_ENABLE_MAIL=1",
        "-e", "TUTAMCP_MAIL_MODE=dedicated",
        "-e", "TUTAMCP_OWNER_EMAIL=you@tuta.com",
        "tutamcp"
      ]
    }
  }
}

Without Docker

Requires Python 3.11 and a local clone of tutaproxy-public.

git clone https://github.com/peix2/tutamcp-public.git
cd tutamcp-public
pip install --target=.venv/lib/python3.11/site-packages -r requirements.txt

Register in Claude Code:

{
  "mcpServers": {
    "tutamcp": {
      "command": "python3.11",
      "args": ["/path/to/tutamcp-public/run.py", "/path/to/tutamcp-public/server.py"],
      "env": {
        "TUTAPROXY_PATH": "/path/to/tutaproxy-public",
        "TUTAMCP_CREDENTIALS_FILE": "/path/to/credentials.env",
        "TUTAMCP_ENABLE_MAIL": "1",
        "TUTAMCP_MAIL_MODE": "dedicated",
        "TUTAMCP_OWNER_EMAIL": "you@tuta.com",
        "TUTAMCP_DOWNLOAD_DIR": "/tmp/tutamcp"
      }
    }
  }
}

For Claude Desktop, use the same block in ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).

Configuration

See config.example.env for all variables. Key options:

Mail modes

Mode Description
dedicated Account belongs to Claude only. Full access, send enabled by default.
shared Account shared with the user. Full read/write access; send policy controlled by TUTAMCP_MAIL_SEND.
folder Shared account; Claude sees only the folder set in TUTAMCP_MAIL_FOLDER. Send is always reply-only.

Send policy

TUTAMCP_MAIL_SEND=reply_only — only tuta_mail_reply is registered; recipients are derived from the original mail only, no arbitrary addresses accepted.

TUTAMCP_MAIL_SEND=full — also registers tuta_mail_send for initiating new threads.

Default: dedicatedfull, sharedreply_only, folder → always reply_only.

Trusted senders

Used for autonomous mail handling (e.g. a background poller that wakes Claude to process incoming commands).

Variable Description
TUTAMCP_OWNER_EMAIL Always trusted.
TUTAMCP_COMMAND_WHITELIST Comma-separated list of additional trusted addresses.
TUTAMCP_TRUST_REQUIRE_E2E 1 (default) — trust requires end-to-end encryption (Tuta→Tuta, TutaCrypt). Protects against spoofed From headers on external mail; owner and whitelist must use Tuta accounts. Set to 0 to trust by address alone.
TUTAMCP_MAIL_CC_OWNER 1 — automatically CC the owner on every outgoing mail.

tuta_mail_list and tuta_mail_read return trusted_sender: bool and e2e: bool on every message. Pass only_trusted=True to tuta_mail_list to filter to trusted senders only.

Tools

Status

Tool Description
tuta_status Server info: version, enabled modules, mail mode/send policy, session state

Mail

Tool Description
tuta_mail_list_folders List all folders
tuta_mail_list List emails without body. Supports only_trusted, unread, pagination
tuta_mail_read Read full email with decrypted body and attachment metadata
tuta_mail_get_attachment Download attachment to TUTAMCP_DOWNLOAD_DIR
tuta_mail_send Send new email (requires mail_send=full)
tuta_mail_reply Reply to email; recipients derived from original only
tuta_mail_move Move to folder
tuta_mail_delete Delete permanently or move to trash
tuta_mail_mark Mark as read/unread
tuta_mail_folder_create Create custom folder
tuta_mail_folder_rename Rename custom folder
tuta_mail_folder_delete Delete custom folder
tuta_mail_list_labels List labels
tuta_mail_apply_labels Add/remove labels on a mail

Calendar

Tool Description
tuta_calendar_list_events List events in a date range (recurring events always included)
tuta_calendar_create_event Create event with optional RRULE recurrence
tuta_calendar_update_event Update event
tuta_calendar_delete_event Delete event

Note: editing a single occurrence of a recurring series is not supported.

Contacts

Tool Description
tuta_contacts_list List/search contacts by name, company, or email
tuta_contacts_get Get full contact details
tuta_contacts_create Create contact
tuta_contacts_update Update contact fields
tuta_contacts_delete Delete contact

Drive

Tool Description
tuta_drive_list List folder contents by path
tuta_drive_download Download file to TUTAMCP_DOWNLOAD_DIR
tuta_drive_upload Upload local file
tuta_drive_mkdir Create folder
tuta_drive_rename Rename file or folder
tuta_drive_move Move file or folder
tuta_drive_delete Delete file or folder

Drive requires a paid Tuta account. Free accounts receive an informative error rather than a crash.

Security

  • Credentials are never logged. The server warns if the credentials file permissions are wider than 600.
  • All logging goes to stderr or a log file. stdout is reserved for the MCP protocol.
  • Tool registration is conditional: a disabled module registers no tools — Claude doesn't see them at all.
  • In folder mode, all operations are scoped to the configured folder; attempts to access outside it are rejected at the tool level.
  • Reply-only policy is enforced structurally: tuta_mail_send is simply not registered, not blocked at runtime.
  • Path traversal on attachment/drive downloads is blocked (basename sanitization + regex).

License

AGPL-3.0 — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选