Claude Code model router
Agentmail To Claude Code
Email gateway that opens a Claude Code session per inbound AgentMail message (cmux or Ghostty)
Install
git clone https://github.com/mvanhorn/agentmail-to-claude-code.gitFrom the README
agentmail-to-claude-code Email gateway for Claude Code. Subscribe an AgentMail inbox over WebSocket, or poll a Primitive inbox over REST; on every authenticated, allowlisted message the daemon opens a fresh Claude Code session in your terminal, writes the email to a prompt file, and tells Claude to read and act on it. Send an email to the watched inbox and Claude Code starts working on whatever's in the subject and body, with any attachments available to it by path. The point: because the trigger is just an email, you can put Claude Code to work on your own computer from anywhere. I've wired it to a cc command in my agent Hermes, so from my phone I run cc and it lands as a working session on my Mac, no VPN or SSH into the machine. See How I use it with Hermes. It drives either terminal: - cmux (cmux.com) via its Unix-socket control plane, or - standalone Ghostty (ghostty.org) via AppleScript. Pick one with CC_TERMINAL in your env. How it works 1. cc-daemon.py connects to the selected provider: - CC_MAIL_PROVIDER=agentmail subscribes to AgentMail's WebSocket for AGENTMAIL_INBOX. - CC_MAIL_PROVIDER=primitive polls Primitive for PRIMITIVE_INBOX. 2. On each incoming message, the handler drops anything whose sender isn't in CC_ALLOWED_FROM or that failed DKIM/SPF. 3. Attachments are downloaded under CC_HOME/attachments//. Per-attachment failures log a warning and continue. 4. A prompt is built from From:, Subject:, the body, and a footer listing every downloaded attachment by absolute path. It's written to CC_HOME/prompts/.md. 5. The selected backend opens a new Claude Code session and sends a single-line pointer telling Claude to read and act on the prompt file: - cmux: surface.create (auto-launches Claude Code via the Ghostty config cmux reads) -> poll…
Details
- Repository
- mvanhorn/agentmail-to-claude-code
- Language
- Python
- License
- MIT
- Last updated
- 4 June 2026
FAQ
What is Agentmail To Claude Code?
Email gateway that opens a Claude Code session per inbound AgentMail message (cmux or Ghostty) It is a model router for Claude Code, from mvanhorn/agentmail-to-claude-code on GitHub.
How do I install Agentmail To Claude Code?
Clone mvanhorn/agentmail-to-claude-code from GitHub and follow the setup steps in its README.
Is Agentmail To Claude Code popular?
mvanhorn/agentmail-to-claude-code has 48 GitHub stars and 8 forks. It was last updated on 4 June 2026.
More model routers & proxies
Copilot Proxy
45Jer-y/copilot-proxy
Turn GitHub Copilot into an OpenAI/Anthropic-compatible server with Claude Code and Codex support.
Claude Opus Interface Toolkit
56noBlock125/claude-opus-interface-toolkit
Claude Code Desktop Pro 2026 - AI Pair Programmer & CLI Tool
Star Cliproxy
43starhunt/star-cliproxy
OpenAI- & Anthropic-compatible API proxy for AI coding CLIs — expose Claude Code, OpenAI Codex, Google Antigravity, and xAI Grok CLI as local, drop-in API endpoints with no API key and zero usage fees
Chatgpt Codex Proxy
44insightflo/chatgpt-codex-proxy
An Anthropic-compatible /v1/messages proxy that lets Claude Code use the ChatGPT Codex backend.
Anymodel
45anton-abyzov/anymodel
Use Claude Code with any AI model — proxy tools for OpenRouter, Ollama, and 200+ models
Nvidia Anthropic Proxy
40evanlong-me/nvidia-anthropic-proxy
A Cloudflare Worker proxy that enables Claude Code to use NVIDIA NIM API models
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.