Send Letters from Cursor

Cursor's MCP support means your IDE-resident agent can take real-world actions. Here's how to wire Agent Mail in so Cursor can put a letter in the mail.

cursormcptutorial

· Updated

Setup

Add Agent Mail to ~/.cursor/mcp.json (or your project's .cursor/mcp.json):

{
  "mcpServers": {
    "agent-mail": {
      "url": "https://example.com/mcp"
    }
  }
}

Reload Cursor. The next agent invocation will have send_letter and friends available.

What this enables

  • Customer success workflows where an agent drafts a piece of mail in response to an event in your codebase (a closed support ticket, a successful onboarding milestone).
  • Personal assistant flows: ask Cursor to mail a thank-you note based on a meeting transcript in your repo.
  • Onboarding kits: Cursor watches for a new user signup in your test data and the agent mails them a welcome letter.

Tips

  • Keep recipient addresses in a small JSON file the agent can read. Your prompts get shorter and the agent's tool calls get more reliable.
  • For multi-piece flows, lean on list_sent_mail to let the agent check what it has already sent before queuing more.

Full setup walkthrough: /setup. Tool reference: /llms-full.txt.

Wire Mailsnail into your agent

Drop this into your client's MCP config (or use /setup for one-line installs).

mcp.json
{
  "mcpServers": {
    "mailsnail": {
      "command": "npx",
      "args": [
        "-y",
        "physical-mail-mcp"
      ],
      "env": {
        "MAIL_PROVIDER": "managed",
        "MAIL_API_BASE_URL": "https://api.mailsnail.dev"
      }
    }
  }
}

See also