Claude
Skills
Sign in
Back

resend-integration-skills

Included with Lifetime
$97 forever

Integrate Resend email service via MCP protocol for AI agents to send emails with Claude Desktop, GitHub Copilot, and Cursor. Set up transactional and marketing emails, configure sender verification, and use AI to automate email workflows.

AI Agentsscripts

What this skill does


## Links

- **Resend Official**: https://resend.com
- **Resend API Docs**: https://resend.com/docs/api-reference
- **Resend MCP Server**: https://resend.com/docs/knowledge-base/mcp-server
- **Resend MCP GitHub**: https://github.com/resend/mcp-send-email
- **MCP Protocol Spec**: https://modelcontextprotocol.io
- **GitHub MCP Registry**: https://github.com/mcp
- **VS Code Insider Setup**: https://code.visualstudio.com/insiders

## Quick Start

### 1. Prerequisites

- Node.js 20 or higher (required - the MCP server specifies `engines: { "node": ">=20" }`)
- Resend account (free tier available at https://resend.com)
- GitHub Copilot Pro or Cursor with Agent mode enabled
- VS Code Insider (required for full MCP support)
- npm or pnpm package manager

### 2. Clone and Build Resend MCP Server

```bash
# Clone the Resend MCP server repository
git clone https://github.com/resend/mcp-send-email.git
cd mcp-send-email

# Install dependencies (npm or pnpm both supported)
npm install
# or if you prefer pnpm:
# pnpm install

# Build the project (TypeScript compilation + executable permissions)
npm run build
```

The build process:
1. Compiles TypeScript to JavaScript
2. Sets executable permissions on the built script (Unix/macOS)
3. Creates the MCP server executable at `build/index.js`

### 3. Create Resend API Key

1. Visit https://resend.com/api-keys
2. Create a new API key
3. Copy the key to your clipboard (you'll need it for configuration)

### 4. (Optional) Verify Your Domain

To send emails from a custom domain:

1. Go to https://resend.com/domains
2. Add and verify your domain
3. Update MCP configuration with `--sender` flag (see Configuration section)

### 5. Configure MCP for Your Client

Choose your setup based on your GitHub Copilot tier:

**For GitHub Copilot Coding Agent (Repository-level setup):**

This is the recommended approach for team collaboration. Repository admins configure MCP servers at the repository level.

1. Navigate to your repository on GitHub.com
2. Go to Settings → Copilot → Coding agent
3. Add the following JSON configuration:

```json
{
  "mcpServers": {
    "resend": {
      "type": "local",
      "command": "node",
      "args": ["/absolute/path/to/mcp-send-email/build/index.js"],
      "env": {
        "RESEND_API_KEY": "COPILOT_MCP_RESEND_API_KEY"
      },
      "tools": ["*"]
    }
  }
}
```

4. Set up the Copilot environment:
   - Go to Settings → Environments
   - Create new environment called `copilot`
   - Add secret: `COPILOT_MCP_RESEND_API_KEY` with your API key value

5. Click Save and Copilot will validate the configuration

**For VS Code Local Development (Developer setup):**

If you're developing locally or prefer VS Code configuration:

1. Create `.vscode/mcp.json` in your project root:

```json
{
  "servers": {
    "resend": {
      "type": "command",
      "command": "node",
      "args": ["/absolute/path/to/mcp-send-email/build/index.js"],
      "env": {
        "RESEND_API_KEY": "re_xxxxxxxxxxxxxx"
      }
    }
  }
}
```

2. Get the absolute path to `build/index.js`:
   - Right-click `build/index.js` in VS Code → Copy Path

**For Cursor Agent Mode:**

Open Cursor Settings (Cmd+Shift+P → "Cursor Settings") and add to MCP config:

```json
{
  "mcpServers": {
    "resend": {
      "type": "command",
      "command": "node /absolute/path/to/mcp-send-email/build/index.js --key=re_xxxxxxxxxxxxxx"
    }
  }
}
```

**For Claude Desktop:**

1. Open Claude Desktop settings
2. Go to Developer tab → Edit Config
3. Add configuration:

```json
{
  "mcpServers": {
    "resend": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-send-email/build/index.js"],
      "env": {
        "RESEND_API_KEY": "re_xxxxxxxxxxxxxx",
        "SENDER_EMAIL_ADDRESS": "[email protected]",
        "REPLY_TO_EMAIL_ADDRESS": "[email protected]"
      }
    }
  }
}
```

### 6. Test the Connection Using email.md Pattern

The official Resend repository includes a test pattern using an `email.md` file:

1. **Create `email.md` in your project:**
   ```markdown
   to: [email protected]
   subject: Test from Resend MCP
   content: This is a test email.

   Hello! This is a test email sent via Resend MCP.
   
   # You can also test CC and BCC:
   # cc: [email protected]
   # bcc: [email protected]
   ```

2. **In Cursor (with Agent mode):**
   - Open the `email.md` file
   - Select all text (`Cmd+A` / `Ctrl+A`)
   - Press `Cmd+L` / `Ctrl+L` (or use the context menu)
   - Tell Cursor: "send this as an email" or "send this email using resend MCP"
   - Make sure you're in Agent mode (toggle in chat dropdown)

3. **In Claude Desktop:**
   - Paste the email.md content in the chat
   - Ask Claude to send it: "Send this email using the resend tool"

4. **In GitHub Copilot:**
   - Open email.md file
   - Reference it in the chat: "@email.md send this email using resend"

If configured correctly, the email will be sent immediately and you'll receive confirmation.

## Key Concepts

### MCP Configuration Types

There are two main ways to configure Resend MCP with GitHub Copilot:

**1. GitHub Copilot Coding Agent (Repository-level)**
- Configuration in GitHub repository settings (Repository admin required)
- Used when assigning Copilot tasks to work on GitHub issues
- Requires explicit `tools` array specifying which tools Copilot can use
- API keys stored as GitHub Actions secrets (prefixed with `COPILOT_MCP_`)
- Autonomous execution without approval (security considerations apply)

**2. VS Code Local Development**
- Configuration in `.vscode/mcp.json` (local developer setup)
- Used for local development with VS Code Insider
- API keys stored directly in config or environment variables
- Better for individual developers or testing

### Resend MCP Server

The Resend MCP Server is a local Node.js application that exposes Resend's email functionality as tools for LLMs. It implements the Model Context Protocol, allowing AI agents to:

- **Send emails** via natural language commands (plain text or HTML)
- **Schedule emails** for future delivery
- **Add recipients** (To, CC, BCC)
- **Configure sender information** (From, Reply-To)
- **Broadcast emails** to audience segments
- **Manage audiences** - List Resend audiences for targeted sending
- **Support HTML and plain text** email bodies

Recent additions (as of early 2026):
- Broadcast and audience management tools for marketing campaigns
- Better error handling and validation via Zod schemas

### MCP Configuration Methods

There are three ways to run the Resend MCP server:

1. **Command-type (VS Code/Cursor)**: Direct Node.js execution with inline arguments
2. **Stdio-type (Claude Desktop)**: Server handles I/O through environment variables
3. **HTTP-type (Remote/Cloud)**: Server exposed via HTTP endpoint

### GitHub Copilot Coding Agent Specifics

For GitHub Copilot Coding Agent (repository-based setup):

- **Required `tools` array**: Must specify which tools from the Resend MCP server Copilot can use
  - Use `"tools": ["send_email", "schedule_email", ...]` to allowlist specific tools
  - Use `"tools": ["*"]` to enable all tools
  - Use case-specific tool names from the MCP server documentation
  
- **No approval required**: Once configured, Copilot will use these tools autonomously without asking
  
- **Security consideration**: Copilot will have automated access to the Resend API via the configured tools, so only enable the tools you need
  
- **Environment variable handling**: API keys must be stored as GitHub Actions secrets with `COPILOT_MCP_` prefix
  - Reference them in config as `"COPILOT_MCP_RESEND_API_KEY"` (without the value)
  - GitHub automatically passes the secret value to the MCP server

### Authentication

Resend MCP server requires:

- **RESEND_API_KEY** (required): Your Resend API key from https://resend.com/api-keys
- **SENDER_EMAIL_ADDRESS** (optional): Verified domain email. If not set, AI will prompt for it
- **REPLY_TO_EMAIL_ADDRESS** (optional): Email address for re

Related in AI Agents