MCP.so
登录

AI Image Generation Server with MCP Interface

@aymec

基本信息

分类

媒体与设计

许可证

MIT

传输方式

stdio

作者

aymec

关于 AI Image Generation Server with MCP Interface

This project provides an HTTP server for image generation using Stable Diffusion, along with a Model Context Protocol (MCP) server that enables AI agents to request image generation.

AI Image Generation Server with MCP Interface 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "image_gen_with_mcp": {
      "command": "python",
      "args": [
        "generate_image.py"
      ]
    }
  }
}

AI Image Generation Server with MCP Interface 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is AI Image Generation Server with MCP Interface?

This project is an MCP (Model Context Protocol) server with integrated Stable Diffusion image generation capabilities. It enables AI agents to request and receive generated images via a standardized MCP interface. It is based on Block's Goose Custom Extension tutorial.

How to use AI Image Generation Server with MCP Interface?

Set up a virtual environment (mandatorily named .venv), install the MCP package (pip install -e .), then run the combined service with image-gen-mcp after setting the IMAGE_GEN_DIR environment variable. Alternatively, use development mode with the FastMCP Inspector for testing and debugging. Integrate with Goose as a StandardIO extension by providing the executable path and the IMAGE_GEN_DIR variable.

Key features of AI Image Generation Server with MCP Interface

  • Combined MCP server and image generation service
  • Uses Stable Diffusion for text-to-image generation
  • Provides a direct HTTP API for image generation
  • Returns image URL, dimensions, format, and metadata
  • Runs on port 5000 by default (customizable)
  • Supports integration with Goose and the FastMCP Inspector

Use cases of AI Image Generation Server with MCP Interface

  • AI agents generating images based on user prompts
  • Testing and debugging image generation with FastMCP Inspector
  • Integrating image generation into custom AI workflows via MCP
  • Running local image generation with Ollama (tested with mistral-small3.1)
  • Serving generated images via HTTP for direct access

常见问题

1

What runtime does it require?

It requires Python 3 and a virtual environment. The project uses the `mcp` package and Stable Diffusion dependencies installed via `pip install -e .`.

2

How do I set the output folder for images?

Set the environment variable `IMAGE_GEN_DIR` to the absolute path of the target folder before starting the service.

3

Can I change the port for the image generation service?

Yes, use the `--port` flag when running `image-gen-mcp` (e.g., `image-gen-mcp --port 5001`).

4

Does it work with local models like Ollama?

Yes, it can run locally with Ollama. The only model tested successfully is mistral-small3.1, though it is slower than using OpenAI GPT-4o.

5

How do I stop the service?

Press Ctrl+C to stop both the MCP server and the image generation service, as they run within the same process.

评论

媒体与设计 分类下的更多 MCP 服务器