laozhang-image MCP
Provides tools for generating and editing images via OpenAI's image API through the laozhang.ai proxy, allowing text-to-image and image-to-image transformations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@laozhang-image MCPGenerate a 2k landscape image of a mountain lake at sunrise"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
laozhang-image MCP
An MCP server that exposes image generation
and editing through laozhang.ai — an
OpenAI-compatible API proxy/aggregator. Default model: gpt-image-2-vip
(flat ~$0.03 per image).
Works with any MCP client (Claude Code, Claude Desktop, etc.). The API key is read from the environment and never stored in code.
What it does
laozhang.ai mirrors the OpenAI Image API (/v1/images/generations,
/v1/images/edits) but with its own models and pricing. This server wraps those
endpoints as two MCP tools:
Tool | Description |
| Text → image. Saves PNG(s), returns file path and source URL. |
| Image → image. Edits an existing picture from a prompt (optional mask). |
size accepts presets 1k / 2k / 4k, square / landscape / portrait,
auto, or an explicit WxH like 1024x1536.
Related MCP server: Media Generator MCP
Install
git clone https://github.com/agentseo/laozhang-image-mcp.git
cd laozhang-image-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txtConfigure
Env var | Default | Purpose |
| — (required) | your laozhang.ai key |
|
| API base URL |
|
| model id |
|
| where PNGs are saved |
Connect to Claude Code
claude mcp add laozhang-image -s user \
-e LAOZHANG_API_KEY=sk-your-key \
-e LAOZHANG_MODEL=gpt-image-2-vip \
-- /path/to/laozhang-image-mcp/.venv/bin/python \
/path/to/laozhang-image-mcp/server.pyOr edit your config manually — see mcp.example.json.
Verify with claude mcp list (expect ✓ connected).
Sanity check (plain curl)
curl https://api.laozhang.ai/v1/images/generations \
-H "Authorization: Bearer $LAOZHANG_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-2-vip","prompt":"a red fox","n":1,"size":"1024x1024"}'Русский
MCP-сервер для генерации и редактирования картинок через
laozhang.ai — OpenAI-совместимый прокси-агрегатор.
Модель по умолчанию gpt-image-2-vip (~$0.03 за картинку). Подходит для
любого MCP-клиента (Claude Code, Claude Desktop).
Что делает. laozhang.ai повторяет формат OpenAI Image API, но со своими моделями и ценами. Сервер оборачивает это в два инструмента:
generate_image(prompt, size, quality, n)— текст → картинка. Сохраняет PNG, возвращает путь к файлу и URL.edit_image(image_path, prompt, size, mask_path)— картинка → картинка. Редактирует существующее изображение по описанию (можно с маской).
size: пресеты 1k / 2k / 4k, square / landscape / portrait, auto,
либо явно 1024x1536.
Ключ не хранится в коде — берётся из переменной окружения LAOZHANG_API_KEY
(см. таблицу выше). Установка и подключение — в английской секции.
License
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Generate images with your own ChatGPT subscription (Plus, Pro or Team), without spending API credits
Create images and videos from prompts, with options for image mixing, reference images, and start/…
Image & PDF tools for AI agents: compress, convert, resize, PDF, AI vision, pipeline.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables image generation and editing using OpenAI's GPT Image API (gpt-image-1, 1.5, 2) with support for multi-image generation, history management, and batch processing.12108 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables image and video generation from text, image editing, and text-to-video workflows using AI models via OpenRouter and fal.ai.MIT
- AlicenseBqualityBmaintenanceEnables generating images from text or transforming existing images using GPT-Image-compatible APIs, with support for OpenAI and Agnes AI backends.2MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to generate and edit images via the ChongPlus Image API, with secure API key management and local file saving.5Apache 2.0