Get the FREE Ultimate OpenClaw Setup Guide →

together

MCP server enabling high-quality image generation via Together AI's Flux.1 Schnell model.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio manascb1344-together-mcp-server npx together-mcp@latest -y \
  --env TOGETHER_API_KEY="<API KEY>"

How to use

This MCP server provides a standardized interface to generate images using the Flux.1 Schnell model via Together AI. Clients connect to the server and invoke the generate_image tool to produce images based on a text prompt. The tool supports optional parameters such as width, height, steps, n (number of images), model, and response_format, with sensible defaults applied when omitted. The server can also save the generated image to disk if you provide an image_path.

To use it, supply a prompt and, if desired, adjust optional parameters to tailor the output (e.g., higher width/height for larger images, more steps for potentially better quality, or saving the result to a local path). The response will include either a base64-encoded image (b64_json) or a URL to the generated image, along with timing information for the inference step.

How to install

Prerequisites:

  • Node.js >= 16
  • npm (comes with Node.js)
  • An API key for Together AI

Installation steps:

  1. Install the MCP server package: npm install together-mcp

  2. Run the server directly with npx (as in the README example): npx together-mcp@latest

  3. Alternatively, clone the repository and install dependencies locally: git clone https://github.com/manascb1344/together-mcp-server cd together-mcp-server npm install npm run build

  4. Ensure your MCP configuration includes the mcpServers entry for together-image-gen (see mcp_config). Then start your MCP server container or process as appropriate for your environment.

Additional notes

Notes and tips:

  • Set TOGETHER_API_KEY in your MCP configuration to authenticate with Together AI.
  • The default image model is Flux.1 Schnell; you can override it with the model parameter.
  • Width and height have bounds (min 128, max 2048); adjust with care for performance.
  • If saving images to disk, ensure the target directory exists and is writable.
  • The server exposes a single tool: generate_image. Use it with a prompt and optional fields to customize results.
  • When using large images or many steps, consider using the URL response_format to keep payloads smaller in transit.

Related MCP Servers

Sponsor this space

Reach thousands of developers