
Resend Integration Skills
- 352 installs
- 22 repo stars
- Updated January 21, 2026
- gocallum/nextjs16-agent-skills
resend-integration-skills is an agent skill that adds Resend transactional and lifecycle email to Next.js apps so developers send signup, receipt, notification, and agent-triggered outbound messages from API routes.
About
resend-integration-skills is an agent skill from gocallum/nextjs16-agent-skills for adding Resend email to Next.js applications. It guides setup of transactional messages for signup verification, payment receipts, system notifications, and agent-triggered outbound email from server routes or server actions. Developers reach for resend-integration-skills when a Next.js 16 app needs production email without maintaining SMTP infrastructure. The skill encodes Resend SDK patterns, template wiring, and API route integration so email flows ship alongside core product features.
- Resend API wiring for Next.js projects
- Transactional email templates and send flows
- Environment keys and server-side send safety
- Supports onboarding, billing, and notification use cases
Resend Integration Skills by the numbers
- 352 all-time installs (skills.sh)
- Ranked #1,155 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Data as of Jul 24, 2026 (Skillselion catalog sync)
npx skills add https://github.com/gocallum/nextjs16-agent-skills --skill resend-integration-skillsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 352 |
|---|---|
| repo stars | ★ 22 |
| Last updated | January 21, 2026 |
| Repository | gocallum/nextjs16-agent-skills ↗ |
How do you add Resend email to a Next.js app?
Add transactional and lifecycle email to a Next.js app using Resend for signup, receipts, notifications, and agent-triggered outbound messages.
Who is it for?
Next.js developers integrating Resend for transactional and lifecycle email in server routes and server actions.
Skip if: Non-Next.js frameworks, marketing-only broadcast tools without transactional API needs, or apps using SendGrid or Postmark instead.
When should I use this skill?
The user asks to add Resend email, transactional messages, signup verification, or notification sending to a Next.js app.
What you get
Resend SDK integration, email API routes, and transactional templates for signup, receipts, and notifications.
- Resend SDK setup
- email API routes
- transactional email templates
Files
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
# 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 buildThe 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:
{
"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_KEYwith 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:
{
"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.jsin VS Code → Copy Path
For Cursor Agent Mode:
Open Cursor Settings (Cmd+Shift+P → "Cursor Settings") and add to MCP config:
{
"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:
{
"mcpServers": {
"resend": {
"command": "node",
"args": ["/absolute/path/to/mcp-send-email/build/index.js"],
"env": {
"RESEND_API_KEY": "re_xxxxxxxxxxxxxx",
"SENDER_EMAIL_ADDRESS": "onboarding@resend.dev",
"REPLY_TO_EMAIL_ADDRESS": "reply@example.com"
}
}
}
}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:
to: your-email@example.com
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: colleague@example.com
# bcc: manager@example.com2. In Cursor (with Agent mode):
- Open the
email.mdfile - 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
toolsarray 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 reply-to header
Verified Domains
By default, Resend allows sending to your own account email using the test domain onboarding@resend.dev. To send to other addresses:
1. For testing: Use the default onboarding@resend.dev sender (no verification needed) 2. For custom domains: Verify your domain at https://resend.com/domains 3. Create a sender email from your verified domain 4. Configure it in MCP environment variables (SENDER_EMAIL_ADDRESS)
Note: If you don't provide a SENDER_EMAIL_ADDRESS, the MCP server will prompt you each time you send an email.
Code Examples
Example 1: Simple Email via Copilot Chat
In VS Code Insider with GitHub Copilot Agent mode:
@workspace I need to send a notification email to john@example.com about the project completion. Use the resend MCP tool to send "Project ABC is now live" as the email body.Example 2: HTML Email with Custom Configuration
Send an HTML email to team@example.com with subject "Monthly Report" and body formatted as an HTML table showing Q1 metrics. Use Resend MCP to send it.Example 3: Email with CC/BCC
Send an email from onboarding@mycompany.com to customer@example.com CC'ing manager@company.com about account activation. Use Resend MCP.Example 4: Scheduled Email
Schedule an email to be sent tomorrow at 9 AM using Resend MCP, reminding the team about the standup meeting.Example 5: Integration with Data Processing
Read the CSV file users.csv, extract the top 10 active users with their emails, and send each a personalized thank you email using Resend MCP. Include their usage statistics in the email.Advanced Features
Broadcast Emails
Send emails to audience segments in your Resend account:
Send a broadcast email to my 'premium_users' audience with subject 'New Feature Release' using Resend MCPAudience Management
Query and work with audiences:
List all my audiences in Resend using the MCP toolBest Practices
GitHub Copilot Coding Agent Security
Important: When configuring Resend MCP for GitHub Copilot Coding Agent:
1. Tool allowlisting - Only enable the specific tools Copilot needs:
"tools": ["send_email", "schedule_email"]Instead of enabling all tools with "*"
2. Secret management - Never commit API keys to version control
- Store API keys as GitHub Actions secrets (Settings → Environments)
- Secret names must start with
COPILOT_MCP_ - Reference secrets by name in the configuration
3. Scope your API key - Consider using a restricted Resend API key if available
4. Review Copilot's actions - Check pull requests created by Copilot to verify emails would be sent appropriately
5. Environment isolation - Use the copilot environment to manage which repositories/workflows have access to your email sending capability
Configuration Management
1. Use `.env.local` for development:
# .env.local (not committed)
RESEND_API_KEY=re_test_xxx
SENDER_EMAIL_ADDRESS=dev@example.com2. Separate configs per environment:
- Development: Test API key, limited recipients
- Production: Full API key, all recipients allowed
3. Document required env vars in README.md:
## Environment Variables
- RESEND_API_KEY: Resend API key (required)
- SENDER_EMAIL_ADDRESS: Verified sender email (optional)
- REPLY_TO_EMAIL_ADDRESS: Reply-to email (optional)Email Content
1. Always include unsubscribe links for marketing emails 2. Test emails with multiple email clients (Gmail, Outlook, Apple Mail) 3. Keep templates responsive for mobile devices 4. Use clear subject lines that describe the email purpose 5. Include plain text alternative to HTML for accessibility
AI Agent Usage
1. Provide context about who should receive emails 2. Specify sender information in the initial setup 3. Review email content generated by AI before sending 4. Use agent mode for complex workflows requiring multiple steps 5. Test with your own email first before sending to others
Troubleshooting
Issue: "Node version too old" or "Node 20+ required"
Solution: Check and update Node.js version
node --version # Should be v20.0.0 or higher- Install Node.js 20+ from https://nodejs.org (LTS version recommended)
- macOS:
brew install node@20(if using Homebrew) - Windows: Download from https://nodejs.org or use
nvm-windows - Linux:
nvm install 20or use package manager - Verify:
node --versionshould showv20.x.xor later - Restart your terminal/IDE after installation
Issue: "Command not found: node"
Solution: Node.js is not installed or not in PATH
- Install Node.js from https://nodejs.org (version 20+ required)
- Verify installation:
node --version - Restart your terminal/IDE after installation
Issue: "RESEND_API_KEY is required"
Solution: API key not provided or invalid
- Generate new key at https://resend.com/api-keys
- Ensure key starts with
re_ - Check MCP configuration for correct environment variable name
- Verify there are no extra spaces in the key
Issue: "Email not delivered / 401 Unauthorized"
Solution: Authentication or domain verification issue
- Verify API key is correct and active
- Check domain is verified at https://resend.com/domains
- Ensure sender email matches verified domain
- Check Resend dashboard for rate limiting or delivery errors
Issue: "Build command fails during npm run build"
Solution: Dependency or TypeScript compilation error
# Clear and reinstall dependencies
rm -rf node_modules package-lock.json
npm install
npm run buildCommon build errors:
- TypeScript compilation error: Check that all dependencies are installed
- Permission denied on Unix/macOS: The build script includes
chmod +x- try running from a different directory - Module not found: Delete
node_modulesand reinstall fresh
Issue: "MCP server not appearing in IDE tools list"
Solution: Configuration or server startup issue
GitHub Copilot: 1. Verify .vscode/mcp.json is in project root (not nested) 2. Check absolute path to build/index.js is correct 3. Reload VS Code window (Cmd+R on macOS, Ctrl+R on Windows) 4. Verify Agent mode is enabled (toggle in chat)
Cursor: 1. Open Cursor Settings (Cmd+Shift+P → "Cursor Settings") 2. Navigate to MCP tab 3. Verify configuration syntax is valid JSON 4. Check absolute path exists and is readable 5. Restart Cursor application
Claude Desktop: 1. Close Claude completely 2. Verify claude_desktop_config.json syntax 3. Check that build/index.js file exists 4. Reopen Claude Desktop 5. Check Developer tab for resend tool
Issue: "Sending emails works but AI doesn't offer to use Resend MCP"
Solution: Agent model or mode issue
- Switch to Claude Sonnet 4 or GPT-4.1 (better tool understanding)
- Enable Agent mode explicitly
- Use explicit mention: "use the resend MCP tool to send..."
- Check MCP server is running (look for console output)
Issue: "Getting 'invalid sender' error"
Solution: Sender email not verified 1. Go to https://resend.com/domains 2. Verify your custom domain if using one 3. Use default onboarding@resend.dev for testing 4. Update SENDER_EMAIL_ADDRESS in MCP config 5. Restart MCP server
Advanced Configuration
Custom MCP Server with HTTP Transport
For shared team environments or cloud-based setups:
{
"servers": {
"resend": {
"type": "http",
"url": "https://your-mcp-server.example.com/mcp"
}
}
}Your HTTP server should forward requests to Resend API.
Environment-Specific Configurations
Use different .mcp.json files per environment:
# Development
cp .mcp.dev.json .vscode/mcp.json
# Production
cp .mcp.prod.json .vscode/mcp.jsonIntegration with Claude Desktop + GitHub Copilot
You can configure both simultaneously:
Claude Desktop config:
{
"mcpServers": {
"resend": {
"command": "node",
"args": ["/path/to/mcp-send-email/build/index.js"],
"env": {
"RESEND_API_KEY": "re_xxxxx"
}
}
}
}VS Code `.vscode/mcp.json`:
{
"servers": {
"resend": {
"type": "command",
"command": "node /path/to/mcp-send-email/build/index.js",
"env": {
"RESEND_API_KEY": "re_xxxxx"
}
}
}
}Both will use the same local MCP server instance.
Workflow Examples
Transactional Email Workflow
1. Setup Phase: Deploy MCP server with production API key 2. Automation Phase: Configure in Claude Desktop or Copilot 3. Integration Phase: Use in application logic via AI agent
When order is confirmed, send confirmation email with order details using Resend MCP4. Monitoring Phase: Check Resend dashboard for delivery status
Marketing Campaign Workflow
1. Prepare email template and recipient list 2. Use AI agent to generate personalized content 3. Review generated emails before sending 4. Send via Resend MCP in batches 5. Monitor open rates and engagement
Notification Workflow
1. Configure Resend MCP for your notification service 2. Create email templates for different notification types 3. Use AI agent to format notifications as emails 4. Send via Resend MCP to subscribers 5. Track delivery and handle bounces
Resources
Resend Integration Skill
This skill enables AI coding agents to integrate with Resend's email service via Model Context Protocol (MCP). Supports GitHub Copilot Coding Agent (recommended for teams), VS Code, Claude Desktop, and Cursor.
What This Skill Provides
- GitHub Copilot Coding Agent: Repository-level email automation for teams
- MCP Server Integration: Local Node.js MCP server that exposes Resend email functionality
- Multi-Platform Support: Works with GitHub Copilot (Coding Agent), VS Code Insider, Claude Desktop, Cursor, and other MCP-compatible clients
- Natural Language Email Sending: Ask your AI agent to send emails in plain English
- Configuration Guides: Step-by-step setup for all supported platforms
- Security Best Practices: API key management via GitHub Actions secrets for teams, environment variables for individuals
- Real-World Examples: Practical patterns for transactional, marketing, and notification emails
Quick Links
- SKILL.md - Complete skill documentation (start here)
- CONFIGURATION.md - Detailed configuration for all clients
- EXAMPLES.md - Real-world usage examples
- setup-resend-mcp.sh - Automated setup script (Linux/macOS)
Installation
Option 1: Automated Setup (Recommended)
chmod +x scripts/setup-resend-mcp.sh
./scripts/setup-resend-mcp.shThis script will: 1. Clone the Resend MCP server 2. Install dependencies 3. Build the project 4. Generate configuration examples 5. Create .env.local with your API key
Option 2: Manual Setup
See SKILL.md - Quick Start section.
Getting Started
1. Get API Key
Visit https://resend.com/api-keys and create a new API key.
2. Choose Your Setup
GitHub Copilot Coding Agent (Recommended for Teams):
- Repository admin configures MCP in GitHub settings
- Secrets managed via GitHub Actions
- See CONFIGURATION.md
GitHub Copilot in VS Code (Local Development):
- Create
.vscode/mcp.jsonin your project - See CONFIGURATION.md
Claude Desktop:
- Edit your Claude config file
- See CONFIGURATION.md
Cursor:
- Open Cursor Settings → MCP
- See CONFIGURATION.md
3. Test It
Ask your AI agent:
Send me a test email using Resend MCPKey Features
✅ Send Emails via Natural Language
Send an email to customer@example.com about their order using Resend MCP✅ HTML and Plain Text Support
Create an HTML formatted welcome email with a button and send it via Resend MCP✅ CC/BCC Recipients
Send email with CC to manager@company.com using Resend MCP✅ Scheduled Delivery
Schedule an email to be sent tomorrow at 9 AM using Resend MCP✅ Broadcast to Audiences (New)
Send a broadcast email to the 'premium_users' audience using Resend MCP✅ Audience Management (New)
List all my audiences in Resend and send targeted emails✅ Personalized Batch Sending
Read the CSV file and send personalized emails to each recipient using Resend MCP✅ Integration Workflows
Process the order and send confirmation email using Resend MCPSecurity
- API keys stored in environment variables, not in code
- Support for
.env.localand.envfiles (with.gitignore) - Separate configurations for development vs. production
- No API keys committed to version control
See SKILL.md - Best Practices for details.
Troubleshooting
Common issues and solutions are documented in SKILL.md - Troubleshooting.
Quick Checks
1. Is Node.js installed?
node --version2. Is the MCP server built?
ls mcp-send-email/build/index.js3. Is the API key valid?
- Check key starts with
re_ - Generate new key at https://resend.com/api-keys
4. Is the tool showing in your IDE?
- Reload VS Code / Restart Cursor / Close and reopen Claude Desktop
- Check configuration file syntax (valid JSON)
Documentation Structure
resend-integration-skills/
├── SKILL.md # Main skill documentation
├── README.md # This file
├── scripts/
│ └── setup-resend-mcp.sh # Automated setup script
└── references/
├── CONFIGURATION.md # Configuration for all clients
└── EXAMPLES.md # Real-world usage examplesPlatform Support
| Platform | Type | Support | Setup Location |
|---|---|---|---|
| GitHub Copilot Coding Agent | Team (Repository) | ✅ Full | GitHub Settings → Copilot |
| GitHub Copilot (VS Code) | Individual (Local) | ✅ Full | .vscode/mcp.json |
| Claude Desktop | Individual (Local) | ✅ Full | Claude config file |
| Cursor | Individual (Local) | ✅ Full | Cursor Settings → MCP |
| VS Code Standard | Individual (Local) | ⚠️ Limited | See SKILL.md |
Requirements
For GitHub Copilot Coding Agent:
- GitHub Copilot Enterprise or Pro (for Coding Agent)
- Repository administrator access
- Node.js 20+ in GitHub Actions runner
- Resend API key
For Local Development (VS Code, Cursor, Claude):
- Node.js 20 or higher (local)
- Resend account (free tier available)
- API key from https://resend.com/api-keys
- VS Code Insider (for GitHub Copilot) or Claude Desktop or Cursor
License
This skill references and integrates with:
- Resend - Email sending service
- MCP Protocol - Open protocol standard
- Resend MCP Server - Official Resend MCP implementation
Support
For issues with:
- Resend Service: https://support.resend.com
- MCP Protocol: https://modelcontextprotocol.io
- VS Code Insider: https://github.com/microsoft/vscode
- GitHub Copilot: https://github.com/github-copilot
- Cursor: https://docs.cursor.com
Quick Examples
Quick examples:
1. Simple email:
"Send a test email to john@example.com"
2. Formatted email:
"Create a professional HTML email with a table showing sales data and send it to team@example.com"
3. Using email.md (official test pattern):
Create email.md file, select all, press Cmd+L/Ctrl+L, say "send this email"
4. Batch emails:
"Read customers.csv and send personalized emails to each customer"
5. Broadcast to audience:
"Send a broadcast email to the 'premium_users' audience using Resend MCP"
6. Marketing email:
"Generate and send a newsletter to subscribers using Resend MCP"
7. Notification:
"Send an order confirmation email to the customer with order details"See EXAMPLES.md for more detailed examples.
---
Ready to start? See SKILL.md - Quick Start
Resend MCP Configuration Reference
This file contains complete configuration examples for all supported clients and environments.
GitHub Copilot Coding Agent (Repository-level)
Setup Steps
This is the official GitHub Copilot recommended approach for team collaboration.
Prerequisites:
- Repository administrator access
- GitHub Copilot Enterprise or Pro (for Coding Agent feature)
- Node.js 20+ in the GitHub Actions runner
Step 1: Navigate to Repository MCP Settings
1. Go to your GitHub repository on GitHub.com 2. Click Settings → Copilot → Coding agent 3. Scroll to "MCP configuration section"
Step 2: Add Resend MCP Configuration
In the MCP configuration section, add:
{
"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": ["send_email", "schedule_email"]
}
}
}Important differences from VS Code:
- Use
type: "local"(nottype: "command") - Reference secrets by name, not value:
"COPILOT_MCP_RESEND_API_KEY"(not the actual API key) - Include required
toolsarray specifying which tools to enable - GitHub automatically passes the secret value to the server
Step 3: Set Up Copilot Environment
1. Go to Settings → Environments 2. Click "New environment" 3. Name it copilot and click "Configure environment" 4. Under "Environment secrets", click "Add environment secret" 5. Create secret with:
- Name:
COPILOT_MCP_RESEND_API_KEY - Value: Your actual Resend API key (e.g.,
re_xxxxxxxxxxxx) - Click "Add secret"
Step 4: Save Configuration
Click "Save" in the MCP configuration section. GitHub will validate the JSON syntax.
Tools Available
Specify which Resend tools Copilot can use:
{
"tools": [
"send_email", // Send individual emails
"schedule_email", // Schedule emails for future delivery
"list_audiences", // List available audiences
"send_broadcast_email" // Send broadcast to audience segment
]
}Or enable all tools:
{
"tools": ["*"]
}Validation and Testing
After configuration:
1. Create a test issue in the repository 2. Assign it to Copilot 3. Copilot will react with 👀 emoji 4. Copilot will create a PR with proposed changes 5. In the PR timeline, wait for "Copilot started work" event 6. Click "View session" to see MCP server logs 7. Expand "Start MCP Servers" step to verify Resend tools loaded
Full Configuration Example
{
"mcpServers": {
"resend": {
"type": "local",
"command": "node",
"args": ["/home/runner/mcp-send-email/build/index.js"],
"env": {
"RESEND_API_KEY": "COPILOT_MCP_RESEND_API_KEY",
"SENDER_EMAIL_ADDRESS": "noreply@company.com"
},
"tools": ["send_email", "schedule_email", "send_broadcast_email"]
}
}
}---
GitHub Copilot in VS Code Insider (Local Development)
Minimal Configuration
Create .vscode/mcp.json in your project root:
{
"servers": {
"resend": {
"type": "command",
"command": "node /absolute/path/to/mcp-send-email/build/index.js",
"env": {
"RESEND_API_KEY": "re_xxxxxxxxxxxx"
}
}
}
}Important: Node.js 20+ must be installed and in your PATH:
node --version # Should output v20.x.x or higherFull Configuration with All Options
{
"servers": {
"resend": {
"type": "command",
"command": "node",
"args": ["/absolute/path/to/mcp-send-email/build/index.js"],
"env": {
"RESEND_API_KEY": "re_xxxxxxxxxxxx",
"SENDER_EMAIL_ADDRESS": "onboarding@example.com",
"REPLY_TO_EMAIL_ADDRESS": "reply@example.com"
}
}
}
}---
Cursor Agent Mode
Quick Setup
{
"mcpServers": {
"resend": {
"type": "command",
"command": "node /absolute/path/to/mcp-send-email/build/index.js --key=re_xxxxxxxxxxxx"
}
}
}With All Options
{
"mcpServers": {
"resend": {
"type": "command",
"command": "node /absolute/path/to/mcp-send-email/build/index.js --key=re_xxxxxxxxxxxx --sender=onboarding@example.com --reply-to=reply@example.com"
}
}
}---
Claude Desktop
macOS Configuration Location
~/Library/Application Support/Claude/claude_desktop_config.json
Windows Configuration Location
%APPDATA%\Claude\claude_desktop_config.json
Quick Setup
{
"mcpServers": {
"resend": {
"command": "node",
"args": ["/absolute/path/to/mcp-send-email/build/index.js"],
"env": {
"RESEND_API_KEY": "re_xxxxxxxxxxxx"
}
}
}
}---
Configuration Comparison
| Aspect | Coding Agent | VS Code | Cursor | Claude |
|---|---|---|---|---|
| Type | local | command | command | stdio |
| Location | GitHub Settings | .vscode/mcp.json | Cursor Settings | Config file |
| Secrets | GitHub Actions (COPILOT_MCP_*) | Environment vars | Arguments | Env vars |
| Tools | Required ✅ | N/A | N/A | N/A |
| Approval | Autonomous ⚠️ | N/A | N/A | N/A |
| Team Setup | Yes (admin) | Developer-only | Developer-only | Developer-only |
Key Differences
GitHub Copilot Coding Agent:
- Repository-level configuration (admin controls)
- Requires explicit
toolsarray - Uses GitHub Actions secrets
- Autonomous execution without approval
VS Code / Cursor / Claude:
- Local/individual developer setup
- Direct API key configuration
- Inline arguments or environment variables
- Developer discretion
---
Testing Configuration with email.md
The official Resend repository includes a test pattern using markdown files. Create an email.md in your project:
to: your-email@example.com
subject: Test Email
content: Hello from Resend MCP
This is a test email using the email.md pattern.
# Optional CC and BCC:
# cc: colleague@example.com
# bcc: manager@example.comTesting in Cursor
1. Open the email.md file 2. Select all text (Cmd+A or Ctrl+A) 3. Press Cmd+L or Ctrl+L 4. Tell Cursor: "send this as an email" or "send this email using resend" 5. Ensure Agent mode is enabled (check the dropdown in chat)
Testing in Claude Desktop
1. Copy the email.md content into a chat 2. Ask Claude: "Send this email using the resend tool" 3. Claude will parse the format and send via the MCP tool
Testing in GitHub Copilot
1. Open the email.md file 2. Reference it in chat: @email.md send this email using resend 3. Ensure you're in Agent mode
This pattern is useful because:
- Natural format: Easy to read and edit
- File-based: Can be committed to version control (with test addresses)
- Agent-friendly: LLMs understand the structured format
- Quick testing: Verify MCP setup without complex prompts
---
Environment Variables Reference
| Variable | Required | Description | Example |
|---|---|---|---|
RESEND_API_KEY | Yes | Your Resend API key | re_xxxxxxxxxxxx |
SENDER_EMAIL_ADDRESS | No | Verified sender email | onboarding@example.com |
REPLY_TO_EMAIL_ADDRESS | No | Reply-to email address | reply@example.com |
---
Troubleshooting
Coding Agent: MCP Server Not Loading
1. Verify JSON syntax: Use a JSON validator to check your configuration 2. Check tool names: Use actual tool names from the server (not made up names) 3. Verify secrets: Ensure secrets begin with COPILOT_MCP_ prefix 4. Check logs: Create test issue → Check "View session" → Look for "Start MCP Servers" step
VS Code / Cursor / Claude: MCP Server Not Found
1. Verify path: Check that absolute path to build/index.js is correct 2. Verify Node.js: Ensure Node.js 20+ is installed and in PATH 3. Test directly: Run node /path/to/build/index.js to verify it works 4. Restart IDE: Close and reopen VS Code / Cursor / Claude completely
API Key Issues
| Error | Solution |
|---|---|
Unauthorized | Generate new API key from https://resend.com/api-keys |
Invalid sender | Verify sender domain at https://resend.com/domains |
Key not found | Check environment variable name matches exactly |
---
Multi-Client Setup
To use Resend MCP with both GitHub Copilot Coding Agent and local development:
1. Build MCP server once (see Quick Start in SKILL.md) 2. Configure Coding Agent (use GitHub Settings) 3. Configure VS Code (create .vscode/mcp.json)
Both will use the same build/index.js file.
---
Advanced: HTTP Server Configuration
For shared/remote setups:
{
"servers": {
"resend": {
"type": "http",
"url": "https://mcp-resend.company.com/mcp"
}
}
}The HTTP server should proxy requests to the local Node.js MCP server.
---
References
Resend MCP Integration Examples
This file contains practical examples of using Resend via MCP with AI agents.
Testing Pattern: email.md
Before diving into complex examples, learn the official test pattern:
Create `email.md`:
to: your-email@example.com
subject: Test Email
content: This is a test
Hello! Testing Resend MCP.
# Optional sections:
# cc: colleague@example.com
# bcc: manager@example.comTo test (Cursor): 1. Open email.md 2. Select all text (Cmd+A / Ctrl+A) 3. Press Cmd+L / Ctrl+L 4. Say: "send this as an email" (in Agent mode)
This simple pattern confirms your MCP setup works before building complex workflows.
Simple Email Sending
Example 1: Basic Email
Prompt to AI Agent:
Send an email to john@example.com with subject "Hello from Resend" and body "This is a test email using Resend MCP."What the Agent Will Do: 1. Identify the resend MCP tool is available 2. Extract email details: recipient, subject, body 3. Call the Resend MCP tool with formatted parameters 4. Confirm the email was sent
Example 2: Email with HTML Content
Prompt:
Send an HTML email to customer@example.com with:
- Subject: "Welcome to Our Platform"
- Body: An HTML formatted welcome message including a button that links to https://example.com/onboardingExpected Result: The agent generates HTML, calls the Resend tool, and sends the formatted email.
Personalized Batch Emails
Example 3: CSV to Email Workflow
Prompt:
Read the file "customers.csv" which contains columns: name, email, company.
For each row, send a personalized email using Resend MCP:
- To: [email]
- Subject: "Special offer for [company]"
- Body: "Hi [name], we have an exclusive offer for [company]..."
Send all emails.Workflow: 1. Agent reads CSV file 2. Iterates through rows 3. Personalizes email content 4. Sends via Resend MCP for each row 5. Reports success/failure for each email
Transactional Emails
Example 4: Order Confirmation Email
Prompt:
I have an order object:
{
"orderId": "ORD-12345",
"customerEmail": "buyer@example.com",
"customerName": "John Doe",
"items": [
{"name": "Widget", "qty": 2, "price": 29.99}
],
"total": 59.98,
"estimatedDelivery": "2026-01-25"
}
Generate an attractive HTML order confirmation email and send it using Resend MCP with:
- Subject: "Order Confirmation: ORD-12345"
- Include all order details in a formatted table
- Add a "Track Order" buttonWhat the Agent Does: 1. Parses the order object 2. Generates professional HTML email 3. Includes formatted table of items 4. Adds call-to-action button 5. Sends via Resend MCP
Email Templates
Example 5: Using Template Variables
Prompt:
Create an email template for password reset notifications:
Subject: "Reset your password"
Body template with variables: {email}, {resetLink}, {expiryHours}
Then send it to john@example.com with:
- resetLink: https://app.example.com/reset/abc123
- expiryHours: 24
Use the Resend MCP tool.Multi-Recipient Emails
Example 6: Email with CC and BCC
Prompt:
Send an email using Resend MCP:
- To: client@example.com
- CC: manager@company.com
- BCC: audit@company.com
- Subject: "Project Completion Report"
- Body: "Project ABC has been completed on schedule..."Scheduled Emails
Example 7: Schedule Future Email
Prompt:
Schedule an email to be sent tomorrow at 9:00 AM using Resend MCP:
- To: team@company.com
- Subject: "Daily Standup Reminder"
- Body: "Don't forget about our standup meeting at 10 AM"Error Handling
Example 8: Handling Email Failures
Prompt:
Attempt to send an email to invalid@invalid to test error handling.
If the send fails, report the error and suggest valid alternatives.
Use the Resend MCP tool.Expected Behavior: 1. Agent attempts to send via Resend MCP 2. Receives error response 3. Handles error gracefully 4. Reports what went wrong 5. Suggests solutions
Advanced Workflows
Example 9: Newsletter Distribution
Prompt:
I have a newsletter template and a subscriber list in "subscribers.json" with email addresses.
For each subscriber:
1. Generate personalized content based on their preferences
2. Send using Resend MCP
3. Track which emails were successfully sent
Show me a summary of:
- Total emails sent
- Any failed deliveries
- Delivery rate percentageExample 10: Notification System
Prompt:
Create a notification email system:
When I have a message like:
{
"type": "user_signup",
"email": "newuser@example.com",
"name": "Jane Smith"
}
Use Resend MCP to send an appropriate email:
- If type is "user_signup": Send welcome email with setup instructions
- Format: Professional HTML with company branding
- Include call-to-action buttonExample 11: Broadcast to Audience Segment
Prompt:
Use Resend MCP to:
1. List all audiences in my Resend account
2. Send a broadcast email to the 'premium_customers' audience
3. Subject: "Exclusive Feature Access"
4. Content: HTML email with feature details and activation link
Generate professional email content and send the broadcast.Example 12: Audience Management Integration
Prompt:
Using Resend MCP:
1. Get all audiences from my Resend account
2. For the 'inactive_users' audience, send a re-engagement email
3. Include special 30% discount code
4. Track which audience segments this was sent toIntegration Patterns
Example 11: Form Submission to Email
Prompt:
I have a contact form submission:
{
"name": "John Doe",
"email": "john@example.com",
"subject": "Inquiry about pricing",
"message": "What are your enterprise plans?"
}
Use Resend MCP to:
1. Send a confirmation email to the submitter
2. Send the submission details to support@company.com
3. Include submission timestamp and reference IDExample 12: Report Generation and Distribution
Prompt:
Generate a monthly analytics report and distribute it:
1. Analyze data from the past 30 days
2. Create an HTML report with charts and statistics
3. Use Resend MCP to send the report to:
- CEO: ceo@company.com
- Marketing Lead: marketing@company.com
- CC: finance@company.com
Include:
- Executive summary
- Key metrics table
- Year-over-year comparison
- RecommendationsTesting Patterns
Example 13: Development vs Production
Prompt:
I'm setting up email sending in development.
For development mode:
- Use Resend MCP with test API key
- Send all emails to my test email: dev@example.com
- Log email details instead of actually sending
For production:
- Use full Resend API key
- Send to actual recipient emails
- Track delivery status
Set this up so I can toggle between modes easily.Example 14: Email Preview and Review
Prompt:
Before sending batch emails:
1. Generate the first email as a preview
2. Show me the HTML rendering and content
3. Wait for my approval
4. Only then send the full batch using Resend MCP
This helps me review before sending to real customers.Prompt Engineering Tips
Use Explicit MCP References
Instead of:
Send an email to john@example.comUse:
Use the Resend MCP tool to send an email to john@example.comThis helps the agent prioritize the correct tool.
Provide Clear Structure
Instead of vague instructions, give structured input:
Send an email with these details:
- Recipient: john@example.com
- Sender: noreply@company.com (if different)
- Subject: Welcome to our service
- Content Type: HTML
- Body: [HTML content here]Include Context
Provide business context to help AI generate better content:
Send a customer retention email. The customer:
- Name: Jane Smith
- Account age: 2 years
- Has purchased 5 times
- Last purchase: 30 days ago
- Interests: Enterprise features
Generate appropriate, personalized HTML content.Specify Quality Requirements
Send a professional email with:
- Correct spelling and grammar
- Responsive HTML design (works on mobile)
- Professional tone (B2B)
- Clear call-to-action
- Footer with unsubscribe link#!/bin/bash
# Setup Resend MCP Server for GitHub Copilot and Claude Desktop
# This script automates the setup process for Resend email integration
set -e
echo "=== Resend MCP Server Setup ==="
echo ""
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed."
echo "Please install Node.js from https://nodejs.org (LTS recommended)"
exit 1
fi
NODE_VERSION=$(node --version)
echo "✓ Node.js $NODE_VERSION found"
# Prompt for directory to clone into
read -p "Enter directory to clone Resend MCP server (default: ./mcp-send-email): " CLONE_DIR
CLONE_DIR=${CLONE_DIR:=./mcp-send-email}
# Clone repository
echo ""
echo "Cloning Resend MCP repository..."
if [ -d "$CLONE_DIR" ]; then
echo "⚠️ Directory already exists. Skipping clone."
else
git clone https://github.com/resend/mcp-send-email.git "$CLONE_DIR"
fi
cd "$CLONE_DIR"
# Install dependencies
echo ""
echo "Installing dependencies..."
npm install
# Build the project
echo ""
echo "Building MCP server..."
npm run build
# Get absolute path
ABSOLUTE_PATH=$(cd build && pwd)
echo ""
echo "✓ Build successful!"
echo ""
echo "MCP server built at: $ABSOLUTE_PATH"
# Prompt for API key
echo ""
read -sp "Enter your Resend API key (from https://resend.com/api-keys): " RESEND_API_KEY
echo ""
# Ask for sender email
echo ""
read -p "Enter sender email (optional, press Enter to skip): " SENDER_EMAIL
echo ""
# Ask for reply-to email
read -p "Enter reply-to email (optional, press Enter to skip): " REPLY_TO_EMAIL
echo ""
# Generate .env.local file
echo "Generating .env.local file..."
cat > .env.local << EOF
RESEND_API_KEY=$RESEND_API_KEY
EOF
if [ -n "$SENDER_EMAIL" ]; then
echo "SENDER_EMAIL_ADDRESS=$SENDER_EMAIL" >> .env.local
fi
if [ -n "$REPLY_TO_EMAIL" ]; then
echo "REPLY_TO_EMAIL_ADDRESS=$REPLY_TO_EMAIL" >> .env.local
fi
echo "✓ .env.local created (added to .gitignore)"
# Add to .gitignore
if ! grep -q ".env.local" .gitignore 2>/dev/null; then
echo ".env.local" >> .gitignore
fi
# Display configuration for VS Code Insider
echo ""
echo "=== GitHub Copilot Configuration (VS Code Insider) ==="
echo ""
echo "Create .vscode/mcp.json in your project:"
echo ""
cat << EOF
{
"servers": {
"resend": {
"type": "command",
"command": "node",
"args": ["$ABSOLUTE_PATH/index.js"],
"env": {
"RESEND_API_KEY": "$RESEND_API_KEY"
EOF
if [ -n "$SENDER_EMAIL" ]; then
echo " \"SENDER_EMAIL_ADDRESS\": \"$SENDER_EMAIL\","
fi
if [ -n "$REPLY_TO_EMAIL" ]; then
echo " \"REPLY_TO_EMAIL_ADDRESS\": \"$REPLY_TO_EMAIL\""
else
echo " }"
fi
cat << EOF
}
}
}
}
EOF
echo ""
echo "=== Claude Desktop Configuration ==="
echo ""
echo "Edit your Claude Desktop config:"
echo "macOS: ~/Library/Application Support/Claude/claude_desktop_config.json"
echo "Windows: %APPDATA%\\Claude\\claude_desktop_config.json"
echo ""
echo "Add this to mcpServers:"
cat << EOF
{
"mcpServers": {
"resend": {
"command": "node",
"args": ["$ABSOLUTE_PATH/index.js"],
"env": {
"RESEND_API_KEY": "$RESEND_API_KEY"
EOF
if [ -n "$SENDER_EMAIL" ]; then
echo " \"SENDER_EMAIL_ADDRESS\": \"$SENDER_EMAIL\","
fi
if [ -n "$REPLY_TO_EMAIL" ]; then
echo " \"REPLY_TO_EMAIL_ADDRESS\": \"$REPLY_TO_EMAIL\""
fi
cat << EOF
}
}
}
}
EOF
echo ""
echo "✓ Setup complete!"
echo ""
echo "Next steps:"
echo "1. Copy the configuration above to your IDE settings"
echo "2. Restart your IDE"
echo "3. Test by asking: 'Send me an email using Resend MCP'"
echo ""
Related skills
How it compares
Pick resend-integration-skills for Resend plus Next.js; use provider-specific skills for SendGrid or Postmark integrations.
FAQ
What email flows does resend-integration-skills cover?
resend-integration-skills covers Resend transactional email in Next.js apps including signup verification, payment receipts, system notifications, and agent-triggered outbound messages wired through server routes.
Which framework does resend-integration-skills target?
resend-integration-skills targets Next.js applications, specifically patterns from the gocallum/nextjs16-agent-skills collection. The skill integrates the Resend SDK into Next.js server-side email flows.