Skip to content

Send from a client · Published 2026-09-22 · Updated 2026-09-28 · AgentiSend

Send email from Claude Code

To send email from Claude Code, add the AgentiSend MCP server to Claude Code with the config below, give it an API key that carries a budget, and ask Claude Code to send.

To send email from Claude Code, add the AgentiSend MCP server with one claude mcp add command or a .mcp.json file, give it an API key that carries a budget, and ask Claude Code to send. It then calls the same API your own code calls, the ceiling is checked before any message is accepted, and a refusal arrives with a fix naming the next call.

From the terminal

claude mcp add --transport http agentisend registers the server without opening an editor. The line takes the server URL and a --header carrying Authorization: Bearer and the key. Copy it whole from the MCP guide, where it is generated from the same URL as every other client's install line, then put your key where the placeholder is.

As a file in the project

The same server, written as the file Claude Code reads. It is the object the console install dialog copies:

{
  "mcpServers": {
    "agentisend": {
      "type": "http",
      "url": "https://api.agentisend.com/mcp",
      "headers": {
        "Authorization": "Bearer as_YOUR_API_KEY_HERE"
      }
    }
  }
}
Claude Code — .mcp.json

Save as .mcp.json at your project root, or run claude mcp add-json agentisend with this JSON. Claude Code needs the "type": "http" line to treat the entry as a remote server.

A .mcp.json at the project root goes wherever the repository goes, key included. Commit it with the placeholder still in place, and give each person who works in the project a key of their own.

As a plugin

/plugin marketplace add fortuneflick/agentisend-claude-plugin, then /plugin install agentisend@agentisend. This brings the server and the sending skill in one step. The skill tells Claude Code to check what it may spend, preflight a send for free, and ask a person when a send is risky, which is the order a long unattended session needs.

A first prompt

A Claude Code session can work through a long task on its own, so this prompt sets a rule for the rest of the session as well as testing the connection.

Use the agentisend MCP tools. Call whoami and report the account, the scopes and the budget left. Run preflight_email for a message from any address to delivered@simulator.agentisend.com and show each gate's verdict, then send it with send_email and give me the id. For the rest of this session, call request_approval before any send to a real address, and read list_agent_actions for the answer instead of sending again.

request_approval sends nothing and spends no budget. A person decides in the console; GET /agent-actions is the same queue over REST.

The key it should hold

Give Claude Code a sending_access key of its own, made with POST /api-keys, and cap it with PATCH /limits/keys/{id} before the session starts. If it meets agent_budget_exceeded, approval_required or kill_switch_active, each arrives with retryable set to false: the right move is to report the fix and stop.

The same limits from every client

Budgets, loop detection, approvals and the kill switch behave identically whichever client holds the key, so they are not repeated here. The guardrails checklist maps each item people are told to hand-write onto the request that already enforces it, and Email for AI agents names every control with its endpoint.

Next