# mcp-twake-mail [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/linagora/mcp-twake-mail  
**GitHub Stars:** 1  
**npm Downloads (last month):** 1461  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-twake-mail

## Description
MCP server for Twake.ai Mail: give any MCP-compatible AI assistant secure access to your sovereign JMAP mailbox (Twake Mail, Apache James…)

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-twake-mail": {
    "command": "npx",
    "args": ["-y","mcp-twake-mail"]
  }
}
```

## Documentation

## What mcp-twake-mail does

mcp-twake-mail gives an MCP-compatible assistant access to a JMAP mailbox. It is intended for Twake Mail but can also connect to JMAP services such as Apache James, Stalwart, Cyrus IMAP and Fastmail. The server covers mail reading and search, thread inspection, draft creation, replies, mailbox organisation, attachments and message delivery.

The tool set includes 33 operations. Read-only functions retrieve messages, labels, threads, mailboxes and attachments. Write functions can create or update drafts, send or forward messages, move or label mail, manage mailbox subscriptions, and delete messages or mailboxes. Batch operations handle up to 50 messages at a time.

## How it works

The server communicates with the mailbox through JMAP, following RFC 8620 and RFC 8621. It can discover a JMAP service from an email address using DNS SRV records, `.well-known/jmap`, and OAuth metadata. Authentication supports Basic credentials, bearer tokens, OIDC with PKCE and automatic refresh, or a token command that obtains short-lived credentials from an external broker.

Reading messages, threads and attachments does not require confirmation. Before a write, the server presents the precise action through MCP elicitation and proceeds only after approval. `approve_batch` can authorise a specified series of writes for one session and up to 15 minutes; it does not replace the separate batch tools, which apply one operation to multiple emails.

Draft generation supports plain text and HTML alternatives, signatures, reply threading and optional reply-all handling. Attachments for drafts are restricted to the configured upload directory. Large downloads can be written to disk rather than returned inline.

## Setup and configuration

Node.js 20 or newer and access to a JMAP server are required. The interactive setup command is:

```bash
npx mcp-twake-mail setup
```

The wizard discovers the mailbox service, asks for an authentication method and credentials, configures the default sender and signature, tests connectivity and can write the Claude Desktop configuration. The broader `mcp-twake-ai` setup command can install this server alongside other Twake.ai MCP servers and configure supported agents.

The server can also be invoked from a terminal or script. `npx mcp-twake-mail tools` lists available tools, while `npx mcp-twake-mail call <tool>` invokes one using the server configuration. Terminal writes have separate approval options, including `--i`; unattended use requires an explicitly permitted name with `--yes --as`.

`JMAP_UPLOAD_DIR` controls where files may be read for draft attachments. `JMAP_DOWNLOAD_DIR` can choose the directory used for downloaded attachments, which otherwise defaults to `~/Downloads`. `USER_LANGUAGE=fr` affects the language of quoted reply text.

## Tools and capabilities

- Read individual emails, labels, threads and thread messages.
- Search across mailboxes, including by participant in From, To, Cc or Bcc fields, with pagination support.
- Create, revise and prepare replies as drafts with signatures, HTML and plain-text content.
- Send, reply to, forward and send existing drafts after approval.
- Mark messages read or unread, move them, add or remove labels, and apply those actions in batches of up to 50.
- List, inspect, create, rename, subscribe to and delete mailboxes, with protection for Inbox, Sent, Drafts and Trash.
- List and download attachments, optionally saving them to disk.
- Approve a defined sequence of write calls once instead of confirming each eligible call separately.

## Limitations and notes

Sending, deleting, drafting, moving, labelling and other write actions are approval-controlled. Destructive operations are identified through MCP annotations, including `destructiveHint`; tools also declare read-only and idempotency hints.

Files outside the upload directory are rejected, including paths reached through symbolic links. Attachments larger than 750 KB are saved to disk instead of being returned inline. Unsubscribed mailboxes may be hidden from normal views and require the mailbox subscription tool to show them again.

The server uses HTTPS for exchanges and writes logs to stderr rather than the MCP channel. Its license is AGPL-3.0.

_Full upstream README: https://allmcps.com/mcp/mcp-twake-mail/readme_

