Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

togetherai-image-mcp-server

MCP.Pizza Chef: stefanskiasan

Together AI Image MCP Server is a dedicated MCP server that enables real-time image generation using Together AI's state-of-the-art image generation models. It integrates seamlessly with MCP clients, requiring an API key from Together AI, and supports easy setup and configuration for developers. This server empowers applications to produce high-quality images on demand, enhancing AI workflows with visual content generation capabilities.

Use This MCP server To

Generate images from text prompts in real-time Integrate image generation into AI-powered chatbots Create visual content for marketing or social media Automate image creation for design workflows Produce custom illustrations for documentation or tutorials Enhance creative applications with AI-generated visuals

README

Together AI Image Server

An MCP server for generating images using Together AI's image generation models.

Together AI Image Server MCP server

Setup

  1. Install dependencies:
npm install
  1. Build the server:
npm run build

Configuration

1. Together AI API Key

The server requires a Together AI API key. You can get one from Together AI's platform.

2. Cline Configuration

Add the server to your Cline MCP settings file:

For macOS/Linux: ~/Library/Application Support/Windsurf/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

{
  "mcpServers": {
    "togetherai-image": {
      "command": "node",
      "args": ["/path/to/togetherai-image-server/build/index.js"],
      "env": {
        "TOGETHER_API_KEY": "your-api-key-here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

Usage in Cline

The server provides a generate_image tool with the following parameters:

{
  prompt: string;           // Required: Text description of the image to generate
  model?: string;          // Optional: Model to use (default: 'black-forest-labs/FLUX.1.1-pro')
  width?: number;          // Optional: Image width in pixels (default: 1024)
  height?: number;         // Optional: Image height in pixels (default: 768)
  steps?: number;         // Optional: Number of inference steps (default: 28)
  n?: number;             // Optional: Number of images to generate (default: 1)
  outputDir?: string;     // Optional: Directory where images will be saved (default: './output')
}

Example Usage

You can use the server in Cline like this:

Generate an image of a cat and save it to my desktop:

<use_mcp_tool>
<server_name>togeherai-image</server_name>
<tool_name>generate_image</tool_name>
<arguments>
{
  "prompt": "A cute cat sitting on a windowsill",
  "outputDir": "/Users/username/Desktop/generated-images"
}
</arguments>
</use_mcp_tool>

Output

The tool returns a JSON response containing:

  • filepath: Full path to the saved image
  • filename: Name of the saved image file
  • dimensions: Original and final dimensions of the image

Features

  • Supports Together AI's latest FLUX.1.1-pro model
  • Automatically resizes images if dimensions are below 256 pixels
  • Maintains aspect ratio during resizing
  • High-quality JPEG output (90% quality)
  • Creates output directories recursively
  • Returns detailed metadata including image dimensions

togetherai-image-mcp-server FAQ

How do I obtain the Together AI API key required for this server?
You can get the API key by signing up on Together AI's platform at https://api.together.xyz/.
What are the basic steps to set up the Together AI Image MCP Server?
Install dependencies with npm install, build the server using npm run build, then configure your MCP client with the server command and environment variables.
Can this server be used with multiple MCP clients simultaneously?
Yes, as an MCP server, it can serve multiple clients that request image generation concurrently, depending on resource limits.
Is the Together AI Image MCP Server compatible with other LLM providers like OpenAI, Claude, or Gemini?
While it specifically uses Together AI for image generation, it can be integrated into workflows alongside LLMs from OpenAI, Claude, and Gemini for multimodal applications.
How is the API key secured when configuring the server?
The API key is set as an environment variable in the MCP client configuration, keeping it out of source code and allowing secure access.
What programming environment is required to run this MCP server?
The server runs on Node.js, requiring npm for dependency management and build scripts.
Can I customize the image generation parameters?
Yes, the server can be configured to pass different parameters to Together AI's API to customize image outputs according to your needs.