Skip to main content
Glama

wikivibe-images-mcp

MCP-сервер для генерации и редактирования изображений через WikiVibe. Работает в любом агенте с поддержкой MCP: OMP, Codex CLI, Claude Code, Cursor, opencode/Orca.

Поставил → сказал «сделай картинку через wikivibe» → получил файл.

┌──────────────┐
│ OMP          │─┐
│ Codex CLI    │─┤   stdio    ┌────────────────┐   HTTPS   ┌──────────────────┐
│ Claude Code  │─┼───────────▶│wikivibe-images │──────────▶│ api.wikivibe.ru  │
│ Cursor       │─┤            │  (один бандл)  │           │ /images/…        │
│ opencode     │─┘            └────────┬───────┘           └──────────────────┘
└──────────────┘                       │
                              ~/.wikivibe/credentials.json (0600)

Быстрый старт

npx -y wikivibe-images-mcp login        # сохранить ключ (один раз)
npx -y wikivibe-images-mcp setup all    # прописать сервер во все агенты

Перезапустить агент и попросить:

сделай картинку через wikivibe: рыжий кот в космическом шлеме, фотореализм

Агент вызовет generate_image, получит путь к файлу и покажет картинку.

setup без аргументов или с all обходит все клиенты; можно указать выборочно:

npx -y wikivibe-images-mcp setup omp codex

Доступные имена: omp, claude, codex, cursor, opencode (она же orca).

setup копирует собранный сервер в ~/.wikivibe/bin/wikivibe-images-mcp.js и прописывает именно этот путь. Конфиги агентов не зависят ни от каталога репозитория, ни от кэша npx: после обновления достаточно заново выполнить setup.

Related MCP server: image-gen-mcp

Ручная настройка

Если не хотите запускать setup, добавьте сервер сами. Везде ниже используется стабильная копия; вместо неё можно указать npx -y wikivibe-images-mcp mcp.

OMP — ~/.omp/agent/mcp.json:

{
  "mcpServers": {
    "wikivibe": {
      "command": "node",
      "args": ["/Users/YOU/.wikivibe/bin/wikivibe-images-mcp.js", "mcp"],
      "timeout": 300000
    }
  }
}

Codex CLI — ~/.codex/config.toml:

[mcp_servers.wikivibe]
command = "node"
args = ["/Users/YOU/.wikivibe/bin/wikivibe-images-mcp.js", "mcp"]
tool_timeout_sec = 300

Claude Code:

claude mcp add --scope user wikivibe -- node ~/.wikivibe/bin/wikivibe-images-mcp.js mcp

Cursor — ~/.cursor/mcp.json: тот же JSON, что и для OMP.

opencode / Orca — ~/.config/opencode/opencode.json:

{
  "mcp": {
    "wikivibe": {
      "type": "local",
      "command": ["node", "/Users/YOU/.wikivibe/bin/wikivibe-images-mcp.js", "mcp"],
      "enabled": true
    }
  }
}

Таймауты. Генерация одной картинки занимает 25–45 секунд, а клиенты по умолчанию обрывают MCP-вызов раньше. Поэтому в OMP нужен "timeout": 300000, в Codex — tool_timeout_sec = 300, в Claude Code — MCP_TOOL_TIMEOUT=300000 в окружении.

Инструменты

Инструмент

Параметры

Что делает

generate_image

prompt или prompts[], n, model, size, quality, output_path

создаёт изображения по тексту

edit_image

prompt, images[], n, model, size, quality, output_path

правит локальные файлы (inpainting, restyle, замена объектов)

list_image_models

—

какие image-модели доступны ключу

Каждый результат — путь к файлу на диске и сам файл как MCP image-блок, поэтому картинку видно и в агентах без доступа к файловой системе.

Несколько картинок за один вызов

// варианты одного промпта
{ "prompt": "керамическая чашка, продуктовое фото", "n": 3 }

// разные картинки
{ "prompts": ["лиса акварелью", "кит акварелью", "сова акварелью"] }

Максимум 4 изображения за вызов. Запросы идут строго последовательно: API WikiVibe не принимает n > 1 для gpt-image-* (апстрим отвечает unknown_parameter: tools[0].n), а параллельные вызовы роняют его в 502. Время растёт линейно — примерно 25–45 секунд на картинку.

Ключ API

Ключ хранится только в ~/.wikivibe/credentials.json (права 0600, каталог 0700). В конфиги агентов он не попадает — там лишь команда запуска.

