Get the FREE Ultimate OpenClaw Setup Guide →

sendgrid

Sendrid API Integration For LLM

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio recepyavuz0-sendgrid-mcp-server npx -y sendgrid-api-mcp-server \
  --env FROM_EMAIL="your_email@domain.com" \
  --env SENDGRID_API_KEY="your_api_key"

How to use

This MCP server integrates with SendGrid to let AI assistants send emails, manage templates, and view statistics directly through the MCP protocol. It exposes a set of tools including sending single emails, sending templated emails, batch sending, listing and creating templates, and retrieving delivery statistics and reports. The server runs over standard MCP stdin/stdout, so you can connect it to clients like Cursor IDE, Claude Desktop, or other MCP-enabled tools to issue commands and receive responses in natural language or structured prompts. Typical workflows include sending an immediate email, delivering a template-based message with dynamic data, scheduling future emails, and inspecting available templates or performance metrics.

Core tools available:

  • sendEmail: send a plain text or HTML email to a single recipient.
  • sendEmailWithTemplate: send dynamic emails using a SendGrid template and data to a recipient.
  • sendBatchEmails: send the same or personalized content to multiple recipients in one call.
  • listTemplates: list existing SendGrid templates to choose from or reference by ID.
  • getStats: fetch email statistics for a date range with grouping options (day/week/month).
  • scheduleEmail: schedule an email to be sent at a future timestamp.
  • createTemplate: create a new dynamic email template with placeholders for variables. Connect these functions to your AI prompts to automate outreach, notifications, or reporting via the MCP protocol.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to a SendGrid account to generate an API key

Installation steps:

# 1) Clone the repository
git clone https://github.com/recepyavuz0/sendgrid-mcp-server.git
cd sendgrid-mcp-server

# 2) Install dependencies
npm install

# 3) Configure environment variables
# Create a .env file in the project root with:
# SENDGRID_API_KEY=your_sendgrid_api_key_here
# FROM_EMAIL=your_verified_sender_email@domain.com
  1. Build and run (if applicable):
npm run build
npm start

Additional notes

Environment and configuration tips:

  • Ensure SENDGRID_API_KEY has the correct permissions to send mail and access templates.
  • FROM_EMAIL must be a verified sender in your SendGrid account.
  • If you update environment variables, restart the MCP server so changes take effect.
  • When using template-based sending, you will provide templateId and dynamicData for variable substitution.
  • For scheduled emails, unix timestamp seconds are expected for send_at.
  • If you encounter authentication errors, double-check API key scopes and that the key is not restricted by IP unless you’ve set appropriate allowances.

Related MCP Servers

Sponsor this space

Reach thousands of developers