Skip to main content

ModelScope Image Generator

Project description

ModelScope Image Generation MCP

A powerful Model Context Protocol (MCP) server that integrates with ModelScope's image generation capabilities, enabling seamless AI image creation and model discovery through chat interfaces.

Features

  • 🔍 Model Discovery: Search and explore models on ModelScope using keywords with advanced filtering options
  • 🎨 Text-to-Image: Generate high-quality images from text descriptions using state-of-the-art models
  • 🖼️ Image-to-Image: Transform existing images based on text prompts for creative editing
  • 📊 Model Analytics: Sort models by popularity, download count, or modification date
  • 🚀 Easy Integration: Seamless integration with MCP-compatible chat clients

Available Tools

Model Search Tool

🔍 search_models - Search and discover models on ModelScope

Parameter Type Description Example
query string Search keywords "Flux", "SDXL", ""
task string Filter by task type (optional) "text-to-image"
libraries string Filter by library type (optional) "LoRA"
sort string Sort order (optional) "DownloadsCount", "StarsCount", "GmtModified"
limit integer Number of results (1-30) (optional) 10

Image Generation Tools

🎨 generate_image_url_from_text - Create images from text descriptions

Parameter Type Description Default
description string Text prompt for image generation Required
model string Default Model ID to use "Qwen/Qwen-Image"

✍️ generate_image_url_from_text_and_image_url - Transform existing images

Parameter Type Description Default
description string Text prompt for image transformation Required
image_url string URL of input image Required
model string Default Model ID to use "black-forest-labs/FLUX.1-Kontext-dev"

Popular Models Available

  • Text-to-Image: Qwen/Qwen-Image (Default)
  • Image-to-Image: black-forest-labs/FLUX.1-Kontext-dev (Default)
  • And 10000+ more models available through ModelScope platform!

Configuration

Step 1: Obtain API Key

Obtain your API key from ModelScope API Key for API access.

Step 2: Configure MCP Client

Add the following configuration to your MCP client (e.g., Cherry Studio, Claude Desktop):

{
  "modelscope-image-gen-mcp": {
    "command": "uvx",
    "args": ["ms_image_gen_mcp@latest"],
    "env": {
      "MODELSCOPE_API_KEY": "YOUR_MODELSCOPE_API_KEY"
    }
  }
}

Development

Prerequisites

  • Python 3.11+: Required for running the MCP server
  • ModelScope API Key: Obtain from ModelScope for API access
  • Node.js (optional): Required for MCP Inspector debugging

Installation

Install the package via pip:

pip install ms-image-gen-mcp

Debugging with MCP Inspector

For development and debugging, use the MCP Inspector:

npx @modelcontextprotocol/inspector -e MODELSCOPE_API_KEY=YOUR_MODELSCOPE_API_KEY python -m ms_image_gen_mcp

Version History

Version Changes
1.3.0 Add parameters to image generation tools (size, steps, guidance scale, etc.)
1.2.0 Convert to async API
1.1.0 Add model search and image-to-image generation
1.0.0 Initial release with text-to-image generation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ms_image_gen_mcp-1.3.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file ms_image_gen_mcp-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ms_image_gen_mcp-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d491952c52d0612c7c42f36c083ee5664e8f77e52fcd6058ce527f636917a03f
MD5 2841917a61d5d8022a2af0287c1baba6
BLAKE2b-256 6ad5f29565ca28efb826cb9b8f9998b22f6627b23fbd143d1a3aa87d3c741143

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page