laozhang-image MCP
Enables image generation and editing using laozhang.ai's OpenAI-compatible API, with tools for text-to-image and image-to-image transformations.
README
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 |
|---|---|
generate_image(prompt, size, quality, n) |
Text → image. Saves PNG(s), returns file path and source URL. |
edit_image(image_path, prompt, size, mask_path) |
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.
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.txt
Configure
| Env var | Default | Purpose |
|---|---|---|
LAOZHANG_API_KEY |
— (required) | your laozhang.ai key |
LAOZHANG_BASE_URL |
https://api.laozhang.ai/v1 |
API base URL |
LAOZHANG_MODEL |
gpt-image-2-vip |
model id |
LAOZHANG_OUT_DIR |
laozhang-images |
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.py
Or 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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.