Gemini Data Analysis & Research
Leverages Google's Gemini AI for data analysis, research paper generation, and automated email delivery.
Gemini Data Analysis & Research MCP Server
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.
š Features
1. Advanced Data Analysis & Reporting (analyze-data)
- Comprehensive analysis of Excel (.xlsx, .xls) and CSV files
- Features:
- Automatic data type detection and parsing
- Statistical analysis of numeric columns
- Interactive visualizations using Chart.js
- AI-powered insights using Gemini Flash 2
- Detailed HTML reports with interactive plots
- Direct email delivery of analysis results
- Basic and detailed analysis modes
- Customizable output directory
- Support for large datasets
- Automatic outlier detection
- Correlation analysis for numeric columns
2. Research & Email Delivery System (send-email)
- Professional research paper generation and distribution
- Features:
- AI-powered research paper generation
- Automated email delivery of analysis results
- Support for multiple content types:
- Research papers
- Technical reports
- Data analysis summaries
- Business intelligence reports
- Professional email subject line generation
- Support for both HTML and plain text content
- Image attachments with inline display capability
- Secure SMTP authentication
- Comprehensive error handling and status reporting
- Professional email formatting
- Message delivery tracking
- Customizable email templates
3. Research & Analysis Generator (generate-thinking)
- Advanced research and analysis generation
- Features:
- Research paper generation
- Technical documentation writing
- Data analysis summaries
- Business intelligence reports
- Timestamped response saving
- Customizable output directory
- Direct email delivery of generated content
- Professional 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:
git clone [your-repo-url]
cd gemini-data-analysis-email-generator
npm install
- Create
.envfile:
GEMINI_API_KEY=your_api_key_here
NODEMAILER_EMAIL=your.email@gmail.com
NODEMAILER_PASSWORD=your_app_password_here
- Build the project:
npm run build
Claude Desktop Configuration
- Create/Edit
%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"
}
}
}
}
- Restart Claude Desktop
š Using the Tools
Data Analysis with EDA and AI
{
"name": "analyze-data",
"arguments": {
"fileData": "base64_encoded_file_content",
"fileName": "data.xlsx",
"analysisType": "detailed",
"outputDir": "./analysis_results"
}
}
Email Sending with AI Subject Generation
{
"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..."
}
]
}
}
Thinking Generation
{
"name": "generate-thinking",
"arguments": {
"prompt": "Analyze the market trends for Q1 2024",
"outputDir": "./thinking_output"
}
}
š Output Structure
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
š ļø 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
.envfile - For 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 exists - Check API key validity
- Ensure proper environment loading
- Verify
-
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
-
Data Analysis Issues
- Ensure file format is supported (.xlsx, .xls, .csv)
- Check file encoding (UTF-8 recommended)
- Verify file size is within limits
- Ensure numeric columns are properly formatted
Debug Mode
Add DEBUG=true to your .env file for verbose logging:
GEMINI_API_KEY=your_key_here
DEBUG=true
š API Reference
Data Analysis Tool
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
}
Email Sending Tool
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
}[];
}
Thinking Generation Tool
interface GenerateThinkingParams {
prompt: string; // Analysis prompt
outputDir?: string; // Optional output directory
}
šØāš» Author
Falah G. Salieh
š Baghdad, Iraq
š
2025
š¤ 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
Related Servers
Affinity Designer
Automate Affinity Designer tasks like document manipulation, layer management, and exports using AI.
Anki MCP Server
Connects to Anki via AnkiConnect to retrieve leech-tagged flashcards for use in Claude Desktop.
WayStation
A universal remote MCP server that connects to popular productivity tools such as Notion, Monday, AirTable, and many more.
Gmail MCP Server
An MCP server for interacting with Gmail and Google Calendar, enabling context-aware email and event management.
2slides
This is the 1st, easiest, and cheapest PPT, slides, presentation AI generation MCP Server in the world.
ClickUp
An MCP server for ClickUp, allowing AI assistants to interact with and manage tasks within your ClickUp workspaces.
AutoCAD MCP Server
Integrates AutoCAD with large language models (LLMs) for natural language interaction. Requires AutoCAD 2018+ on Windows.
Todoist
Manage your Todoist tasks and projects using the Todoist Python API.
Simple Voice MCP Server
A simple text-to-speech server that plays audio from text, supporting multiple voice models.
OneNote by CData
A read-only MCP server for querying live data from Microsoft OneNote using the CData JDBC Driver.