# NovelAI Image MCP [Health: Active]

**Category:** 🎥 Multimedia Process  
**Repository:** https://github.com/xinvxueyuan/NovelAI-Image-MCP  
**GitHub Stars:** 14  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/novelai-image-mcp

## Description
NovelAI image generation as MCP tools: txt2img, img2img, inpaint, upscale, Director, ControlNet.

## Tools
Capabilities this server exposes over MCP:

- **generate_image** — Text-to-image (V3 / V4 / V4.5 / V5 models, character prompts; vibes V4/V4.5 only)
- **image_to_image** — Image-to-image with strength/noise
- **inpaint** — Inpainting (requires an inpaint model + mask)
- **upscale_image** — 4× upscale (V5 model)
- **director_tool** — Line art / sketch / bg-removal / declutter / colorize / emotion
- **annotate_image** — ControlNet annotation (hed, midas, scribble, mlsd, uniformer)
- **suggest_tags** — Prompt tag suggestions
- **encode_vibe** — Encode a reference image into a vibe token
- **get_subscription** — Account subscription + Anlas balance
- **get_user_data** — Account user data
- **estimate_anlas_cost** — Estimate Anlas cost for a generation (no API call)

## Claude Desktop Quick Installation
Install path inferred — verify against the README before running it. Uses `uvx` (confidence: medium):

```json
"mcpServers": {
  "novelai-image-mcp": {
    "command": "uvx",
    "args": ["novelai-image-mcp"],
    "env": {
      "NOVELAI_TOKEN": "",
      "NOVELAI_USERNAME": "",
      "NOVELAI_PASSWORD": ""
    }
  }
}
```

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

## Documentation

## What NovelAI Image MCP does

NovelAI Image MCP exposes NovelAI image operations through the Model Context Protocol. Agents can generate images from text, transform an input image, apply masked inpainting, upscale an image by 4×, and run Director operations such as line-art extraction, sketch conversion, background removal, decluttering, colorization, and emotion editing.

The tool set also covers supporting tasks. Agents can request prompt tag suggestions, encode a reference image as a vibe token, annotate images for ControlNet workflows, inspect subscription and Anlas balance data, retrieve user information, and calculate an estimated Anlas cost without making a generation request.

Generated results are available in two forms: an MCP `Image` content block containing base64 data and a PNG written to disk with its path returned as text. The project also includes prompts for prompt writing and workflow sequencing, plus resources for model, sampler, default, and generated-output information.

## How it works

The server is built with FastMCP and uses an asynchronous NovelAI client underneath its MCP interface. Local agents communicate through stdio. Remote or shared deployments can use HTTP at the server's `/mcp` endpoint, optionally requiring a bearer token through `MCP_AUTH_TOKEN`.

Calls use structured, enum-validated tool schemas. Routing and audit behavior is enabled by default: requests receive route-specific output directories and loggers, while an append-only JSONL audit trail records activity without writing prompts or credentials verbatim. The `X-MCP-Insiders: false` header can restore the flatter, unaudited behavior for a client, and the behavior can also be changed server-wide.

A synchronous command-line interface wraps the same image operations for shell scripts, CI jobs, and one-off commands. It saves PNG files and prints their paths instead of returning MCP image blocks.

## Setup and configuration

Install the published package with `pip install novelai-image-mcp`, or install the source workspace with `uv sync`. Start a local server with `novelai-image-mcp serve` or `uv run python -m novelai_image_mcp serve`. Set `MCP_TRANSPORT=http` before starting to use HTTP instead of the default stdio transport.

Authentication uses a NovelAI token through `NOVELAI_TOKEN`, or a NovelAI username and password through `NOVELAI_USERNAME` and `NOVELAI_PASSWORD`. Image-producing commands write to `outputs` by default; `NOVELAI_OUTPUT_DIR` or the CLI's `--output-dir` option can change that location.

MCP hosts configure the server under `mcpServers`. The repository includes examples for Claude Desktop and Cline, and the package can also be run through `uvx novelai-image-mcp serve`. Docker Compose is available for HTTP deployment.

## Tools and capabilities

- `generate_image`: text-to-image generation with V3, V4, V4.5, and V5 models; character prompts and V4/V4.5 vibes are supported.
- `image_to_image`: transform an existing image with strength and noise controls.
- `inpaint`: edit masked areas using an inpaint model and mask.
- `upscale_image`: perform 4× upscaling with a V5 model.
- `director_tool`: run line-art, sketch, background-removal, declutter, colorize, or emotion operations.
- `annotate_image`: produce ControlNet annotations using HED, MiDaS, scribble, MLSD, or Uniformer options.
- `suggest_tags`, `encode_vibe`, `get_subscription`, `get_user_data`, and `estimate_anlas_cost` provide prompt, reference-image, account, and cost utilities.

## Limitations and notes

Upscaling requires a V5 model. Inpainting requires both an inpaint model and a mask. Vibe support is limited to V4 and V4.5 models. The server depends on NovelAI credentials for account-backed operations and image generation, while Anlas estimation can run without an API call. Node tooling is used for repository development; the MCP server itself has no Node runtime dependencies.

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

