resend-integration-skills

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.

By gocallum · 384 installs

npx skills add gocallum/nextjs16-agent-skills --skill resend-integration-skills

Source repository · Upstream listing

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 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: 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: 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: For Claude Desktop: 1. Open Claude Desktop settings 2. Go to Developer tab → Edit Config 3. Add configuration: 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: 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 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: Example 2: HTML Email with Custom Configuration Example 3: Email with CC/BCC Example 4: Scheduled Email Example 5: Integration with Data Processing Advanced Features Broadcast Emails Send emails to audience segments in your Resend account: Audience Management Query and work with audiences: Best 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: 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 : 2. 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 : 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 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 20 or use package manager Verify: node version should show v20.x.x or 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 Common 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 modules and 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