Together AI Image MCP Server

by stefanskiasan

Recommended
6 stars
20 downloads
Not rated
GitHub

About

Enables the generation of images using Together AI's models through an MCP server, supporting customizable parameters such as model selection, image dimensions, and output directory.

Details

Author
stefanskiasan
Repository
stefanskiasan/togetherai-image-mcp-server
GitHub stars
6
Downloads
20
License
MIT License
Categories
Design, AI

- 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

Setting up with Highlight

Follow these steps to add this server as a custom Highlight plugin:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Together AI Image MCP Server
    Command (node, npx, python, etc.) node
    Arguments
    • Argument 1 /path/to/togetherai-image-server/build/index.js
    Environment
    • TOGETHER_API_KEY your-api-key-here

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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": []
    }
  }
}

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')
}

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>

generate_image

Generate an image based on a text description. Parameters: prompt (string, required), model (string, optional), width (number, optional), height (number, optional), steps (number, optional), n (number, optional), outputDir (string, optional)

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

Linux

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

Macos

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

Windows

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

Together AI Image Server

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

<a href="https://glama.ai/mcp/servers/2cwphjnpgw">Together AI Image Server MCP server</a>

Setup

1. Install dependencies:

npm install

2. 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

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.