Project description
Feature
- ? Support text to image generation backed by models on ModelScope
Prerequisites
-
Python 3.11+
-
ModelScope Token (obtained from ModelScope)
-
Node.js (optional, for MCP Inspector)
Install
- python packages
pip install -r requirements.txt
- install modelscope-image-gen-mcp
pip install modelscope_image_gen_mcp
Debug by MCP Inspector
start the inspector by following command in terminal (replace YOUR_MODELSCOPE_TOKEN with your own token):
npx @modelcontextprotocol/inspector -e MODELSCOPE_API_KEY=YOUR_MODELSCOPE_API_KEY python -m modelscope_image_gen_mcp
Start the server
start the server by following command:
env MODELSCOPE_API_KEY=YOUR_MODELSCOPE_API_KEY python -m modelscope_image_gen_mcp
or you can add following json into your config file
{
"mcpServers": {
"modelscope_image_gen_mcp": {
"command": "python",
"args": [
"-m",
"modelscope_image_gen_mcp"
],
"env": {
"MODELSCOPE_API_KEY": "MODELSCOPE_API_KEY"
}
}
}
}