Skip to main content
Glama
manascb1344

Image Generation MCP Server

by manascb1344

Сервер MCP для создания изображений

Сервер Model Context Protocol (MCP), который обеспечивает бесшовную генерацию высококачественных изображений с использованием модели Flux.1 Schnell через Together AI. Этот сервер предоставляет стандартизированный интерфейс для указания параметров генерации изображений.

Спросите DeepWiki

Функции

  • Генерация высококачественных изображений на основе модели Flux.1 Schnell

  • Поддержка настраиваемых размеров (ширина и высота)

  • Четкая обработка ошибок для быстрой проверки и решения проблем API

  • Простая интеграция с MCP-совместимыми клиентами

  • Возможность сохранения изображения на диск в формате PNG

Related MCP server: Image Generation MCP Server

Установка

npm install together-mcp

Или запустите напрямую:

npx together-mcp@latest

Конфигурация

Добавьте в конфигурацию вашего сервера MCP:

{
  "mcpServers": {
    "together-image-gen": {
      "command": "npx",
      "args": ["together-mcp@latest -y"],
      "env": {
        "TOGETHER_API_KEY": "<API KEY>"
      }
    }
  }
}

Использование

Сервер предоставляет один инструмент: generate_image

Использование generate_image

Этот инструмент имеет только один обязательный параметр - приглашение. Все остальные параметры являются необязательными и используют разумные значения по умолчанию, если не указаны.

Параметры

{
  // Required
  prompt: string;          // Text description of the image to generate

  // Optional with defaults
  model?: string;          // Default: "black-forest-labs/FLUX.1-schnell-Free"
  width?: number;          // Default: 1024 (min: 128, max: 2048)
  height?: number;         // Default: 768 (min: 128, max: 2048)
  steps?: number;          // Default: 1 (min: 1, max: 100)
  n?: number;             // Default: 1 (max: 4)
  response_format?: string; // Default: "b64_json" (options: ["b64_json", "url"])
  image_path?: string;     // Optional: Path to save the generated image as PNG
}

Пример минимального запроса

Требуется только подсказка:

{
  "name": "generate_image",
  "arguments": {
    "prompt": "A serene mountain landscape at sunset"
  }
}

Полный пример запроса с сохранением изображения

Переопределите все значения по умолчанию и укажите путь для сохранения изображения:

{
  "name": "generate_image",
  "arguments": {
    "prompt": "A serene mountain landscape at sunset",
    "width": 1024,
    "height": 768,
    "steps": 20,
    "n": 1,
    "response_format": "b64_json",
    "model": "black-forest-labs/FLUX.1-schnell-Free",
    "image_path": "/path/to/save/image.png"
  }
}

Формат ответа

Ответ будет представлять собой объект JSON, содержащий:

{
  "id": string,        // Generation ID
  "model": string,     // Model used
  "object": "list",
  "data": [
    {
      "timings": {
        "inference": number  // Time taken for inference
      },
      "index": number,      // Image index
      "b64_json": string    // Base64 encoded image data (if response_format is "b64_json")
      // OR
      "url": string        // URL to generated image (if response_format is "url")
    }
  ]
}

Если был указан image_path и сохранение прошло успешно, ответ будет включать подтверждение места сохранения.

Значения по умолчанию

Если в запросе не указано иное, используются следующие значения по умолчанию:

  • модель: "black-forest-labs/FLUX.1-schnell-Free"

  • ширина: 1024

  • рост: 768

  • шаги: 1

  • н: 1

  • response_format: "b64_json"

Важные примечания

  1. Требуется только параметр prompt

  2. Все необязательные параметры используют значения по умолчанию, если не указаны.

  3. При наличии параметры должны соответствовать ограничениям (например, диапазоны ширины/высоты)

  4. Ответы Base64 могут быть большими — используйте формат URL для больших изображений.

  5. При сохранении изображений убедитесь, что указанный каталог существует и доступен для записи.

Предпосылки

  • Node.js >= 16

  • Ключ API Together AI

    1. Войти на api.together.xyz

    2. Перейдите к настройкам API-ключей.

    3. Нажмите «Создать», чтобы сгенерировать новый ключ API.

    4. Скопируйте сгенерированный ключ для использования в вашей конфигурации MCP.

Зависимости

{
  "@modelcontextprotocol/sdk": "0.6.0",
  "axios": "^1.6.7"
}

Разработка

Клонируйте и соберите проект:

git clone https://github.com/manascb1344/together-mcp-server
cd together-mcp-server
npm install
npm run build

Доступные сценарии

  • npm run build — сборка проекта TypeScript

  • npm run watch — отслеживание изменений и пересборка

  • npm run inspector - Запустить инспектор MCP

Внося вклад

Вклады приветствуются! Пожалуйста, выполните следующие шаги:

  1. Форк репозитория

  2. Создать новую ветку ( feature/my-new-feature )

  3. Примите ваши изменения

  4. Подтолкните ветку к своей развилке

  5. Открыть запрос на извлечение

Запросы функций и отчеты об ошибках можно отправлять через GitHub Issues. Пожалуйста, проверьте существующие проблемы перед созданием новой.

В случае существенных изменений, пожалуйста, сначала откройте тему, чтобы обсудить предлагаемые вами изменения.

Лицензия

Этот проект лицензирован по лицензии MIT. Подробности см. в файле LICENSE.

Available Tools

1 tool
generate_imageC

Generate an image using Together AI API

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesText prompt for image generation
modelNoModel to use for generation (default: black-forest-labs/FLUX.1-schnell-Free)
widthNoImage width (default: 1024)
heightNoImage height (default: 768)
stepsNoNumber of inference steps (default: 1)
nNoNumber of images to generate (default: 1)
response_formatNoResponse format (default: b64_json)
image_pathNoOptional path to save the generated image as PNG

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the API provider but fails to describe critical behaviors like rate limits, authentication requirements, cost implications, error handling, or what happens when saving to 'image_path'. This leaves significant gaps for a tool with 8 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence that directly states the tool's purpose. There is zero wasted language, and it's front-loaded with the core functionality, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (8 parameters, no output schema, no annotations), the description is insufficient. It doesn't explain return values, error cases, or behavioral nuances, leaving the agent with incomplete information for proper tool invocation in a real-world context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 8 parameters. The description adds no additional parameter semantics beyond what's already in the schema, meeting the baseline score of 3 for high schema coverage without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Generate an image') and the target resource ('using Together AI API'), providing a specific verb+resource combination. However, with no sibling tools mentioned, there's no explicit differentiation from alternatives, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or context for invocation. It simply states what the tool does without any usage instructions or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.7
    • First observedgenerate_image

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool has a clear and distinct purpose, making it impossible for an agent to misselect between multiple options.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name 'generate_image' follows a clear verb_noun pattern, and there are no other tools to compare it against for inconsistency.

Tool Count2/5

A single tool is too few for a server named 'Image Generation MCP Server', which suggests a broader scope. While the tool covers basic generation, the lack of additional tools (e.g., for editing, listing, or managing images) makes the surface feel thin and incomplete for the implied domain.

Completeness2/5

The server is severely incomplete for an image generation domain. It only provides a generate_image tool, with no coverage for related operations like listing generated images, editing parameters, deleting images, or handling variations. This creates significant gaps that will likely cause agent failures in broader workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers