How to Use the AgentMail MCP in Claude Code
Connect Claude Code to your inbox for terminal-based email automation and headless message processing.
Works with every AI agent you already use
…and any MCP-compatible client
Connect AgentMail MCP to Claude Code
Create your Vinkius account to connect AgentMail to Claude Code and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Headless email processing with Claude Code
Use `list_inboxes` to identify your mail endpoints from the command line. This allows your CI/CD scripts or cron jobs to check for new messages without a browser. Once the agent identifies a thread, it uses `get_thread` to dump the content. You can pipe this output into other shell utilities for processing.
Automate message replies
Claude Code can trigger `reply_to_message` based on exit codes or build triggers. This is useful for notifying stakeholders when a pipeline fails. It handles the thread ID automatically so the conversation remains intact. You don't need a UI to manage these interactions.
Manage attachments via CLI
When you need to pull build logs or reports sent via email, `get_attachment` retrieves the files directly to your machine. It handles the base64 decoding so you get a usable file. This is a clean way to pull data into your server environment. You keep your workflow entirely in the terminal.
Set up AgentMail MCP in Claude Code
Prerequisites
- Claude Code CLI installed (
npm install -g @anthropic-ai/claude-code) - Active Vinkius subscription with a valid endpoint token
- 1
Run the add command
Open your terminal and run the command shown on the right. Replace
[YOUR_TOKEN_HERE]with your endpoint token from cloud.vinkius.com. Use--scope userto make it available across all projects. - 2
Verify the connection
Start a Claude Code session and type
/mcpto list connected servers. You should seeagentmail-mcpwith a green status indicator. - 3
Start using tools
Ask Claude Code something like "Check my latest AgentMail transactions." It will automatically discover and invoke the available AgentMail tools.
claude mcp add --transport http agentmail-mcp https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about AgentMail MCP in Claude Code
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the AgentMail MCP today
We host it, we monitor it, we maintain it. You just paste one token.