Send from a client · Published 2026-09-22 · Updated 2026-09-28 · AgentiSend
Send email from VS Code and GitHub Copilot
To send email from VS Code and GitHub Copilot, add the AgentiSend MCP server with the config below, give it an API key that carries a budget, and ask Copilot to send.
To send email from VS Code and GitHub Copilot, add the AgentiSend MCP server to .vscode/mcp.json in the workspace, give it an API key that carries a budget, and ask Copilot to send. Copilot's agent mode reads the same workspace file VS Code does, so one config serves both, and both call the same API your own code calls. The ceiling is checked before a message is accepted, and a refusal carries a fix naming the next call.
The workspace file
The block is the object the console install dialog copies. There is no separate Copilot connector to install: Copilot uses this file.
{
"servers": {
"agentisend": {
"type": "http",
"url": "https://api.agentisend.com/mcp",
"headers": {
"Authorization": "Bearer as_YOUR_API_KEY_HERE"
}
}
}
}Paste into .vscode/mcp.json in your workspace (VS Code 1.99+; also reachable via MCP: Add Server).
Look at the first key. This file uses servers, where Cursor, Claude Code and Claude Desktop use mcpServers, so a block lifted from one of their pages has the wrong top-level name. Use this one, and replace the placeholder with a key issued for this workspace.
Two other ways to write it
code --add-mcpwith a one-line JSON object:"type":"http", the URL and theAuthorizationheader. The exact line is on the MCP guide.- The MCP: Add Server command, which the note under the block names.
Preflight in agent mode
preflight_email runs every gate a real send runs, from validation and the sending domain through suppression, budget, the loop guard and the content scan. Nothing leaves and no budget is spent. Its REST twin is POST /emails/preflight, which reports exactly what POST /emails would do with the same body. That makes it a safe first request for an agent that has never sent before.
Use the agentisend MCP tools. Call whoami. Then run preflight_email for a message from any address to success@simulator.agentisend.com and show me each gate's verdict. If every gate passes, send it with send_email and give me the message id. If one fails, quote its code and fix and stop.What the key allows
Issue a sending_access key with POST /api-keys and set its ceiling with PATCH /limits/keys/{id}. Copilot can send with it and read what it sent. When a send answers agent_budget_exceeded, approval_required or kill_switch_active, the decision belongs to a person, and retryable says so by being false.
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
- Email for AI agents names every control and the request that calls it.
- Email guardrails maps the usual checklist onto these same fields.
- The MCP guide has the install line for every client, including VS Code.