wikivibe-images login                  # интерактивно, ввод скрыт
wikivibe-images login --key sk-…       # для CI
wikivibe-images import                 # подхватить WIKIVIBE_API_KEY из ~/.omp/.env или ./.env
wikivibe-images status                 # проверить ключ, base URL и доступные модели

Приоритет источников: WIKIVIBE_API_KEY → ~/.wikivibe/credentials.json.

Переменные окружения

Переменная

Назначение

WIKIVIBE_API_KEY

ключ, переопределяет сохранённый

WIKIVIBE_BASE_URL

по умолчанию https://api.wikivibe.ru/v1

WIKIVIBE_IMAGE_MODEL

модель по умолчанию (сейчас gpt-image-2.5)

WIKIVIBE_OUTPUT_DIR

куда складывать файлы (по умолчанию системный temp)

WIKIVIBE_CONFIG_DIR

где лежит credentials.json

CLI без агента

wikivibe-images image "постер: закат над морем, минимализм"
wikivibe-images models

wikivibe-images — это тот же файл, что лежит в ~/.wikivibe/bin/. Можно добавить в PATH:

ln -s ~/.wikivibe/bin/wikivibe-images-mcp.js /usr/local/bin/wikivibe-images

Ошибки

Что видно

Причина и что делать

401 / Unauthorized

ключ неверный или отозван → wikivibe-images login

403 image generation is disabled for this group

у группы ключа выключен allow_image_generation → включить в кабинете WikiVibe

400 unknown_parameter: 'tools[0].n'

апстрим не принимает n > 1; сервер сам разбивает на последовательные запросы — обновитесь и перезапустите setup

502 / 503

перегружен апстрим-провайдер; клиент делает одну повторную попытку через 12 с. Не запускайте несколько генераций параллельно

клиент оборвал вызов по таймауту

поднимите лимит MCP: timeout в OMP, tool_timeout_sec в Codex, MCP_TOOL_TIMEOUT в Claude Code

Разработка

Нужен Node.js 20+.

npm install
npm run typecheck
npm run build      # esbuild → dist/cli.js, самодостаточный бандл
node dist/cli.js status
node dist/cli.js setup omp

Проверка MCP-протокола вручную:

printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"probe","version":"1"}}}' \
  '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' | node dist/cli.js mcp

Структура:

Файл

Роль

src/cli.ts

команды login / status / setup / image, запуск сервера

src/server.ts

регистрация MCP-инструментов и схем

src/images.ts

генерация, редактирование, сохранение файлов

src/api.ts

HTTP-клиент: очередь, backoff, разбор ошибок

src/credentials.ts

хранение и поиск ключа

Ссылки

Лицензия

MIT

Available Tools

3 tools
edit_imageEdit image (WikiVibe)B

Edit one or more existing images with a prompt (inpainting, restyle, object changes). Reference images come from local file paths.

ParametersJSON Schema
NameRequiredDescriptionDefault
nNo
sizeNoOutput size. 1536x1024 is landscape, 1024x1536 is portrait.
modelNo
imagesYesLocal file paths of the source images.
promptYesWhat to change. Name each input image by role.
qualityNo
output_pathNo

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare the safety profile (readOnlyHint=false, idempotentHint=false, destructiveHint=false), lowering the burden on the description. The text adds the useful provenance fact that sources are local file paths rather than URLs, but says nothing about whether originals are modified, where results are written, or model/quality defaults.

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

Conciseness4/5

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

Two tight sentences, front-loaded with the verb and resource, with the parenthetical examples earning their place. The trailing sentence on local file paths partially duplicates the images schema description, but overall there is no padding.

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?

There is no output schema and the description never says what an edit returns or that output_path controls where the result lands. Combined with four undocumented parameters, an agent lacks enough context to invoke this confidently, especially around output handling.

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

Parameters2/5

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

Schema description coverage is only 43%: n, model, quality, and output_path carry no documentation anywhere. The description partially compensates for images and prompt semantics, but four of seven parameters remain entirely unexplained, so it does not meet the compensation burden for a low-coverage schema.

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?

States a specific verb and resource ('Edit one or more existing images with a prompt') and enumerates the edit modes (inpainting, restyle, object changes). The word 'existing' implicitly distinguishes it from generate_image, but it never names that sibling explicitly, so the differentiation is left for the agent to infer.

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

Usage Guidelines3/5

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

Usage is only implied: the tool applies when you already have source images on local disk. Neither generate_image nor list_image_models is named, and there is no statement of when to prefer editing over generating, or of prerequisites such as source image format/size.

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

generate_imageGenerate image (WikiVibe)A

Generate images from text through WikiVibe. Pass prompt for one image, prompts for several different images, or n for variations of the same prompt. Images run sequentially; up to 4 per call.

