Skip to main content
Glama
bugzy-ai

Resend MCP Server

by bugzy-ai

resend_send_email

Send emails to recipients with HTML or plain text content, CC/BCC support, reply-to addresses, and custom tracking tags for monitoring.

Instructions

Send a single email to one or more recipients. Supports HTML and plain text content, CC/BCC, reply-to, and custom tags for tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesRecipient email address(es). Max 50 addresses.
subjectYesEmail subject line
htmlNoHTML version of the email body
textNoPlain text version. Auto-generated from HTML if omitted.
ccNoCC recipient(s)
bccNoBCC recipient(s)
reply_toNoReply-to email address(es)
tagsNoCustom metadata tags for tracking (max 50)

Implementation Reference

  • Handler for 'resend_send_email' tool: parses arguments with SendEmailRequestSchema, builds Resend email options, sends email, returns success with ID.
    case 'resend_send_email': {
      const args = SendEmailRequestSchema.parse(request.params.arguments);
    
      // Build email options - Resend requires html or text
      const emailOptions: Parameters<typeof resend.emails.send>[0] = {
        from: fromEmail,
        to: args.to,
        subject: args.subject,
        ...(args.html ? { html: args.html } : { text: args.text! }),
        ...(args.cc && { cc: args.cc }),
        ...(args.bcc && { bcc: args.bcc }),
        ...(args.reply_to && { replyTo: args.reply_to }),
        ...(args.tags && { tags: args.tags }),
      };
    
      const { data, error } = await resend.emails.send(emailOptions);
    
      if (error) {
        throw new Error(`Failed to send email: ${error.message}`);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              id: data?.id,
              message: 'Email sent successfully',
            }),
          },
        ],
      };
    }
  • Input schema (Zod) for the resend_send_email tool defining parameters like to, subject, html/text, cc, bcc, etc.
    export const SendEmailRequestSchema = z
      .object({
        to: z
          .union([z.string().email(), z.array(z.string().email()).max(50)])
          .describe('Recipient email address(es). Max 50 addresses.'),
        subject: z.string().describe('Email subject line'),
        html: z.string().optional().describe('HTML version of the email body'),
        text: z
          .string()
          .optional()
          .describe('Plain text version. Auto-generated from HTML if omitted.'),
        cc: z
          .union([z.string().email(), z.array(z.string().email())])
          .optional()
          .describe('CC recipient(s)'),
        bcc: z
          .union([z.string().email(), z.array(z.string().email())])
          .optional()
          .describe('BCC recipient(s)'),
        reply_to: z
          .union([z.string().email(), z.array(z.string().email())])
          .optional()
          .describe('Reply-to email address(es)'),
        tags: z
          .array(TagSchema)
          .max(50)
          .optional()
          .describe('Custom metadata tags for tracking (max 50)'),
      })
      .refine((data) => data.html || data.text, {
        message: 'Either html or text must be provided',
        path: ['html', 'text'],
      });
  • src/index.ts:52-56 (registration)
    Tool registration in the MCP server: defines name, description, and inputSchema for listTools.
    {
      name: 'resend_send_email',
      description:
        'Send a single email to one or more recipients. Supports HTML and plain text content, CC/BCC, reply-to, and custom tags for tracking.',
      inputSchema: zodToJsonSchema(SendEmailRequestSchema),
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bugzy-ai/resend-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server