How to Send Emails from Cursor Using MCP Tools

Cursor can read files, generate text, and reason about context. What it can’t do by default is reach outside your local environment. Email is one of the most common external actions you’d want from an agent: draft a message, send it, close the loop. AgentPatch adds that capability to Cursor without any SMTP setup.

Why This Matters

Manual outreach is repetitive work that follows a clear pattern: you have a list of people, some context about each one, and a message template you want to personalize. Cursor is good at the “write a personalized message given this context” part. AgentPatch handles the “now actually send it” part.

Together they let you run outreach campaigns from inside the editor. No email client, no marketing platform, no copy-pasting between windows.

This applies beyond marketing. Beta invites, partner introductions, customer follow-ups, team announcements based on project state. Any time you need to compose and send emails using data that’s already in your project, Cursor can handle it.

Setup

The AgentPatch CLI is designed for AI agents to use via shell access. Install it, and your agent can discover and invoke any tool on the marketplace.

Install (zero dependencies, Python 3.10+):

pip install agentpatch

Set your API key:

export AGENTPATCH_API_KEY=your_api_key

Example commands your agent will use:

ap search "web search"
ap run google-search --input '{"query": "test"}'

Get your API key from the AgentPatch dashboard.

  1. Open Cursor Settings (Cmd+Shift+J on Mac, Ctrl+Shift+J on Windows/Linux).
  2. Navigate to the MCP section in the sidebar.
  3. Click Add new global MCP server.
  4. Cursor opens ~/.cursor/mcp.json. Add the AgentPatch server config:
{
  "mcpServers": {
    "agentpatch": {
      "url": "https://agentpatch.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
  1. Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard.
  2. Save and restart Cursor. It discovers all AgentPatch tools automatically.

Example

You have a list of developers who signed up for early access, stored in a local JSON file. In Cursor’s chat:

“Read early-access.json. For each person, send them a personalized email welcoming them to the beta. Use their first name and reference the use case they described when they signed up.”

Cursor reads the file, generates a personalized email for each entry, and sends them through AgentPatch. The emails go out. You didn’t write sending code and you didn’t open a mail client.

For a smaller, higher-touch scenario:

“I want to reach out to five potential partners. Here’s a description of our project and what we’re looking for. Their details are in partners.csv. Send each one a tailored introductory email.”

Cursor reads the CSV, writes five different emails based on each company’s profile, and sends them. You review the drafts in chat before confirming.

Follow-ups work the same way:

“Check partners.csv and send a follow-up to anyone who hasn’t replied to the initial outreach. Assume anyone not in replies.json hasn’t responded.”

Cursor cross-references the two files, identifies who needs a follow-up, drafts the messages, and sends them.

Wrapping Up

Once AgentPatch is connected to Cursor, email is one of many capabilities your agent gains. The same configuration unlocks web search, YouTube transcripts, image generation, Google Maps, and more. Visit agentpatch.ai to see the full marketplace.