返回 MCP 目录
public公开dns本地运行

MCP图像生成与处理工具

通过Model Context Protocol利用Google Gemini模型和其他图像服务,提供由AI驱动的图像生成、修改和处理功能的服务器。

article

README

PromptShopMCP

English | 中文

A powerful MCP (Model Context Protocol) server that transforms images using simple text commands. Edit photos like a professional designer - just describe what you want in natural language!

Demo

Original Image

Prompt: add a coat to the dog

Prompt: Add a hat to it

Features

  • Image Generation: Create images from text prompts using Google's Gemini models
  • Image Modification: Transform existing images based on text instructions
  • Background Removal: Remove backgrounds from images using the remove.bg API
  • Image Hosting: Share generated images via FreeImage.host
  • Resource Management: Track and manage generated and uploaded images

Requirements

  • Python 3.11 or higher
  • Required API keys:

Installation

  1. Clone this repository:

    git https://github.com/Kira-Pgr/Image-Toolkit-MCP-Server.git
    cd Image-Toolkit-MCP-Server
    
  2. Install UV (if not already installed):

    # On macOS and Linux.
    curl -LsSf https://astral.sh/uv/install.sh | sh
    # On Windows.
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    # With pip.
    pip install uv
    
  3. Install dependencies using UV:

    uv venv --python=python3.11
    source .venv/bin/activate #or .venv/Scripts/activate on Windows
    uv pip install -r requirements.txt
    

Usage

  1. Claude Desktop Integration: Add the following configuration to your claude_desktop_config.json file to run the server directly from Claude Desktop:
    "PromptShopMCP": {
      "command": "uv",
      "args": [
        "--directory",
        "/project/dir/",
        "run",
        "mcp",
        "run",
        "/project/dir/server.py"
      ],
      "env": {
        "GEMINI_API_KEY": "key",
        "FREEIMAGE_API_KEY": "key",
        "REMOVEBG_API_KEY": "key"
      }
    }
    
    Note: Replace the placeholder "key" values with your actual API keys.
  2. Cursor Integration:
    Linux/macOS: Modify the cursor.sh file to set your API keys and project directory.
  • In cursor settings, go to the "MCP" tab, click on Add new MCP server,
  • Name the server whatever you want, and set the command to sh /absolute/path/to/cursor.sh.
  • Wait for the server to start, and you can see the server and available tools.
  • Then when you use the agent, it would automatically detect whether use the tools. image

Windows: Modify the cursor.bat file to set your API keys and project directory.

  • In cursor settings, go to the "MCP" tab, click on Add new MCP server,
  • Name the server whatever you want, and set the command to cmd /c C:absolutepath ocursor.bat.
  • Wait for the server to start, and you can see the server and available tools.
  • Then when you use the agent, it would automatically detect whether use the tools.

Acknowledgements

help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端