loading…
Search for a command to run...
loading…
Enables AI agents to interact with email accounts via the Himalaya CLI, supporting features like message reading, folder management, and controlled email sendin
Enables AI agents to interact with email accounts via the Himalaya CLI, supporting features like message reading, folder management, and controlled email sending. It prioritizes security with graduated permission modes and the exclusion of destructive operations like permanent deletion.
MCP server that exposes email operations to AI agents (Claude Cowork, Claude Code, etc.) via the himalaya CLI.
Read-only by default. Write and send operations must be explicitly enabled.
[DANGER: WRITE], send tools labeled [DANGERZONE: SENDS EMAIL]subprocess.run() with list argumentsclaude_desktop_config.jsonbrew install uv (macOS) or see uv docsVerify himalaya is working:
himalaya account list
Clone the repository:
git clone https://github.com/andasv/himalaya-mcp-server.git
cd himalaya-mcp-server
uv sync
Add the server to your claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"himalaya": {
"command": "uv",
"args": ["run", "--project", "/path/to/himalaya-mcp-server", "himalaya-mcp-server"]
}
}
}
Warning: Full mode allows the AI agent to move messages, modify flags, create folders, and save drafts. It does not allow sending emails.
{
"mcpServers": {
"himalaya": {
"command": "uv",
"args": ["run", "--project", "/path/to/himalaya-mcp-server", "himalaya-mcp-server"],
"env": {
"HIMALAYA_MODE": "full"
}
}
}
}
Warning: Dangerzone mode allows the AI agent to send real emails to real recipients. This is irreversible. Only enable this if you fully understand the risks.
Dangerzone mode requires the APPROVED_RECIPIENTS environment variable — a comma-separated list of email addresses the AI is allowed to send to. Sending to any other address will be blocked with a friendly error.
{
"mcpServers": {
"himalaya": {
"command": "uv",
"args": ["run", "--project", "/path/to/himalaya-mcp-server", "himalaya-mcp-server"],
"env": {
"HIMALAYA_MODE": "dangerzone",
"APPROVED_RECIPIENTS": "[email protected],[email protected]",
"HIMALAYA_SEND_TIMEOUT": "15"
}
}
}
}
After editing the config, restart Claude Desktop for changes to take effect.
# Read-only (default)
claude mcp add himalaya -- uv run --project /path/to/himalaya-mcp-server himalaya-mcp-server
# Full mode (write operations, no sending)
claude mcp add --env HIMALAYA_MODE=full himalaya -- uv run --project /path/to/himalaya-mcp-server himalaya-mcp-server
# Dangerzone mode (write + send, with approved recipients)
claude mcp add --env HIMALAYA_MODE=dangerzone --env [email protected],[email protected] himalaya -- uv run --project /path/to/himalaya-mcp-server himalaya-mcp-server
| Mode | Env var | Tools available |
|---|---|---|
| readonly (default) | HIMALAYA_MODE=readonly or unset |
List accounts/folders/envelopes, read messages, download attachments, generate templates |
| full | HIMALAYA_MODE=full |
All of the above + move, copy, flag, create folders, save drafts |
| dangerzone | HIMALAYA_MODE=dangerzone |
All of the above + send emails |
| Variable | Required | Default | Description |
|---|---|---|---|
HIMALAYA_MODE |
No | readonly |
Operating mode: readonly, full, or dangerzone |
APPROVED_RECIPIENTS |
In dangerzone | — | Comma-separated list of email addresses allowed as recipients |
HIMALAYA_SEND_TIMEOUT |
No | 15 |
Timeout in seconds for send operations. Himalaya retries SMTP 450 errors indefinitely, so this prevents hangs. Keep below 60s (Cowork's tool timeout). |
HIMALAYA_LOG_LEVEL |
No | WARNING |
Log verbosity: DEBUG, INFO, WARNING, ERROR. Logs never contain email content or credentials — stderr from himalaya CLI is sanitized before logging. |
| Tool | Description |
|---|---|
account_list |
List configured email accounts |
folder_list |
List folders/mailboxes |
envelope_list |
List message envelopes with search/filter/pagination |
envelope_thread |
Get thread view of envelopes |
message_read |
Read a message body by ID |
message_thread |
Read a full message thread |
attachment_download |
Download attachments from a message |
template_write |
Generate a blank email template (MML) |
template_reply |
Generate a reply template |
template_forward |
Generate a forward template |
These tools are prefixed with [DANGER: WRITE] in their descriptions so the AI agent clearly sees the risk.
| Tool | Description |
|---|---|
folder_create |
Create a new folder |
message_copy |
Copy a message to another folder |
message_move |
Move a message to another folder |
message_save |
Save a raw MIME message to a folder |
flag_add |
Add flags to a message |
flag_set |
Replace all flags on a message |
flag_remove |
Remove flags from a message |
template_save |
Compile MML template and save to folder |
These tools are prefixed with [DANGERZONE: SENDS EMAIL] in their descriptions. They send real emails to real recipients and cannot be undone.
| Tool | Description |
|---|---|
message_send |
Send a raw MIME message |
template_send |
Compile MML template and send email |
Since himalaya's interactive editor commands can't be used in an MCP context, email composition uses the template pipeline:
template_write, template_reply, or template_forwardtemplate_send (requires dangerzone mode) or save as draft with template_save (requires full mode)From: [email protected]
To: [email protected]
Subject: Hello
Your message body here.
The following himalaya commands are deliberately not exposed through this MCP server for safety reasons. Allowing an AI agent to permanently delete emails or folders carries too high a risk of irreversible data loss.
| himalaya command | What it does | Why it's excluded |
|---|---|---|
folder expunge |
Permanently removes messages marked for deletion | Irreversible bulk deletion |
folder purge |
Deletes ALL messages in a folder | Irreversible bulk deletion |
folder delete |
Deletes an entire folder and its contents | Irreversible data loss |
message delete |
Permanently deletes a single message | Irreversible data loss |
If you need these operations, use the himalaya CLI directly.
HIMALAYA_MODE=full or dangerzoneAPPROVED_RECIPIENTS must be set; emails can only be sent to explicitly approved addresses[DANGER: WRITE], send tools show [DANGERZONE: SENDS EMAIL]shell=TrueMIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"himalaya-mcp-server": {
"command": "npx",
"args": []
}
}
}