Cover image
双子座图像MCP-Server
Public

双子座图像MCP-Server

Try Now
2025-04-01

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

Installation

Gemini Image MCP Server

Google Gemini-based image generation and editing service providing AI image processing capabilities through MCP protocol.

Features

  • Text-to-Image Generation (generate_image)
  • Image Editing & Modification (edit_image)
  • PNG Format Support
  • Automatic File Path Management

安装运行

# 安装依赖
uv pip install -r requirements.txt

# 设置环境变量(Linux/macOS)
export GEMINI_API_KEY=your_api_key_here

# Windows 设置:
setx GEMINI_API_KEY "your_api_key_here"

API Documentation

generate_image

@mcp.tool()
async def generate_image(prompt: str, save_path: str = None) -> str:
    """
    :param prompt: Image generation prompt (works better in English)
    :param save_path: Optional save path (default: generated-images/ directory)
    :return: Absolute path of generated image
    """

edit_image

@mcp.tool()
async def edit_image(prompt: str, image_path: str, save_path: str = None) -> str:
    """
    :param prompt: 图像编辑指令(支持中文)
    :param image_path: 原始图片路径
    :param save_path: 可选保存路径,默认生成在 generated-images/ 目录
    :return: 编辑后图片的绝对路径
    """

MCP Configuration

Add to mcp.json:

{
    "mcpServers": {
        "gemini-image-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "/ABSOLUTE/PATH/TO/PARENT/FOLDER/",
                "run",
                "server.py"
            ]
        }
    }
}

Important Notes

  1. Ensure replacement of absolute paths in configuration
  2. API key must be set through environment variables
  3. Recommended to run sample code first for initial usage
  4. Generated images default to generated-images directory

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

    Reviews

    5 (1)
    Avatar
    user_9iYfUKsk
    2025-04-15

    I've been using repo-to-txt-mcp by chromewillow, and it has significantly streamlined my workflow. This tool extracts text files from repositories effortlessly, saving me so much time. The interface is user-friendly, and the processing speed is impressive. Highly recommended for anyone needing an efficient way to handle repository text exports. Check it out at https://mcp.so/server/repo-to-txt-mcp/chromewillow!