隐私优先邮件工具

himalaya-mcp是一个隐私优先的邮件管理工具,提供多种邮件操作功能和Claude插件支持,适用于需要安全邮件管理和自动化处理的场景。

  • by Data-Wise
  • TypeScript
  • 本地部署
  • 8 星标
  • 更新于
在 GitHub 查看 Data-Wise/himalaya-mcp

使用说明

himalaya-mcp

Privacy-first email for Claude -- MCP server and Claude Code plugin (himalaya) wrapping the himalaya CLI.

Features

  • 29 MCP tools: list, search, read, flag, move, compose, draft reply, send (with safety gate), export, action items, clipboard, folders, attachments, calendar, threads, health check, get_unread_count, read_email_raw, render_email, list_starred, create_reminder, snooze_email, list_snoozed_emails
  • 7 MCP prompts: triage inbox, summarize email, daily digest, weekly digest, draft reply, morning briefing, inbox check
  • 3 MCP resources: inbox, message by ID, folders
  • 16 plugin skills: /himalaya:inbox, /himalaya:triage, /himalaya:digest, /himalaya:reply, /himalaya:compose, /himalaya:attachments, /himalaya:search, /himalaya:manage, /himalaya:stats, /himalaya:config, /himalaya:help, /himalaya:morning, /himalaya:forward, /himalaya:export, /himalaya:threads, /himalaya:respond
  • Multi-account: per-call account switching via --account
  • Reliability: account-aware diagnostics via the health_check tool and multi-account doctor; structured error envelopes with one-line fix hints
  • Safe subprocess: uses execFile (no shell injection)
  • Two-phase send: send_email returns preview first, requires explicit confirm=true
  • Env-based config: HIMALAYA_BINARY, HIMALAYA_ACCOUNT, HIMALAYA_FOLDER, HIMALAYA_TIMEOUT

Install

Homebrew (recommended)

brew tap data-wise/tap
brew install himalaya-mcp

Installs himalaya CLI + Node.js as dependencies, auto-symlinks plugin to ~/.claude/plugins/.

himalaya-mcp doctor    # Verify installation

Claude Code Plugin (from GitHub)

Prerequisites: Node.js 22+ and himalaya CLI must be installed separately (brew install node himalaya).

claude plugin marketplace add Data-Wise/himalaya-mcp
claude plugin install himalaya
himalaya-mcp doctor    # Verify installation

Claude Desktop (.mcpb -- one-click install)

Download himalaya-mcp-v{version}.mcpb from GitHub Releases and open it in Claude Desktop. Requires brew install himalaya separately -- the .mcpb does not bundle the himalaya CLI.

Claude Desktop (CLI setup)

himalaya-mcp setup

Development (from source)

npm install
npm run build
ln -s ~/projects/dev-tools/himalaya-mcp ~/.claude/plugins/himalaya-mcp
himalaya-mcp doctor    # Verify installation

Prerequisites

  • himalaya CLI configured with at least one email account in ~/.config/himalaya/config.toml
  • Node.js 22+ (installed automatically by Homebrew)

Testing

npm test              # 718 tests across 41 files (vitest)
Category Tests Coverage
Unit (parser, client, config, clipboard) 41 Core parsing, config, template variable guards
Integration (tools, prompts) 85 Tool registration, MCP prompts, account validation
Reliability (errors, retry, accounts, health) 33 Error envelope, transient retry, multi-account discovery, health_check
v1.5.0 features 79 Threads (30), morning/inbox prompts (13), E2E integration (36)
Dogfooding 162 Realistic Claude usage + reliability scenarios + .mcpb validation
E2E 39 Full MCP server pipeline + structured envelope round-trip + .mcpb build pipeline
Setup CLI 45 Setup, install/upgrade E2E, multi-account doctor, plugin structure, --help/--version

Documentation

Full documentation at data-wise.github.io/himalaya-mcp

CLI man pages

The CLI ships with groff man pages following the flow-cli standard:

# After brew install himalaya-mcp, man pages are auto-installed to /opt/homebrew/share/man
man himalaya-mcp
man himalaya-mcp-doctor
man himalaya-mcp-setup
man himalaya-mcp-install-ext
man himalaya-mcp-remove-ext

# Or from the source repo:
MANPATH=$(pwd)/man man himalaya-mcp

Troubleshooting

If an email tool fails, ask Claude:

Run a health check on my email accounts.

This invokes the health_check MCP tool and surfaces a per-account status with one-line fix hints.

From a terminal, run:

himalaya-mcp doctor                    # All accounts
himalaya-mcp doctor --account <name>   # Single account

For the full failure-mode catalog and recovery steps, see docs/troubleshooting.md.

License

MIT