Gemini Email Subject Generator MCP
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
Related MCP server: Gmail AutoAuth MCP Server
π 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:
git clone [your-repo-url]
cd gemini-email-subject-generator
npm installCreate
.envfile:
GEMINI_API_KEY=your_api_key_here
NODEMAILER_EMAIL=your.email@gmail.com
NODEMAILER_PASSWORD=your_app_password_hereBuild the project:
npm run buildClaude Desktop Configuration
Create/Edit
%AppData%/Claude/claude_desktop_config.json:
{
"mcpServers": {
"Gemini Email Generator": {
"command": "node",
"args": ["path/to/gemini-email-subject-generator/dist/index.js"],
"cwd": "path/to/gemini-email-subject-generator",
"env": {
"GEMINI_API_KEY": "your_api_key_here",
"NODEMAILER_EMAIL": "your.email@gmail.com",
"NODEMAILER_PASSWORD": "your_app_password_here"
}
}
}
}Restart Claude Desktop
π Using the Tools
Email Sending with AI Subject Generation
{
"name": "send-email",
"arguments": {
"to": "recipient@example.com",
"subjectPrompt": "Create a catchy subject line for a marketing email about our new AI-powered analytics platform",
"text": "Hello! This is the plain text version of our email.",
"html": "<h1>Hello!</h1><p>This is the <b>HTML</b> version of our email with an inline image: <img src='cid:image0'/></p>",
"images": [
{
"name": "chart.png",
"data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
]
}
}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
{
"name": "generate-thinking",
"arguments": {
"prompt": "Your complex analysis prompt here",
"outputDir": "./custom_output"
}
}π Output Structure
output/
βββ thinking/
βββ gemini_thinking_[timestamp].txtπ οΈ 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:
GEMINI_API_KEY=your_key_here
DEBUG=trueπ API Reference
Email Sending Tool
interface SendEmailParams {
to: string; // Recipient email address
subjectPrompt: string; // Prompt for generating email subject
text: string; // Plain text version of email
html?: string; // HTML version of email (optional)
images?: { // Optional images to attach
name: string; // Image filename
data: string; // Base64 encoded image data
}[];
}Thinking Generation Tool
interface GenerateThinkingParams {
prompt: string; // Analysis prompt
outputDir?: string; // Optional output directory
}π€ 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
Available Tools
2 toolsgenerate-thinkingC
Generate detailed thinking process text using Gemini Flash 2 model
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Prompt for generating thinking process text | |
| outputDir | No | Directory to save output responses (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the specific model being used but doesn't describe important behavioral aspects like rate limits, authentication requirements, response format, error conditions, or whether this is a read-only or mutating operation. The description is minimal and lacks crucial operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise - a single sentence that gets straight to the point without unnecessary words. However, this brevity comes at the cost of completeness. While structurally efficient, it may be too minimal for a tool that likely has important behavioral characteristics that should be disclosed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a text generation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, how the 'thinking process' output is structured, what limitations exist, or what happens when outputDir is specified. The agent would need to guess about important operational aspects of this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents both parameters. The description adds no additional parameter information beyond what's in the schema - it doesn't explain what constitutes appropriate 'thinking process' prompts, provide examples, or clarify the output directory usage. Baseline 3 is appropriate when schema does all the parameter documentation work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('generate') and resource ('detailed thinking process text') with specific model information ('using Gemini Flash 2 model'). It distinguishes from the sibling 'send-email' tool by focusing on text generation rather than communication. However, it doesn't fully differentiate what makes this 'thinking process' generation unique versus other text generation tools that might exist.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of appropriate use cases, prerequisites, or comparisons to other text generation methods. The sibling tool 'send-email' is completely unrelated, so no comparative guidance is offered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send-emailC
Send an email with AI-generated subject using Gemini Flash 2
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Recipient email address | |
| subjectPrompt | Yes | Prompt for Gemini to generate email subject | |
| text | Yes | Plain text version of the email | |
| html | No | HTML version of the email (optional) | |
| images | No | Images to attach to the email (optional) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions AI subject generation but lacks critical details: whether this is a read-only or mutating operation (implied mutation from 'send'), authentication requirements, rate limits, error handling, or what happens upon success/failure. This is inadequate for a tool that likely performs external communication.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero wasted words. It front-loads the core purpose and key feature without unnecessary elaboration, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It lacks behavioral context (e.g., side effects, permissions), doesn't explain the relationship with the sibling tool, and provides minimal guidance on usage. The AI subject generation is noted but not elaborated, leaving gaps in understanding the tool's full scope.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters. The description adds minimal value beyond the schemaβit implies 'subjectPrompt' is used for AI generation but doesn't explain how this interacts with other parameters or provide usage examples. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Send an email') and specifies a key feature ('with AI-generated subject using Gemini Flash 2'), which distinguishes it from generic email tools. However, it doesn't explicitly differentiate from the sibling tool 'generate-thinking', which might be related but has an unclear relationship.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or constraints. It mentions AI-generated subjects but doesn't specify scenarios where this is beneficial or when manual subjects might be preferred. No exclusions or sibling tool comparisons are included.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.0- First observed
generate-thinking - First observed
send-email
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: one generates thinking process text, while the other sends emails with AI-generated subjects. There is no overlap or ambiguity between these functions, making it impossible for an agent to confuse them.
Both tools use a verb-object naming pattern (generate-thinking, send-email), which is consistent and readable. The minor deviation is the hyphenation style, but this is uniform across both tools, so it does not cause confusion.
With only 2 tools, the server feels thin for its stated purpose of email subject generation. It lacks essential operations like retrieving email history, managing templates, or handling errors, which limits its utility and scope.
The server is severely incomplete for email subject generation. It provides no way to list, update, or delete generated content, and lacks supporting tools for email management (e.g., checking sent emails, setting recipients). This creates significant gaps that will hinder agent workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that provides email capabilities, hosted on Alpic platform
An MCP server that provides email capabilities, hosted on Alpic platform
An MCP server that provides email capabilities, hosted on Alpic platform
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides AI applications with a toolset for an Artificial Virtual Assistant (AVA) integrated with the Gmail API. It enables users to automate email management and personal tasks through secure Google OAuth authentication.1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server enabling AI assistants to manage Gmail through natural language, including sending, reading, searching, labeling, and handling attachments with auto authentication.1MIT
- AlicenseNot gradedqualityDmaintenanceA high-performance MCP server that enables AI assistants to interact with Gmail securely via OAuth 2.0, supporting smart email retrieval and thread-aware drafting.1MIT
- AlicenseAqualityDmaintenanceAn MCP server providing comprehensive email capabilities via IMAP and SMTP, enabling AI assistants to read, search, send, manage, schedule, and analyze emails across multiple accounts.49906107LGPL 3.0