Skip to main content
Glama

uxmio-image-mcp

License: MIT Node.js >= 18.17 Zero Dependencies

中文文档 (README.zh-CN.md) | API Console (api.uxmio.com) | Web Studio (image.uxmio.com)

A zero-dependency Model Context Protocol (MCP) server and CLI that lets Claude Code, Cursor, Windsurf, Cline, Cherry Studio, and any MCP client generate and edit images directly into your workspace via standard OpenAI-compatible /v1/images/generations and /v1/images/edits endpoints.

Works out of the box with api.uxmio.com (pay-as-you-go per image from ¥0.01 / ~$0.0014, no monthly subscription) — or point UXMIO_API_BASE_URL to any OpenAI-compatible image provider (OpenAI, NewAPI, OneAPI, self-hosted relays).


Highlights

  • Zero runtime dependencies: pure Node.js 18+ ESM (fetch, FormData, Blob), starts in milliseconds via npx.

  • Generate & Multi-Image Edit: supports both text-to-image (generate_image) and 1–4 reference image editing (edit_image).

  • Workspace-friendly: pass output_path to save PNG/JPG/WebP assets straight into ./public/, ./assets/, or any project folder, while also returning inline MCP image previews.

  • Dual Mode (MCP + CLI): run as an MCP stdio server for AI coding assistants, or invoke directly from shell scripts and CI pipelines.

  • Provider-agnostic: defaults to https://api.uxmio.com/v1, fully compatible with any standard /v1/images/* endpoint.


Related MCP server: gpt-image-mcp

Supported Models & Reference Pricing (api.uxmio.com)

Model ID

Family

Price (CNY)

Approx. USD

Recommended Use Case

gpt-image-2

GPT Image

¥0.01 / img

~$0.0014

Fast drafts, icons, placeholders, high-volume batch runs

gpt-image-2.5 (default)

GPT Image

¥0.01 / img

~$0.0014

Best cost-performance default for general generation & edits

gpt-image-2.6

GPT Image

¥0.03 / img

~$0.0041

Richer lighting, sharper textures, complex scenes

gemini-3.1-flash-image

Nano Banana 2

¥0.06 / img

~$0.0082

Accurate CJK/English typography, posters, e-commerce product edits

gemini-3-pro-image

Nano Banana Pro

¥0.09 / img

~$0.0123

Flagship studio photography & strict multi-reference consistency

Need a key? Register at api.uxmio.com (pay-as-you-go, balance shared with the image.uxmio.com web workbench).


Quick Start (MCP Clients)

1. Claude Code

claude mcp add uxmio-image \
  -e UXMIO_API_KEY=sk-your-api-key \
  -- npx -y github:chunge233/uxmio-image-mcp

2. Cursor / Windsurf / Cline / Cherry Studio

Add to your MCP config (~/.cursor/mcp.json, Claude Desktop claude_desktop_config.json, or client MCP settings):

{
  "mcpServers": {
    "uxmio-image": {
      "command": "npx",
      "args": ["-y", "github:chunge233/uxmio-image-mcp"],
      "env": {
        "UXMIO_API_KEY": "sk-your-api-key",
        "UXMIO_API_BASE_URL": "https://api.uxmio.com/v1",
        "UXMIO_DEFAULT_MODEL": "gpt-image-2.5"
      }
    }
  }
}

3. Local Clone (Zero Network Startup)

git clone https://github.com/chunge233/uxmio-image-mcp.git

Then configure "command": "node" and "args": ["/absolute/path/to/uxmio-image-mcp/bin/uxmio-image-mcp.mjs"].


Exposed MCP Tools

Tool

Description

Key Parameters

list_image_models

Lists available models, pricing, active endpoint, and recommended use cases

(none)

generate_image

Generates 1–4 images from a text prompt and optionally writes them to disk

prompt (required), model, size, quality, n, response_format, output_path

edit_image

Edits or combines 1–4 local images (PNG/JPG/WebP) using a text instruction

prompt (required), image_paths (required), model, size, quality, output_path

Example Prompts Inside Cursor / Claude Code

  • "Generate a 1536x1024 dark-mode SaaS hero illustration with gpt-image-2.5 and save it to public/images/hero.png."

  • "Use edit_image with gemini-3.1-flash-image on assets/bottle.png to place it on a sunlit marble counter with soft shadows and save to assets/bottle-studio.png."


CLI Usage

# List models & pricing
npx -y github:chunge233/uxmio-image-mcp models

# Text-to-image
UXMIO_API_KEY=sk-your-key npx -y github:chunge233/uxmio-image-mcp generate \
  "Minimalist ceramic coffee cup on oak desk, studio lighting" \
  --model gpt-image-2.5 --size 1024x1024 --out ./coffee.png

# Multi-image reference editing
UXMIO_API_KEY=sk-your-key npx -y github:chunge233/uxmio-image-mcp edit \
  "Change the background to a warm Scandinavian studio, preserve product label" \
  --image ./raw-product.png --model gemini-3.1-flash-image --out ./studio-product.png

Environment Variables

Variable

Default

Description

UXMIO_API_KEY

(required)

API key (falls back to OPENAI_API_KEY)

UXMIO_API_BASE_URL

https://api.uxmio.com/v1

OpenAI-compatible base URL (falls back to OPENAI_BASE_URL)

UXMIO_DEFAULT_MODEL

gpt-image-2.5

Default model when model is omitted

UXMIO_OUTPUT_DIR

(none)

Optional default directory to auto-save images when output_path is omitted

UXMIO_TIMEOUT_MS

120000

Request timeout in milliseconds (5000–600000)


SDK & Workflow Examples

Ready-to-run snippets are included in examples/:


Development & Tests

npm test

All tests run with Node's built-in node:test runner against an in-process mock HTTP server — no external network or API key required.

License

MIT

Available Tools

3 tools
edit_imageA

Edit or compose 1-4 local reference images using a text prompt via /v1/images/edits (multipart upload). Great for product photography retouching, background replacement, style transfer, and UI mockups.

Inputs: prompt (required), image_paths (required), size, model, +4 more.

generate_imageC

Generate an AI image from a text prompt via an OpenAI-compatible /v1/images/generations endpoint (default: api.uxmio.com). Supports saving directly to disk via output_path.

Inputs: prompt (required), n, size, model, +4 more.

list_image_modelsA

List supported AI image generation and editing models, per-image pricing, and recommended use cases.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: listing models is read-only discovery, generate_image is text-to-image, and edit_image is image-to-image/composition with reference uploads. There is no overlap in resource or action, so misselection is unlikely.

    Naming Consistency5/5

    All three follow a strict verb_noun snake_case pattern (list_image_models, generate_image, edit_image). The convention is uniform and predictable.

    Tool Count4/5

    Three tools is on the low end but each maps to a core capability of an image API with no filler. It is well-scoped for a focused generation/edit service, though slightly thin if users expect batch or utility operations.

    Completeness4/5

    The surface covers the main lifecycle: discover models/pricing, generate, and edit/compose. Minor gaps exist (no job status, upscaling, variations, or listing previously saved outputs), but agents can accomplish core workflows without dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers