Skip to main content

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

Metadata

Release files for ms-image-gen-mcp 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ms-image-gen-mcp 1.3.0
File Interpreter ABI Platform
ms_image_gen_mcp-1.3.0-py3-none-any.whl Python 3 none any Details

Release files / ms_image_gen_mcp-1.3.0-py3-none-any.whl

Download URL ms_image_gen_mcp-1.3.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d491952c52d0612c7c42f36c083ee5664e8f77e52fcd6058ce527f636917a03f
BLAKE2b-256 checksum
How to use checksums
6ad5f29565ca28efb826cb9b8f9998b22f6627b23fbd143d1a3aa87d3c741143
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for ms-image-gen-mcp 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page