Get the FREE Ultimate OpenClaw Setup Guide →

togetherai-image

MCP server from stefanskiasan/togetherai-image-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio stefanskiasan-togetherai-image-mcp-server node /path/to/togetherai-image-server/build/index.js \
  --env TOGETHER_API_KEY="your-api-key-here"

How to use

Together AI Image is an MCP server that exposes a generate_image tool to create images using Together AI's FLUX models. It accepts prompts and optional parameters such as model, dimensions, steps, and output directory. The tool outputs a JSON payload with details like the saved file path, filename, and image dimensions. This makes it easy to integrate image generation into your workflows or chat-based prompts via the MCP framework. To use it, configure the server in your MCP settings with your Together AI API key, then invoke generate_image with a prompt and any desired options such as width, height, steps, or a specific model. The server defaults to a high-quality model and sensible defaults for image size and steps if you omit optional fields. The output can then be consumed by downstream tools or saved to a directory of your choice.

How to install

Prerequisites:

  • Node.js (recommended LTS) and npm installed on your system
  • Access to Together AI API and an API key

Installation steps:

  1. Clone or download the MCP server repository for Together AI Image.
  2. Install dependencies:
npm install
  1. Build the server:
npm run build
  1. Obtain your Together AI API key from the Together AI platform and add it to your environment configuration as TOGETHER_API_KEY.
  2. Run or integrate the server using your MCP configuration as described in the mcp_config section.

Note: The exact startup command may vary depending on your deployment method; ensure the built index.js path in mcp_config points to the generated entry point.

Additional notes

Tips and common considerations:

  • Ensure TOGETHER_API_KEY is kept secret and not committed to version control.
  • If you run behind a proxy, configure network settings to allow outbound requests to Together AI endpoints.
  • The generate_image tool supports model, width, height, steps, n (number of images), and outputDir. If width/height are below 256, the server will automatically resize while preserving aspect ratio (per features listed in the README).
  • Output directory (outputDir) should exist or be creatable by the server; the tool will return metadata including filepath, filename, and dimensions.
  • If you encounter authentication errors, double-check the API key scope and that the key is active for image generation endpoints.
  • For local testing, use a temporary outputDir and clean up test images to avoid clutter.

Related MCP Servers

Sponsor this space

Reach thousands of developers