universal-image-generator-mcp


Nameuniversal-image-generator-mcp JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryUniversal Image Generator MCP
upload_time2025-07-10 01:26:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords automation http llm mcp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Universal Image Generator MCP Server

Multi-provider AI image generation server for MCP clients. Generate high-quality images using Google Gemini, ZHIPU AI CogView-4, or Alibaba Bailian through any MCP-compatible application.

## Features

- **Multi-Provider Support**: Choose between Gemini, ZhipuAI, or Bailian
- **Image Generation**: Text-to-image for all providers  
- **Image Transformation**: Edit existing images (Gemini & Bailian only)
- **Smart Language Optimization**: Automatic prompt translation and optimization
- **Local Storage**: Save generated images to your specified directory

## Quick Setup

### 1. Install via uvx

No manual installation required! The server will be automatically downloaded and run.

### 2. Get API Keys

Choose one provider and get an API key:

- **Gemini**: [Google AI Studio](https://aistudio.google.com/apikey)
- **ZhipuAI**: [ZHIPU AI Platform](https://bigmodel.cn/dev/api) 
- **Bailian**: [Alibaba DashScope](https://dashscope.aliyun.com)

### 3. Configure MCP Client

Add to your MCP client configuration (e.g., `claude_desktop_config.json`):

```json
{
    "mcpServers": {
        "universal-image-generator": {
            "command": "uvx",
            "args": [
                "universal-image-generator-mcp"
            ],
            "env": {
                "IMAGE_PROVIDER": "zhipuai",
                "ZHIPU_API_KEY": "your-api-key-here",
                "GEMINI_API_KEY": "your-api-key-here",
                "DASHSCOPE_API_KEY": "your-api-key-here",
                "OUTPUT_IMAGE_PATH": "/path/to/save/images"
            }
        }
    }
}
```

**Environment Variables:**
- `IMAGE_PROVIDER`: `"gemini"`, `"zhipuai"`, or `"bailian"`
- Set the corresponding API key for your chosen provider
- `OUTPUT_IMAGE_PATH`: Directory to save generated images (optional)

## Available Tools

### `generate_image_from_text`
Create images from text descriptions.
```
generate_image_from_text(prompt: str) -> str
```

### `transform_image_from_encoded` *(Gemini & Bailian only)*
Transform images using base64-encoded image data.
```
transform_image_from_encoded(encoded_image: str, prompt: str) -> str
```

### `transform_image_from_file` *(Gemini & Bailian only)*
Transform existing image files.
```
transform_image_from_file(image_file_path: str, prompt: str) -> str
```

## Usage Examples

Once configured, ask your AI assistant:

- "Generate an image of a sunset over mountains"
- "Create a 3D rendered flying pig in a sci-fi city"
- "Transform this image by adding snow to the scene"

Generated images are saved to your configured output directory.

## Example Output

**Prompt:** "Create a 3D rendered image of a pig with wings and a top hat flying over a futuristic sci-fi city with lots of greenery"

![Flying pig over sci-fi city](examples/flying_pig_scifi_city.png)

**Transform:** "Add a cute baby whale flying alongside the pig"

![Flying pig with baby whale](examples/pig_cute_baby_whale.png)

## Provider Capabilities

| Provider | Generation | Transformation | Language Optimization |
|----------|------------|----------------|----------------------|
| Gemini   | ✅         | ✅             | English prompts       |
| ZhipuAI  | ✅         | ❌             | Chinese prompts       |
| Bailian  | ✅         | ✅             | Chinese prompts       |

## Development

Test the server locally:
```bash
git clone https://github.com/ECNU3D/universal-image-generator-mcp.git
cd universal-image-generator-mcp
fastmcp dev src/universal_image_generator_mcp/server.py
```

Visit http://localhost:5173/ to use the MCP Inspector for testing.

## License

MIT License

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "universal-image-generator-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "automation, http, llm, mcp",
    "author": null,
    "author_email": "Tony Wang <shanghaishanghai@yeah.net>",
    "download_url": "https://files.pythonhosted.org/packages/b0/44/9feb13f132d08b550d0299f0eccf2c0933b5a71fa0560a921595c4dd8bfc/universal_image_generator_mcp-0.1.2.tar.gz",
    "platform": null,
    "description": "# Universal Image Generator MCP Server\n\nMulti-provider AI image generation server for MCP clients. Generate high-quality images using Google Gemini, ZHIPU AI CogView-4, or Alibaba Bailian through any MCP-compatible application.\n\n## Features\n\n- **Multi-Provider Support**: Choose between Gemini, ZhipuAI, or Bailian\n- **Image Generation**: Text-to-image for all providers  \n- **Image Transformation**: Edit existing images (Gemini & Bailian only)\n- **Smart Language Optimization**: Automatic prompt translation and optimization\n- **Local Storage**: Save generated images to your specified directory\n\n## Quick Setup\n\n### 1. Install via uvx\n\nNo manual installation required! The server will be automatically downloaded and run.\n\n### 2. Get API Keys\n\nChoose one provider and get an API key:\n\n- **Gemini**: [Google AI Studio](https://aistudio.google.com/apikey)\n- **ZhipuAI**: [ZHIPU AI Platform](https://bigmodel.cn/dev/api) \n- **Bailian**: [Alibaba DashScope](https://dashscope.aliyun.com)\n\n### 3. Configure MCP Client\n\nAdd to your MCP client configuration (e.g., `claude_desktop_config.json`):\n\n```json\n{\n    \"mcpServers\": {\n        \"universal-image-generator\": {\n            \"command\": \"uvx\",\n            \"args\": [\n                \"universal-image-generator-mcp\"\n            ],\n            \"env\": {\n                \"IMAGE_PROVIDER\": \"zhipuai\",\n                \"ZHIPU_API_KEY\": \"your-api-key-here\",\n                \"GEMINI_API_KEY\": \"your-api-key-here\",\n                \"DASHSCOPE_API_KEY\": \"your-api-key-here\",\n                \"OUTPUT_IMAGE_PATH\": \"/path/to/save/images\"\n            }\n        }\n    }\n}\n```\n\n**Environment Variables:**\n- `IMAGE_PROVIDER`: `\"gemini\"`, `\"zhipuai\"`, or `\"bailian\"`\n- Set the corresponding API key for your chosen provider\n- `OUTPUT_IMAGE_PATH`: Directory to save generated images (optional)\n\n## Available Tools\n\n### `generate_image_from_text`\nCreate images from text descriptions.\n```\ngenerate_image_from_text(prompt: str) -> str\n```\n\n### `transform_image_from_encoded` *(Gemini & Bailian only)*\nTransform images using base64-encoded image data.\n```\ntransform_image_from_encoded(encoded_image: str, prompt: str) -> str\n```\n\n### `transform_image_from_file` *(Gemini & Bailian only)*\nTransform existing image files.\n```\ntransform_image_from_file(image_file_path: str, prompt: str) -> str\n```\n\n## Usage Examples\n\nOnce configured, ask your AI assistant:\n\n- \"Generate an image of a sunset over mountains\"\n- \"Create a 3D rendered flying pig in a sci-fi city\"\n- \"Transform this image by adding snow to the scene\"\n\nGenerated images are saved to your configured output directory.\n\n## Example Output\n\n**Prompt:** \"Create a 3D rendered image of a pig with wings and a top hat flying over a futuristic sci-fi city with lots of greenery\"\n\n![Flying pig over sci-fi city](examples/flying_pig_scifi_city.png)\n\n**Transform:** \"Add a cute baby whale flying alongside the pig\"\n\n![Flying pig with baby whale](examples/pig_cute_baby_whale.png)\n\n## Provider Capabilities\n\n| Provider | Generation | Transformation | Language Optimization |\n|----------|------------|----------------|----------------------|\n| Gemini   | \u2705         | \u2705             | English prompts       |\n| ZhipuAI  | \u2705         | \u274c             | Chinese prompts       |\n| Bailian  | \u2705         | \u2705             | Chinese prompts       |\n\n## Development\n\nTest the server locally:\n```bash\ngit clone https://github.com/ECNU3D/universal-image-generator-mcp.git\ncd universal-image-generator-mcp\nfastmcp dev src/universal_image_generator_mcp/server.py\n```\n\nVisit http://localhost:5173/ to use the MCP Inspector for testing.\n\n## License\n\nMIT License\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Universal Image Generator MCP",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/ECNU3D/universal-image-generator-mcp",
        "Issues": "https://github.com/ECNU3D/universal-image-generator-mcp/issues"
    },
    "split_keywords": [
        "automation",
        " http",
        " llm",
        " mcp"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0635c42ff0dca139b99f0adb58f3a2f8ef4eeddb33a55dca7845801b84528514",
                "md5": "f22cb6c476e974b43d72f752c7b847c8",
                "sha256": "2c2a79c9d7c765d6c57a14372da90749fe72b082b7510c1b5750f654c87c2a4d"
            },
            "downloads": -1,
            "filename": "universal_image_generator_mcp-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f22cb6c476e974b43d72f752c7b847c8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 23139,
            "upload_time": "2025-07-10T01:25:58",
            "upload_time_iso_8601": "2025-07-10T01:25:58.398020Z",
            "url": "https://files.pythonhosted.org/packages/06/35/c42ff0dca139b99f0adb58f3a2f8ef4eeddb33a55dca7845801b84528514/universal_image_generator_mcp-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b0449feb13f132d08b550d0299f0eccf2c0933b5a71fa0560a921595c4dd8bfc",
                "md5": "66c23a95e4d24d90ecd71b8bc632594f",
                "sha256": "7cf92206e29ab2758f0a0a7850acb82fdb5f8f84d714e54fa279f6b710cc22c3"
            },
            "downloads": -1,
            "filename": "universal_image_generator_mcp-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "66c23a95e4d24d90ecd71b8bc632594f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 3209779,
            "upload_time": "2025-07-10T01:26:02",
            "upload_time_iso_8601": "2025-07-10T01:26:02.050019Z",
            "url": "https://files.pythonhosted.org/packages/b0/44/9feb13f132d08b550d0299f0eccf2c0933b5a71fa0560a921595c4dd8bfc/universal_image_generator_mcp-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 01:26:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ECNU3D",
    "github_project": "universal-image-generator-mcp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "universal-image-generator-mcp"
}
        
Elapsed time: 1.58857s