Skip to main content
Glama

@dreamlayer/mcp

Инструменты генерации и редактирования изображений для MCP-совместимых ИИ-клиентов, работающие на основе DreamLayer Agent API.

Не нужно ничего клонировать и собирать.

Установка

Добавьте его в свой клиент. Claude Code:

claude mcp add dreamlayer --env DREAMLAYER_API_KEY=dlr_live_your_key -- npx -y @dreamlayer/mcp

Codex:

codex mcp add dreamlayer --env DREAMLAYER_API_KEY=dlr_live_your_key -- npx -y @dreamlayer/mcp

Cursor или любой другой stdio MCP-клиент:

{
  "mcpServers": {
    "dreamlayer": {
      "command": "npx",
      "args": ["-y", "@dreamlayer/mcp"],
      "env": { "DREAMLAYER_API_KEY": "dlr_live_your_key" }
    }
  }
}

Ключ должен находиться в собственном окружении сервера. MCP-клиенты запускают его как подпроцесс, поэтому ключ, экспортированный в вашей оболочке, до него не дойдёт. Это самая частая ошибка настройки; сервер завершает работу с объяснением, а не запускается сломанным.

Получите ключ на platform.dreamlayer.io. Новый аккаунт начинает с нуля кредитов, и каждое готовое изображение стоит один кредит.

Related MCP server: Dreamshot MCP Server

Инструменты

Tool

Что делает

dreamlayer_capabilities

Читает контракт и операции, которые может выполнять этот ключ. Ничего не тратит.

dreamlayer_upload_image

Загружает PNG, JPEG, WebP или RAW с камеры (до 200 МБ) и возвращает input_asset_id.

dreamlayer_generate

Генерирует или редактирует. Возвращает поток событий.

dreamlayer_execution

Читает каноническое состояние одного выполнения.

dreamlayer_events

Возобновляет поток после обрыва, начиная с последнего идентификатора события.

dreamlayer_cancel

Отменяет до отправки.

Операции

Если опустить operation, DreamLayer прочитает подсказку, которая может вернуться с уточняющим вопросом. Если указать её, этот вывод полностью пропускается.

operation

Нужно изображение

Результат

text_to_image

Нет

Новое изображение по подсказке

image_to_image

Да

Ссылка, отредактированная как описано

background_remove

Да

Объект на прозрачном фоне

upscale

Да

Вдвое больше по ширине и высоте

upscale удваивает каждую сторону, а готовые изображения ограничены 4096 по каждой стороне, поэтому самая длинная сторона вашего входа должна быть 2048 или меньше. Более крупное изображение будет отклонено до того, как потратит кредит.

Поведение, о котором стоит знать

Вопрос — это не ошибка. Неоднозначная подсказка возвращает событие question, заканчивающееся на needs_input. Ответьте на него, снова вызвав dreamlayer_generate с параметрами respond и conversation_id.

Повторные попытки безопасны, если вы используете тот же ключ. Для вас генерируется idempotency_key. Передайте тот же самый ключ для повторной попытки после неопределённого ответа, и исходный результат воспроизведётся, а не будет оплачен дважды.

Долгие выполнения усекаются, но не теряются. Поток, содержащий более 256 событий, возвращает то, что есть, помечает truncated и даёт вам execution_id и идентификатор последнего события, с которого можно продолжить.

Требования

Node.js 22.12 или новее.

Лицензия

MIT. См. LICENSE и NOTICE.

Available Tools

7 tools
dreamlayer_balanceA
Read-onlyIdempotent

Use before paid image work to check available credits for this API key. Returns promotional, purchased, available and credit_usd. Compare the complete rounded quote against available; separately rounded buckets may sum to 0.1 less. Costs no credits and does not buy credits. Resolve authentication or balance errors before generation.

Inputs: no named parameters. Returns: error, available, purchased, credit_usd, +1 more

dreamlayer_capabilitiesA
Read-onlyIdempotent

Use before choosing an image operation or quoting a sprite job. Read supported operations, input limits and sprite_pricing for this API key. Returns the current API contract; no image input, generation or credits required. Do not use this to create an asset.

Inputs: no named parameters. Returns: error, operations, api_version

dreamlayer_downloadA

