Skip to main content

A Model Context Protocol (MCP) server to generate images by text prompts via modelscope

Project description

Feature

  • 📝 Support image generation by text via Modelscope

Prerequisites

  1. Python 3.11+
  2. Modelscope Key (apply from Modelscope)
  3. Node.js (optional, for MCP Inspector)

Install

  1. python packages
pip install -r requirements.txt
  1. install image_generation_mcp_server
pip install image-generation-mcp-server

Debug by MCP Inspector

start the inspector by following command in terminal (replace YOUR_MODELSCOPE_API_KEY with your own key):

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

Start the server

start the server by following command:

env MODELSCOPE_API_KEY=YOUR_MODELSCOPE_API_KEY python -m image_generation_mcp_server

or you can add following json into your config file

{
    "mcpServers": {
        "image-generation-mcp-server": {
            "command": "python",
            "args": [
                "-m",
                "image_generation_mcp_server"
            ],
            "env": {
                "MODELSCOPE_API_KEY": "YOUR_MODELSCOPE_API_KEY"
            }
        }
    }
}

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.

image_generation_mcp_server-0.1.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file image_generation_mcp_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for image_generation_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c10b260af07aa6f185228e556805e40c3f7463569d700c06673ba9c62e795418
MD5 be0c614df3fd3981b65115623aa56432
BLAKE2b-256 2fb9995d16e837559acb4e5da89af48cf7b1a8e63712ab483c138ed1600dffb9

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