Supports sending emails through Gmail via SMTP, including capabilities for HTML formatting, plain text, and image attachments.
Uses the Gemini Flash 2 AI model to generate intelligent email subjects and detailed reasoning or brainstorming content.
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., "@Gemini Email Subject Generator MCPemail alex@work.com with a creative subject about the new branding guide"
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.
Gemini Email Subject Generator MCP
A powerful Model Context Protocol (MCP) server that leverages Google's Gemini Flash 2 AI model to generate engaging email subjects and detailed thinking processes. This tool integrates seamlessly with Claude Desktop to provide intelligent email subject generation and advanced content creation.
π Features
1. Email Tool with AI Subject Generation (send-email)
Sends emails with AI-generated subjects using Gemini Flash 2
Features:
Dynamic subject generation based on provided prompt
Support for HTML and plain text email content
Image attachments with inline display capability
Secure authentication using environment variables
Error handling and status reporting
Fully customizable content with rich formatting options
Instant delivery with message tracking
2. Thinking Generation Tool (generate-thinking)
Generates detailed thinking process text using Gemini's Flash 2 model
Supports complex reasoning and analysis
Saves responses with timestamps
Customizable output directory
Ideal for brainstorming, planning, and content creation
π Quick Start
Prerequisites
Node.js (v16 or higher)
TypeScript
Claude Desktop
Google Gemini API Key
SMTP Email Account (for email functionality)
Installation
Clone and setup:
Create
.envfile:
Build the project:
Claude Desktop Configuration
Create/Edit
%AppData%/Claude/claude_desktop_config.json:
Restart Claude Desktop
π Using the Tools
Email Sending with AI Subject Generation
Important Note About Email Tool: When you use the
send-emailtool, Claude will display a confirmation message that the email was sent successfully. This confirmation message is NOT the content of the email - it's just feedback to you that the operation succeeded. The actual email sent to the recipient will contain only the content you specified in thetextandhtmlfields, with the subject generated by Gemini based on your prompt.
Thinking Generation
π Output Structure
π οΈ Development
Available Scripts
npm run build: Compile TypeScript to JavaScriptnpm run start: Start the MCP servernpm run dev: Run in development mode with ts-node
Environment Variables
GEMINI_API_KEY: Your Google Gemini API keyNODEMAILER_EMAIL: Your email address for sending emailsNODEMAILER_PASSWORD: Your email app password (for Gmail, use an app password)
π Security Notes
Store your API keys securely
Don't share your
.envfileFor Gmail, use app passwords instead of your main account password
Be careful with the content of emails sent through the system
Never include sensitive or personal information in email examples
π Troubleshooting
Common Issues
API Key Error
Verify
.envfile existsCheck API key validity
Ensure proper environment loading
Claude Desktop Connection
Verify config.json syntax
Check file paths in config
Restart Claude Desktop
Email Sending Issues
Check that NODEMAILER_EMAIL and NODEMAILER_PASSWORD are set correctly
For Gmail, ensure you've created an app password
Verify that less secure app access is enabled for non-Gmail providers
Check recipient email address format
Ensure image data is properly formatted as data URI (data:image/type;base64,)
Debug Mode
Add DEBUG=true to your .env file for verbose logging:
π API Reference
Email Sending Tool
Thinking Generation Tool
π€ Contributing
Fork the repository
Create your feature branch
Commit your changes
Push to the branch
Create a Pull Request
π License
MIT License - See LICENSE file for details