# Labnana MCP [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/exoticknight/labnana-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 338  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/labnana-mcp

## Description
Generate and edit images with Labnana through a local MCP server with MCP Apps previews.

## Tools
Capabilities this server exposes over MCP:

- **get_subscription** — 获取当前 API Key 账户的订阅状态、可用积分（月度/永久/限时）、免费额度（freeUsages）与重置时间。
- **estimate_credits** — 根据模型、尺寸、宽高比等参数预估生成图片所需的积分。同步返回，不实际生成图片、不扣除积分。适合在批量生成或使用 4K 前先确认成本。
- **generate_image** — 文生图 / 图生图 / 改图的一站式工具：默认保存完整原图，同时返回有大小上限的 MCP 图片预览、结构化元数据和 JSON 文本兜底。大图（4K）会自动走异步任务并在内部等待完成，无需手动轮询。支持 Gemini 系列、GPT-Image-2 / 2.5、Wan2.7、Seedream 5.0 Pro，模型由 model 参数选择，无需指定提供商。
- **list_generation_tasks** — 按创建时间倒序返回当前 API Key 用户的图片生成任务历史，可按状态过滤。
- **get_generation_task** — 查询图片生成任务状态与结果。任务成功时返回统一结构化 envelope、有界 MCP 图片预览和原图 URL。generate_image 等待超时后可用返回的 taskId 在这里取回结果。

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "labnana-mcp": {
    "command": "npx",
    "args": ["-y","@exoticknight/labnana-mcp"],
    "env": {
      "LABNANA_API_KEY": "",
      "LABNANA_OUTPUT_DIR": ""
    }
  }
}
```

**Requires environment variables:** `LABNANA_API_KEY`, `LABNANA_OUTPUT_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Labnana MCP MCP server does

Labnana MCP exposes Labnana image-generation features as MCP tools for clients such as Claude Desktop, Claude Code, Cursor, and VS Code. The primary `generate_image` tool handles text prompts, reference-image workflows, and edits. It saves the original result locally and returns a client-friendly response containing an image preview, structured metadata, and JSON text.

The available model values cover several Labnana products: Google’s Nano Banana Pro and Nano Banana 2, OpenAI’s GPT-Image-2 and GPT-Image-2.5 variants, Alibaba’s Wan2.7 models, and ByteDance’s Seedream 5.0 Pro. Supported resolutions and model behavior vary, so callers should select the model and image settings appropriate to the task.

## How it works

The package runs as a local Node.js MCP process and communicates with Labnana’s API using an API key. Install it with `npx` or build the repository and launch the generated `dist/index.js` file. MCP clients invoke the exposed tools and receive results through the standard server connection.

`generate_image` accepts a model, prompt, optional reference images, and image configuration such as resolution and aspect ratio. Use `referenceImages` for image-to-image generation or editing. Full originals are written to disk, while previews are bounded to a maximum 1600-pixel edge and target a 2 MiB size ceiling. The response also identifies the saved file and public image URL when available.

For 4K requests, the server handles polling internally. If a generation call times out, `get_generation_task` can retrieve task details and public image URLs using the task identifier.

## Setup and configuration

Node.js 20.9 or newer is required. Create an API key in the Labnana API Keys console, then expose it to the MCP process through `LABNANA_API_KEY`.

A package-based configuration uses the following command:

```bash
npx -y @exoticknight/labnana-mcp
```

For a source checkout, run `npm install`, then `npm run build`, and configure the client to start `dist/index.js` with Node.js. Claude Code can add the package with `claude mcp add`; other clients use their equivalent MCP server configuration.

`LABNANA_OUTPUT_DIR` changes the default image destination. Without it, images are placed in `labnana-images/` below the working directory. The process also accepts `--api-key`, `--base-url`, and `--output-dir` command-line options, although environment variables avoid exposing credentials in the local process list. The default API endpoint is `https://api.labnana.com`.

## Tools and capabilities

- `generate_image` creates or edits images from prompts and optional reference images, with model, size, and aspect-ratio controls.
- `estimate_credits` calculates the expected credit cost without starting a generation.
- `get_subscription` reports subscription status, credit balances, and free-use information.
- `list_generation_tasks` returns paginated task history with optional status filtering.
- `get_generation_task` retrieves task details and public image URLs.

Responses use a consistent envelope with status, task ID, image dimensions, MIME type, byte length, checksum, URL, and local file path where applicable. Image base64 is returned through standard MCP image content rather than duplicated in text or structured metadata.

## Limitations and notes

Full 4K originals are saved or referenced by path and URL rather than embedded directly in the response. Client presentation differs: MCP Apps-capable hosts can render the image preview inline, while generic tool cards may display the JSON fallback. The model directory and API capabilities can change; `estimate_credits` should be used before generation when current pricing matters. Wan2.7 Image Pro supports 4K for text-to-image but limits reference-image generations to 2K.

_Full upstream README: https://allmcps.com/mcp/labnana-mcp/readme_