ParametersJSON Schema
NameRequiredDescriptionDefault
nNoVariations of `prompt` (default 1). Ignored when `prompts` is used.
sizeNoOutput size. 1536x1024 is landscape, 1024x1536 is portrait.
modelNoImage model id. Defaults to gpt-image-2.5.
promptNoWhat to draw. Be specific about subject, style, lighting.
promptsNoSeveral distinct prompts; one image each, generated sequentially.
qualityNo
output_pathNoExact file path for the first image.

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare the safety profile (not read-only, not idempotent, not destructive). The description adds real behavioral context beyond that: generation is sequential, and there is a hard cap of 4 images per call — both relevant for latency and cost planning. It does not say what is produced (files vs. inline data) or how output_path interacts with multi-image calls, so not a 5.

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?

Three short sentences, front-loaded with what the tool does and then the parameter triage. Every clause carries information; nothing is redundant padding.

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

Completeness4/5

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

For a 7-parameter, zero-required tool with no output schema, the description covers the key selection logic and the per-call cap. It leaves the return artifact unexplained (where images land, and how `output_path` behaves when several images are requested), which is the one gap an agent might hit.

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 86%, so the schema already documents almost every parameter including the `n`-ignored-when-`prompts` rule. The description restates the prompt/prompts/n triage in more readable form but adds no format, default, or constraint detail beyond the schema. Baseline 3 is appropriate.

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?

States a specific verb and resource ("Generate images from text") and names the backend (WikiVibe), which is enough for an agent to place it against edit_image and list_image_models. It does not explicitly contrast itself with either sibling, so it stops short of a 5.

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

Usage Guidelines4/5

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

Gives explicit mode-selection guidance: `prompt` for one image, `prompts` for several distinct images, `n` for variations of the same prompt. That is genuine when-to-use-which-parameter routing. It offers no guidance about when to prefer this tool over edit_image, and no exclusions, so it is a solid 4 rather than a 5.

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

list_image_modelsList image models (WikiVibe)A
Read-onlyIdempotent

List image-generation models available to the configured WikiVibe key.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is covered. The description adds one useful behavioral fact — results depend on the configured WikiVibe key — but says nothing about return shape, ordering, or whether the list can be empty for an unentitled key.

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?

A single sentence with no filler, front-loading the action and resource before the scope qualifier. Nothing could be removed without losing information.

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

Completeness3/5

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

For a zero-parameter, read-only tool with no output schema, the description covers what it does and the key scoping, but it never indicates what is returned (model identifiers/names) or that those values are meant to be fed to generate_image/edit_image — the one piece of context an agent actually needs.

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

Parameters4/5

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

The tool takes zero parameters, so per the baseline this dimension starts at 4. There is nothing for the description to disambiguate and it correctly makes no false claims about inputs.

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?

States a specific verb and resource ('List image-generation models') and adds a scope qualifier ('available to the configured WikiVibe key'). The listing verb naturally separates it from the action-oriented siblings generate_image and edit_image, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is only implied: an agent would infer this is a discovery step before generate_image/edit_image. There is no explicit statement of when to call it, no prerequisites, and no mention of the alternatives it feeds into.

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. 3 tool updatesv0.1.1
    • First observededit_image
    • First observedgenerate_image
    • First observedlist_image_models

TDQS

A3.7/5.0

Scored across 3 tools

Disambiguation5/5

The three tools have clearly distinct purposes: generate_image creates images, edit_image modifies existing images, and list_image_models enumerates available models. There is no overlap in resource or action, so an agent can easily select the right tool.

Naming Consistency5/5

All names use consistent snake_case with an imperative verb first: generate_image, edit_image, list_image_models. The pattern is predictable across the set, with only a minor difference in noun length for the listing tool.

Tool Count4/5

Three tools is a focused, reasonable size for an image-generation server, and each tool earns its place. It is slightly thin compared to servers that include retrieval or history operations, but not problematically so.

Completeness4/5

The set covers the core lifecycle: generating images, editing them, and discovering available models. Minor gaps exist, such as no explicit retrieval or deletion of generated images, but the primary workflows are supported.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables coding agents to generate and edit images using Gemini and OpenAI image models, saving files directly into the project with configurable providers, models, and security restrictions.
    3
    69 npm
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Generates and edits images using OpenAI GPT Image or Google Gemini models, saving every result to disk and returning local file paths so AI assistants can continue working with the images. It enables prompt-based image creation, editing, inpainting, multi-image composition, and model listing through MCP tools.
    1
    21 npm
    1
    Apache 2.0