falahgs Gemini Data Analysis Research MCP Server

falahgs Gemini Data Analysis Research MCP Server avatar

by falahgs

What is falahgs Gemini Data Analysis Research MCP Server

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

  1. Clone and setup:
git clone [your-repo-url]
cd gemini-data-analysis-email-generator
npm install
  1. Create .env file:
GEMINI_API_KEY=your_api_key_here
[email protected]
NODEMAILER_PASSWORD=your_app_password_here
  1. Build the project:
npm run build

Claude Desktop Configuration

  1. 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": "[email protected]",
        "NODEMAILER_PASSWORD": "your_app_password_here"
      }
    }
  }
}
  1. 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": "[email protected]",
    "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 JavaScript
  • npm run start: Start the MCP server
  • npm run dev: Run in development mode with ts-node

Environment Variables

  • GEMINI_API_KEY: Your Google Gemini API key
  • NODEMAILER_EMAIL: Your email address for sending emails
  • NODEMAILER_PASSWORD: Your email app password (for Gmail, use an app password)

๐Ÿ”’ Security Notes

  • Store your API keys securely
  • Don't share your .env file
  • 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

  1. API Key Error

    • Verify .env file exists
    • Check API key validity
    • Ensure proper environment loading
  2. Claude Desktop Connection

    • Verify config.json syntax
    • Check file paths in config
    • Restart Claude Desktop
  3. 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
  4. 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

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

๐Ÿ“„ License

MIT License - See LICENSE file for details

Leave a Comment

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.

Related MCP Servers

Brave Search MCP avatar

Brave Search MCP

Integrate Brave Search capabilities into Claude through MCP. Enables real-time web searches with privacy-focused results and comprehensive web coverage.

searchapiofficial
chrisdoc hevy mcp avatar

chrisdoc hevy mcp

mcp
sylphlab pdf reader mcp avatar

sylphlab pdf reader mcp

An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.

pdf-parsetypescriptnodejs
aashari mcp server atlassian bitbucket avatar

aashari mcp server atlassian bitbucket

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

atlassianrepositorymcp
aashari mcp server atlassian confluence avatar

aashari mcp server atlassian confluence

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.

atlassianmcpconfluence
prisma prisma avatar

prisma prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

cockroachdbgomcp
Zzzccs123 mcp sentry avatar

Zzzccs123 mcp sentry

mcp sentry for typescript sdk

mcptypescript
zhuzhoulin dify mcp server avatar

zhuzhoulin dify mcp server

mcp
zhongmingyuan mcp my mac avatar

zhongmingyuan mcp my mac

mcp
zhixiaoqiang desktop image manager mcp avatar

zhixiaoqiang desktop image manager mcp

MCP ๆœๅŠกๅ™จ๏ผŒ็”จไบŽ็ฎก็†ๆกŒ้ขๅ›พ็‰‡ใ€ๆŸฅ็œ‹่ฏฆๆƒ…ใ€ๅŽ‹็ผฉใ€็งปๅŠจ็ญ‰๏ผˆๅฎŒๅ…จ่ฎฉTraeๅฎž็Žฐ๏ผ‰

mcp

Submit Your MCP Server

Share your MCP server with the community

Submit Now