SendGrid MCP Server
Allows sending emails, managing contacts, and interacting with SendGrid's email platform.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SendGrid MCP Serversend a welcome email to newuser@example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SendGrid MCP Server
A production-ready Model Context Protocol (MCP) Server for SendGrid email services, built with FastMCP 2.0. This server enables AI models like Claude, GPT, and others to send emails, manage contacts, and interact with SendGrid's powerful email platform.
🚀 Features
📧 Email Management: Send HTML/text emails with templates and attachments
👥 Contact Management: Add contacts and manage mailing lists
🔐 Secure Authentication: Bearer token authentication with fallback support
⚡ Rate Limiting: Built-in API rate limiting to prevent abuse
🛡️ Production Ready: Comprehensive error handling and logging
🔧 Easy Configuration: Environment-based configuration management
Related MCP server: MCP Email Server with SendGrid
📋 Requirements
Python 3.8+
SendGrid API Key
FastMCP 2.0
🛠️ Installation
Clone the repository:
git clone https://github.com/FINCH285/SendGrid-MCP-Server.git cd SendGrid-MCP-ServerInstall dependencies:
pip install -r requirements.txtSet up environment variables:
cp .env.example .envEdit
.envwith your SendGrid configuration:SENDGRID_API_KEY=your_sendgrid_api_key_here DEFAULT_FROM_EMAIL=your-verified-email@example.com DEFAULT_FROM_NAME=Your Name DEFAULT_TEMPLATE_ID=your-template-id RATE_LIMIT=10 DEBUG=false
🚀 Usage
Running the Server
python main.pyThe server will start and listen for MCP connections via STDIO.
Available Tools
Email Tools
send_email- Send HTML/text emails to multiple recipientsget_template_info- Fetch SendGrid template detailssend_template_email- Send emails using dynamic templates
Contact Tools
add_contact- Add/update contacts with custom fieldsget_contact_lists- Retrieve all contact lists
🔧 Configuration
Authentication
The server supports two authentication methods:
Environment Variable: Set
SENDGRID_API_KEYin your.envfileBearer Token: Pass API key via Authorization header in MCP requests
📚 SendGrid Configuration example
{
"mcpServers": {
"sendgrid-mcp": {
"command": "python",
"args": ["/path/to/your/project/main.py"],
"cwd": "/path/to/your/project",
"disabled": false,
"env": {
"SENDGRID_API_KEY": "SG.your-actual-api-key-here"
}
}
}
}For Windows users, use paths like:
"args": ["C:\\Users\\YourUsername\\project-folder\\main.py"]
"cwd": "C:\\Users\\YourUsername\\project-folder"For macOS/Linux users, use paths like:
"args": ["/Users/yourusername/project-folder/main.py"]
"cwd": "/Users/yourusername/project-folder"Key configuration elements:
"sendgrid-mcp": The server name/identifier (customizable)
args: Specifies the path to your main.py file
cwd: Sets the working directory to your project folder
disabled: Set to false to enable the server
env: Contains your SendGrid API key (replace with your actual key starting with "SG.")
🏗️ Architecture
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ AI Model │◄──►│ FastMCP │◄──►│ SendGrid │
│ (Claude/GPT) │ │ Server │ │ API │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
│ MCP Protocol │ HTTP/REST │
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Tools Layer │ │ Auth Layer │ │ Config Layer │
│ • email_tools │ │ • Bearer Token │ │ • Environment │
│ • contact_tools │ │ • API Key Auth │ │ • Rate Limits │
└─────────────────┘ └─────────────────┘ └─────────────────┘🤝 Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
Issues: GitHub Issues
SendGrid Documentation: SendGrid API Docs
FastMCP Documentation: FastMCP Docs
🙏 Acknowledgments
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/FINCH285/SendGrid-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server