home / mcp / image generation mcp server

Image Generation MCP Server

Provides a standardized interface to generate images via Together AI with customizable prompts and dimensions.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "sarthakkimtani-mcp-image-gen": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/image-gen/",
        "run",
        "image-gen"
      ],
      "env": {
        "TOGETHER_AI_API_KEY": "<API KEY>"
      }
    }
  }
}

You can generate high-quality images using a dedicated MCP server that interfaces with Together AI. This server exposes a consistent way for clients to request images with customizable prompts and dimensions, making image generation easy to integrate into your workflows.

How to use

You connect with the Image Generation MCP Server from your MCP-compatible client and call the generate_image tool. Provide a text prompt describing the image you want, and optionally specify width and height in pixels. You can also select a model by name to influence the generation. If you omit the dimensions, the server may choose sensible defaults.

How to install

Prerequisites: Python 3.12 or higher, httpx, and MCP tooling installed on your host.

1) Prepare the MCP server configuration snippet shown below and place it in your MCP runtime configuration.

2) Save the configuration and ensure your environment variable for the API key is set. You will pass the Together AI API key as TOGETHER_AI_API_KEY.

3) Start or reload your MCP environment so the image-gen server is discovered by your MCP client.

{
  "mcpServers": {
    "image_gen": {
      "command": "uv",
      "args": ["--directory", "/ABSOLUTE/PATH/TO/image-gen/", "run", "image-gen"],
      "env": {
        "TOGETHER_AI_API_KEY": "<API KEY>"
      }
    }
  }
}

Additional notes

The server supports configurable image dimensions and will return helpful errors if the prompt is invalid or if there are API issues with the Together AI service.

Available tools

generate_image

Generates an image from a textual prompt with optional width, height, and model parameters. Returns the generated image or a reference to it.