Use when an existing execution completed or a previous download failed. Requires execution_id and an absolute new local path. Saves the finished image or sprite ZIP and returns path/bytes; starts no generation and spends no new credits. Never overwrites. For output_not_ready check status; for local_output_failed repair the path and download the same execution.

Inputs: path (required), execution_id (required). Returns: path, bytes, error

dreamlayer_eventsA
Read-onlyIdempotent

Use to resume running work or a dropped stream without another generation charge. Requires execution_id; pass the last_event_id actually processed. Returns bounded events, status and recovery cursor. If still running or rate-limited, back off before polling again. Do not repeatedly call in a tight loop or submit replacement work.

Inputs: execution_id (required), last_event_id. Returns: asset, error, events, status, +3 more

dreamlayer_executionA
Read-onlyIdempotent

Use after a timeout, rate limit or uncertain result to read the existing execution's canonical status. Requires execution_id; costs no credits. Returns state and result details, not a newly generated image. If running, wait and resume events; if completed, download. Do not replace an uncertain paid job.

Inputs: execution_id (required). Returns: error, status, image_job, execution_id

dreamlayer_generateA

Use when the user needs an original image, raster logo concept, product or marketing visual, an edit, transparent cutout, upscale, or reference-based sprite animation. Starts paid work within the user's authorized scope and budget. Text-to-image needs a prompt; other operations need input_asset_id. Select operation explicitly. Image operations cost one credit; sprite beta accepts 7–100 frames and returns a ZIP. Read sprite_pricing, round the whole quote upward once to 0.1 credit and set max_credits. Returns execution_id, status, asset, question and last_event_id. needs_input is a question; running work must be resumed, not replaced. No sprite cancellation; failed/expired holds are restored. Not a vector-logo, print-validation, product-fidelity or animation-quality guarantee.

Inputs: prompt, options, respond, operation, +5 more. Returns: asset, error, events, status, +3 more

dreamlayer_upload_imageA

Use when an edit, background removal, upscale or sprite animation needs a local reference. Requires an absolute path to PNG, JPEG, WebP or supported camera RAW, up to 200 MB. Uploads that file and returns input_asset_id; starts no paid work. Reuse the asset ID for recovery. Not needed for text-to-image. If upload fails, fix the input or retry upload only.

Inputs: path (required). Returns: error, expires_at, input_asset_id

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools are clearly distinct: balance, capabilities, generate, upload_image, and download each have a single obvious purpose. The only potential confusion is between execution and events, since both take an execution_id and serve post-generation recovery, but their descriptions separate status checking from stream resumption well.

    Naming Consistency3/5

    All tools share the dreamlayer_ prefix and snake_case style, but the naming pattern is inconsistent: balance, capabilities, events, and execution are nouns, while download, generate, and upload_image are verbs or verb_noun. It remains readable and predictable in prefix, but not a uniform verb_noun convention.

    Tool Count5/5

    Seven tools is a well-scoped set for a paid async image generation workflow. Each tool covers a necessary stage—checking credits, reading contract terms, uploading inputs, generating, checking status, resuming streams, and downloading results—without bloat.

    Completeness4/5

    The lifecycle is well covered: billing check, capability discovery, upload, generation, status retrieval, event resumption, and download. Minor gaps exist around asset management and cancellation, but the descriptions indicate these are either unnecessary or unsupported rather than critical missing operations.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables image generation and multi-turn editing sessions using the Gemini API within MCP-compatible environments. Users can create, modify, and configure images through natural language commands, supporting features like aspect ratio adjustments and session-based image transformations.
      5
      ISC
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI image and video generation using Dreamshot's API, supporting tools like image editing, video creation, and enhancement directly from MCP-compatible clients.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables coding agents and other MCP clients to generate images from text prompts and edit, restyle, or extend existing images through an OpenAI-compatible /v1/images API. Results are returned both inline as image content blocks and as files saved to disk, so agents can view and reuse them within a normal task.
      1
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables generating and editing images from any MCP client by rewriting requests into detailed prompts and routing them to Gemini, OpenAI, or BytePlus Seedream, with configurable quality presets, aspect ratios, and image sizes. Results are saved to disk and returned to the assistant as MCP resources.
      1,225 npm
      MIT