advanced-gemini-mcp

arrtikorea/advanced-gemini-mcp

3.2

If you are the rightful owner of advanced-gemini-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Advanced Gemini MCP Server v4.0 is a comprehensive Model Context Protocol (MCP) server implementation designed for seamless integration with Google's Gemini AI, developed in South Korea to support the global developer community.

Tools
  1. gemini_generate

    Generates text based on a given prompt with customizable parameters.

  2. gemini_multimodal

    Processes and analyzes images, videos, and audio files.

  3. gemini_code_execution

    Executes Python code safely with AI assistance.

README.md

๐Ÿ‡ฐ๐Ÿ‡ท Advanced Gemini MCP Server v4.0 - Korean Open Source Edition

License: MIT Python 3.8+ MCP Compatible Made in Korea

"We hope this helps the global developer community!"
"์ „ ์„ธ๊ณ„ ๊ฐœ๋ฐœ์ž ์ปค๋ฎค๋‹ˆํ‹ฐ์— ๋„์›€์ด ๋˜๊ธธ ๋ฐ”๋ž๋‹ˆ๋‹ค!"


๐Ÿ“‹ Table of Contents | ๋ชฉ์ฐจ


English

Overview

The Advanced Gemini MCP Server v4.0 is a comprehensive Model Context Protocol (MCP) server implementation that provides seamless integration with Google's Gemini AI. This open-source project was developed with โค๏ธ in South Korea to contribute to the global developer community.

๐Ÿ‘จโ€๐Ÿ’ป Authors

  • ์‚ฝ์งˆ์‹ผํƒ€ (Sapjil Santa) - Lead Developer
  • ์ดํ•˜๋Šฌ (Lee Haneui) - AI Assistant & Co-Developer
  • Contact:

Features

๐Ÿš€ 10 Advanced AI Capabilities

  1. Text Generation - Basic text generation with customizable parameters
  2. Multimodal Processing - Support for images, videos, and audio files
  3. Token Counting - Accurate token counting for cost estimation
  4. Streaming Response - Real-time streaming for long responses
  5. Structured JSON Output - Schema-enforced JSON generation
  6. System Instructions - Custom AI behavior with system prompts
  7. Function Calling - Dynamic function execution capabilities
  8. Code Execution - Safe Python code execution with AI
  9. File Upload & Analysis - Upload and analyze various file formats
  10. Grounded Search - Real-time web search integration

๐Ÿ”ง Technical Features

  • Production Ready: Comprehensive error handling and logging
  • Security First: Environment variable API key management
  • Korean + English: Bilingual documentation and error messages
  • MCP Compatible: Full compliance with Model Context Protocol
  • Async Support: Modern asyncio-based architecture
  • Type Safety: Full type hints for better development experience

Installation

Prerequisites

  • Python 3.8 or higher
  • Google Gemini API key
  • pip package manager

Quick Install

# Clone the repository
git clone https://github.com/SapjilSanta/advanced-gemini-mcp.git
cd advanced-gemini-mcp

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
export GEMINI_API_KEY="your-gemini-api-key-here"

Package Dependencies

google-genai>=0.7.0
mcp>=1.0.0
asyncio
aiofiles
typing-extensions

Usage

Basic Setup

  1. Set your API key:

    export GEMINI_API_KEY="your-api-key"
    
  2. Run the server:

    python advanced_gemini_mcp.py
    
  3. Connect your MCP client and start using the 10 available tools!

MCP Client Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "advanced-gemini": {
      "command": "python",
      "args": ["/path/to/advanced_gemini_mcp.py"],
      "env": {
        "GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

Configuration

Environment Variables

VariableRequiredDescription
GEMINI_API_KEYYesYour Google Gemini API key

Customization

The server supports various configuration options through tool parameters:

  • Temperature: Control creativity (0.0-1.0)
  • Max Tokens: Limit response length
  • Model Selection: Choose specific Gemini models
  • File Types: Support for multiple media formats

Examples

Text Generation

# Tool: gemini_generate
{
  "prompt": "Explain quantum computing in simple terms",
  "temperature": 0.7,
  "max_tokens": 1000
}

Image Analysis

# Tool: gemini_multimodal
{
  "prompt": "Describe what you see in this image",
  "image_path": "/path/to/image.jpg"
}

Code Execution

# Tool: gemini_code_execution
{
  "prompt": "Calculate the fibonacci sequence up to 10 numbers and plot it"
}

API Reference

For detailed API documentation, see .

Contributing

We welcome contributions from developers worldwide! ๐ŸŒ

Development Setup

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

Coding Standards

  • Follow PEP 8 style guidelines
  • Add type hints to all functions
  • Include docstrings for public APIs
  • Write comprehensive error handling

License

This project is licensed under the MIT License - see the file for details.


ํ•œ๊ตญ์–ด

๊ฐœ์š”

๊ณ ๊ธ‰ ์ œ๋ฏธ๋‚˜์ด MCP ์„œ๋ฒ„ v4.0์€ ๊ตฌ๊ธ€์˜ ์ œ๋ฏธ๋‚˜์ด AI์™€ ์›ํ™œํ•œ ํ†ตํ•ฉ์„ ์ œ๊ณตํ•˜๋Š” ํฌ๊ด„์ ์ธ ๋ชจ๋ธ ์ปจํ…์ŠคํŠธ ํ”„๋กœํ† ์ฝœ(MCP) ์„œ๋ฒ„ ๊ตฌํ˜„์ž…๋‹ˆ๋‹ค. ์ด ์˜คํ”ˆ์†Œ์Šค ํ”„๋กœ์ ํŠธ๋Š” ์ „ ์„ธ๊ณ„ ๊ฐœ๋ฐœ์ž ์ปค๋ฎค๋‹ˆํ‹ฐ์— ๊ธฐ์—ฌํ•˜๊ธฐ ์œ„ํ•ด ๋Œ€ํ•œ๋ฏผ๊ตญ์—์„œ โค๏ธ๋ฅผ ๋‹ด์•„ ๊ฐœ๋ฐœ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ‘จโ€๐Ÿ’ป ์ œ์ž‘์ž

  • ์‚ฝ์งˆ์‹ผํƒ€ - ์ฃผ๊ฐœ๋ฐœ์ž
  • ์ดํ•˜๋Šฌ - AI ์–ด์‹œ์Šคํ„ดํŠธ & ๊ณต๋™๊ฐœ๋ฐœ์ž
  • ์—ฐ๋ฝ์ฒ˜:

์ฃผ์š” ๊ธฐ๋Šฅ

๐Ÿš€ 10๊ฐ€์ง€ ๊ณ ๊ธ‰ AI ๊ธฐ๋Šฅ

  1. ํ…์ŠคํŠธ ์ƒ์„ฑ - ๋งž์ถค ์„ค์ • ๊ฐ€๋Šฅํ•œ ๊ธฐ๋ณธ ํ…์ŠคํŠธ ์ƒ์„ฑ
  2. ๋ฉ€ํ‹ฐ๋ชจ๋‹ฌ ์ฒ˜๋ฆฌ - ์ด๋ฏธ์ง€, ๋™์˜์ƒ, ์˜ค๋””์˜ค ํŒŒ์ผ ์ง€์›
  3. ํ† ํฐ ๊ณ„์‚ฐ - ๋น„์šฉ ์ถ”์ •์„ ์œ„ํ•œ ์ •ํ™•ํ•œ ํ† ํฐ ๊ณ„์‚ฐ
  4. ์ŠคํŠธ๋ฆฌ๋ฐ ์‘๋‹ต - ๊ธด ์‘๋‹ต์„ ์œ„ํ•œ ์‹ค์‹œ๊ฐ„ ์ŠคํŠธ๋ฆฌ๋ฐ
  5. ๊ตฌ์กฐํ™”๋œ JSON ์ถœ๋ ฅ - ์Šคํ‚ค๋งˆ ๊ฐ•์ œ JSON ์ƒ์„ฑ
  6. ์‹œ์Šคํ…œ ์ง€์‹œ์‚ฌํ•ญ - ์‹œ์Šคํ…œ ํ”„๋กฌํ”„ํŠธ๋กœ AI ํ–‰๋™ ์ปค์Šคํ„ฐ๋งˆ์ด์ง•
  7. ํ•จ์ˆ˜ ํ˜ธ์ถœ - ๋™์  ํ•จ์ˆ˜ ์‹คํ–‰ ๊ธฐ๋Šฅ
  8. ์ฝ”๋“œ ์‹คํ–‰ - AI์™€ ํ•จ๊ป˜ํ•˜๋Š” ์•ˆ์ „ํ•œ ํŒŒ์ด์ฌ ์ฝ”๋“œ ์‹คํ–‰
  9. ํŒŒ์ผ ์—…๋กœ๋“œ ๋ฐ ๋ถ„์„ - ๋‹ค์–‘ํ•œ ํŒŒ์ผ ํ˜•์‹ ์—…๋กœ๋“œ ๋ฐ ๋ถ„์„
  10. ๊ทผ๊ฑฐ ๊ธฐ๋ฐ˜ ๊ฒ€์ƒ‰ - ์‹ค์‹œ๊ฐ„ ์›น ๊ฒ€์ƒ‰ ํ†ตํ•ฉ

๐Ÿ”ง ๊ธฐ์ˆ ์  ํŠน์ง•

  • ํ”„๋กœ๋•์…˜ ์ค€๋น„: ํฌ๊ด„์ ์ธ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ ๋ฐ ๋กœ๊น…
  • ๋ณด์•ˆ ์šฐ์„ : ํ™˜๊ฒฝ ๋ณ€์ˆ˜ API ํ‚ค ๊ด€๋ฆฌ
  • ํ•œ๊ตญ์–ด + ์˜์–ด: ์ด์ค‘ ์–ธ์–ด ๋ฌธ์„œํ™” ๋ฐ ์˜ค๋ฅ˜ ๋ฉ”์‹œ์ง€
  • MCP ํ˜ธํ™˜: ๋ชจ๋ธ ์ปจํ…์ŠคํŠธ ํ”„๋กœํ† ์ฝœ ์™„์ „ ์ค€์ˆ˜
  • ๋น„๋™๊ธฐ ์ง€์›: ์ตœ์‹  asyncio ๊ธฐ๋ฐ˜ ์•„ํ‚คํ…์ฒ˜
  • ํƒ€์ž… ์•ˆ์ „์„ฑ: ๋” ๋‚˜์€ ๊ฐœ๋ฐœ ๊ฒฝํ—˜์„ ์œ„ํ•œ ์™„์ „ํ•œ ํƒ€์ž… ํžŒํŠธ

์„ค์น˜ ๋ฐฉ๋ฒ•

ํ•„์ˆ˜ ์กฐ๊ฑด

  • Python 3.8 ์ด์ƒ
  • Google Gemini API ํ‚ค
  • pip ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €

๋น ๋ฅธ ์„ค์น˜

# ์ €์žฅ์†Œ ๋ณต์ œ
git clone https://github.com/SapjilSanta/advanced-gemini-mcp.git
cd advanced-gemini-mcp

# ์˜์กด์„ฑ ์„ค์น˜
pip install -r requirements.txt

# ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ค์ •
export GEMINI_API_KEY="your-gemini-api-key-here"

ํŒจํ‚ค์ง€ ์˜์กด์„ฑ

google-genai>=0.7.0
mcp>=1.0.0
asyncio
aiofiles
typing-extensions

์‚ฌ์šฉ๋ฒ•

๊ธฐ๋ณธ ์„ค์ •

  1. API ํ‚ค ์„ค์ •:

    export GEMINI_API_KEY="your-api-key"
    
  2. ์„œ๋ฒ„ ์‹คํ–‰:

    python advanced_gemini_mcp.py
    
  3. MCP ํด๋ผ์ด์–ธํŠธ ์—ฐ๊ฒฐ ํ›„ 10๊ฐ€์ง€ ๋„๊ตฌ ์‚ฌ์šฉ ์‹œ์ž‘!

MCP ํด๋ผ์ด์–ธํŠธ ์„ค์ •

MCP ํด๋ผ์ด์–ธํŠธ ์„ค์ •์— ์ถ”๊ฐ€:

{
  "mcpServers": {
    "advanced-gemini": {
      "command": "python",
      "args": ["/path/to/advanced_gemini_mcp.py"],
      "env": {
        "GEMINI_API_KEY": "your-api-key"
      }
    }
  }
}

์„ค์ •

ํ™˜๊ฒฝ ๋ณ€์ˆ˜

๋ณ€์ˆ˜ํ•„์ˆ˜์„ค๋ช…
GEMINI_API_KEY์˜ˆGoogle Gemini API ํ‚ค

์ปค์Šคํ„ฐ๋งˆ์ด์ง•

์„œ๋ฒ„๋Š” ๋„๊ตฌ ๋งค๊ฐœ๋ณ€์ˆ˜๋ฅผ ํ†ตํ•ด ๋‹ค์–‘ํ•œ ์„ค์ • ์˜ต์…˜์„ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค:

  • Temperature: ์ฐฝ์˜์„ฑ ์ œ์–ด (0.0-1.0)
  • Max Tokens: ์‘๋‹ต ๊ธธ์ด ์ œํ•œ
  • Model Selection: ํŠน์ • Gemini ๋ชจ๋ธ ์„ ํƒ
  • File Types: ๋‹ค์ค‘ ๋ฏธ๋””์–ด ํ˜•์‹ ์ง€์›

์‚ฌ์šฉ ์˜ˆ์ œ

ํ…์ŠคํŠธ ์ƒ์„ฑ

# ๋„๊ตฌ: gemini_generate
{
  "prompt": "์–‘์ž ์ปดํ“จํŒ…์„ ์‰ฌ์šด ๋ง๋กœ ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”",
  "temperature": 0.7,
  "max_tokens": 1000
}

์ด๋ฏธ์ง€ ๋ถ„์„

# ๋„๊ตฌ: gemini_multimodal
{
  "prompt": "์ด ์ด๋ฏธ์ง€์—์„œ ๋ณด์ด๋Š” ๊ฒƒ์„ ์„ค๋ช…ํ•ด์ฃผ์„ธ์š”",
  "image_path": "/path/to/image.jpg"
}

์ฝ”๋“œ ์‹คํ–‰

# ๋„๊ตฌ: gemini_code_execution
{
  "prompt": "ํ”ผ๋ณด๋‚˜์น˜ ์ˆ˜์—ด์„ 10๊ฐœ๊นŒ์ง€ ๊ณ„์‚ฐํ•˜๊ณ  ๊ทธ๋ž˜ํ”„๋กœ ๊ทธ๋ ค์ฃผ์„ธ์š”"
}

API ์ฐธ์กฐ

์ž์„ธํ•œ API ๋ฌธ์„œ๋Š” ๋ฅผ ์ฐธ์กฐํ•˜์„ธ์š”.

๊ธฐ์—ฌํ•˜๊ธฐ

์ „ ์„ธ๊ณ„ ๊ฐœ๋ฐœ์ž๋“ค์˜ ๊ธฐ์—ฌ๋ฅผ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค! ๐ŸŒ

๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ •

  1. ์ €์žฅ์†Œ ํฌํฌ
  2. ๊ธฐ๋Šฅ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑ
  3. ๋ณ€๊ฒฝ์‚ฌํ•ญ ์ž‘์„ฑ
  4. ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€
  5. ํ’€ ๋ฆฌํ€˜์ŠคํŠธ ์ œ์ถœ

์ฝ”๋”ฉ ํ‘œ์ค€

  • PEP 8 ์Šคํƒ€์ผ ๊ฐ€์ด๋“œ๋ผ์ธ ์ค€์ˆ˜
  • ๋ชจ๋“  ํ•จ์ˆ˜์— ํƒ€์ž… ํžŒํŠธ ์ถ”๊ฐ€
  • ๊ณต๊ฐœ API์— ๋Œ€ํ•œ ๋…์ŠคํŠธ๋ง ํฌํ•จ
  • ํฌ๊ด„์ ์ธ ์˜ค๋ฅ˜ ์ฒ˜๋ฆฌ ์ž‘์„ฑ

๋ผ์ด์„ ์Šค

์ด ํ”„๋กœ์ ํŠธ๋Š” MIT ๋ผ์ด์„ ์Šค ํ•˜์— ์žˆ์Šต๋‹ˆ๋‹ค - ์ž์„ธํ•œ ๋‚ด์šฉ์€ ํŒŒ์ผ์„ ์ฐธ์กฐํ•˜์„ธ์š”.


๐ŸŒŸ Star History

Star History Chart


๐Ÿ’ Support

If this project helps you, please consider: ์ด ํ”„๋กœ์ ํŠธ๊ฐ€ ๋„์›€์ด ๋˜์‹ ๋‹ค๋ฉด ๊ณ ๋ คํ•ด์ฃผ์„ธ์š”:

  • โญ Starring this repository | ์ด ์ €์žฅ์†Œ์— ๋ณ„์  ์ฃผ๊ธฐ
  • ๐Ÿ› Reporting bugs | ๋ฒ„๊ทธ ์‹ ๊ณ 
  • ๐Ÿ’ก Suggesting features | ๊ธฐ๋Šฅ ์ œ์•ˆ
  • ๐Ÿ”€ Contributing code | ์ฝ”๋“œ ๊ธฐ์—ฌ
  • โ˜• Buy us a coffee | ์ปคํ”ผ ํ•œ ์ž” ์‚ฌ์ฃผ๊ธฐ

๐Ÿค Community

Join our growing community: ์„ฑ์žฅํ•˜๋Š” ์ปค๋ฎค๋‹ˆํ‹ฐ์— ์ฐธ์—ฌํ•˜์„ธ์š”:

  • GitHub Discussions: Share ideas and get help
  • Issues: Report bugs and request features
  • Email: for direct contact

Made with โค๏ธ in South Korea | ๋Œ€ํ•œ๋ฏผ๊ตญ์—์„œ ์‚ฌ๋ž‘์œผ๋กœ ์ œ์ž‘ ๐Ÿ‡ฐ๐Ÿ‡ท