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"],
"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.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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ms_image_gen_mcp-1.2.0-py3-none-any.whl.
File metadata
- Download URL: ms_image_gen_mcp-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5eaad37c75be57670942e3b9b8da0cc06293dd92ee7e4e505e4dbd84f4e8e6f
|
|
| MD5 |
9061cf55970727832f733b0c3ef0f11d
|
|
| BLAKE2b-256 |
386cd00d6f320d1e3172f13e481efb3c7146f335c636c7e690be60da8865c381
|