A powerful Model Context Protocol (MCP) server that leverages Google's Gemini Flash 2 AI model for comprehensive data analysis, research paper generation, and automated email delivery. This server provides an integrated solution for analyzing datasets, generating research content, and distributing results directly to stakeholders via email.
analyze-data
)send-email
)generate-thinking
)git clone [your-repo-url]
cd gemini-data-analysis-email-generator
npm install
.env
file:GEMINI_API_KEY=your_api_key_here
NODEMAILER_EMAIL=your.email@gmail.com
NODEMAILER_PASSWORD=your_app_password_here
npm run build
%AppData%/Claude/claude_desktop_config.json
:{
"mcpServers": {
"Gemini Data Analysis": {
"command": "node",
"args": ["path/to/gemini-data-analysis-email-generator/dist/index.js"],
"cwd": "path/to/gemini-data-analysis-email-generator",
"env": {
"GEMINI_API_KEY": "your_api_key_here",
"NODEMAILER_EMAIL": "your.email@gmail.com",
"NODEMAILER_PASSWORD": "your_app_password_here"
}
}
}
}
{
"name": "analyze-data",
"arguments": {
"fileData": "base64_encoded_file_content",
"fileName": "data.xlsx",
"analysisType": "detailed",
"outputDir": "./analysis_results"
}
}
{
"name": "send-email",
"arguments": {
"to": "recipient@example.com",
"subjectPrompt": "Create a professional subject line for a business report",
"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.</p>",
"images": [
{
"name": "chart.png",
"data": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."
}
]
}
}
{
"name": "generate-thinking",
"arguments": {
"prompt": "Analyze the market trends for Q1 2024",
"outputDir": "./thinking_output"
}
}
output/
├── analysis/
│ ├── plots/
│ │ ├── column1_histogram_[timestamp].html
│ │ └── column2_histogram_[timestamp].html
│ ├── analysis_[timestamp].txt
│ └── report_[timestamp].html
├── thinking/
│ └── gemini_thinking_[timestamp].txt
└── emails/
└── email_log_[timestamp].txt
npm run build
: Compile TypeScript to JavaScriptnpm run start
: Start the MCP servernpm run dev
: Run in development mode with ts-nodeGEMINI_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).env
fileAPI Key Error
.env
file existsClaude Desktop Connection
Email Sending Issues
Data Analysis Issues
Add DEBUG=true
to your .env
file for verbose logging:
GEMINI_API_KEY=your_key_here
DEBUG=true
interface AnalyzeDataParams {
fileData: string; // Base64 encoded file content
fileName: string; // File name (must be .xlsx, .xls, or .csv)
analysisType: 'basic' | 'detailed'; // Analysis type
outputDir?: string; // Optional output directory
}
interface SendEmailParams {
to: string; // Recipient email address
subjectPrompt: string; // Prompt for Gemini to generate 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
}[];
}
interface GenerateThinkingParams {
prompt: string; // Analysis prompt
outputDir?: string; // Optional output directory
}
Falah G. Salieh
📍 Baghdad, Iraq
📅 2025
MIT License - See LICENSE file for details
Seamless access to top MCP servers powering the future of AI integration.