Together AI Image Server
A MCP server that enables Claude and other MCP-compatible assistants to generate images from text prompts using Together AI's image generation models.
zym9863
Tools
generate_image
Generate image from text prompt using Together AI API
README
Together AI Image Server
English | 简体中文
A TypeScript-based MCP (Model Context Protocol) server for generating images using Together AI API.
<a href="https://glama.ai/mcp/servers/p1ctvg1l87"> <img width="380" height="200" src="https://glama.ai/mcp/servers/p1ctvg1l87/badge" alt="Together AI Image Server MCP server" /> </a>
Overview
This server provides a simple interface to generate images using Together AI's image generation models through the MCP protocol. It allows Claude and other MCP-compatible assistants to generate images based on text prompts.
Features
Tools
generate_image
- Generate images from text prompts- Takes a text prompt as required parameter
- Optional parameters for controlling generation steps and number of images
- Returns URLs and local paths to generated images
Prerequisites
- Node.js (v14 or later recommended)
- Together AI API key
Installation
# Clone the repository
git clone https://github.com/zym9863/together-ai-image-server.git
cd together-ai-image-server
# Install dependencies
npm install
Configuration
Set your Together AI API key as an environment variable:
# On Linux/macOS
export TOGETHER_API_KEY="your-api-key-here"
# On Windows (Command Prompt)
set TOGETHER_API_KEY=your-api-key-here
# On Windows (PowerShell)
$env:TOGETHER_API_KEY="your-api-key-here"
Alternatively, you can create a .env
file in the project root:
TOGETHER_API_KEY=your-api-key-here
Development
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
Usage with Claude Desktop
To use with Claude Desktop, add the server config:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"Together AI Image Server": {
"command": "/path/to/together-ai-image-server/build/index.js"
}
}
}
Replace /path/to/together-ai-image-server
with the actual path to your installation.
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
API Reference
generate_image
Generates images based on a text prompt using Together AI's image generation API.
Parameters:
prompt
(string, required): Text prompt for image generationsteps
(number, optional, default: 4): Number of diffusion steps (1-4)n
(number, optional, default: 1): Number of images to generate (1-4)
Returns:
JSON object containing:
image_urls
: Array of URLs to the generated imageslocal_paths
: Array of paths to locally cached images
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Recommended Servers
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
@kazuph/mcp-fetch
Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
mcp-pinterest
A Pinterest Model Context Protocol (MCP) server for image search and information retrieval
DeepSRT MCP Server
An MCP server that enables users to generate summaries of YouTube videos in multiple languages and formats through integration with DeepSRT's API.
ScreenshotOne MCP Server
An official MCP server implementation that allows AI assistants to capture website screenshots through the ScreenshotOne API, enabling visual context from web pages during conversations.
Glif
Run AI workflows hosted on Glif.app via MCP, including ComfyUI-based image generators, meme generators, selfies, chained LLM calls, and more
WebPerfect MCP Server
An intelligent MCP server with a fully automated batch pipeline for web-ready images. Features include noise reduction, auto levels/curves, JPEG artifact removal, 4K resizing, smart sharpening with shadow/highlight enhancement, and advanced WebP conversion.
Stealth Browser MCP Server
Provides stealth browser capabilities using Playwright with anti-detection techniques, allowing MCP clients to navigate websites and take screenshots while evading common bot detection systems.
MCP-LOGO-GEN
MCP Tool Server for Logo Generation. This server provides logo generation capabilities using FAL AI, with tools for image generation, background removal, and image scaling.