NovelAI-Image-MCP
MCP server for integrating NovelAI Image generation into AI agents.
Install / Use
claude mcp add xinvxueyuan -- npx -y github:xinvxueyuan/NovelAI-Image-MCPIf the server publishes to npm under a different name, use that package instead β check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
OtherSupported Platforms
Our assessment of NovelAI-Image-MCP
NovelAI-Image-MCP scores 80/100 on our quality scale, 229th of 263 Other skills we index.
Its MCP Server is 12 KB long, well organised into 28 sections with 12 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 2 days ago, so NovelAI-Image-MCP is actively maintained.
- Our last check on 2026-08-17 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit β read the skill file before letting an agent act on it.
NovelAI-Image-MCP compared with similar skills
All 4 of these similar skills score higher than NovelAI-Image-MCP; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| NovelAI-Image-MCP (this skill)by xinvxueyuan | 80 | 10 | 2d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 97.6k | today | CLAUDE.md |
| taste-skillby Leonxlnx | 100 | 97.0k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.4k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.4k | today | CLAUDE.md |
Frequently asked questions
- How do I install NovelAI-Image-MCP?
- Run
claude mcp add xinvxueyuan -- npx -y github:xinvxueyuan/NovelAI-Image-MCP. The install tabs above show the steps for each supported agent. - Which AI agents does NovelAI-Image-MCP work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is NovelAI-Image-MCP safe to use?
- It is MIT-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is NovelAI-Image-MCP still maintained?
- The repository was last updated 2 days ago, so NovelAI-Image-MCP is actively maintained.
Skill content
View source on GitHubNovelAI Image MCP
An MCP (Model Context Protocol) server that exposes NovelAI image generation as tools for AI agents (Claude Desktop, Cline, custom agents, remote clients).
Built on the official MCP Python SDK v2 (MCPServer), it lets an agent generate
images (txt2img / img2img / inpaint), upscale, run Director tools (line art,
emotion, background removal, β¦), annotate with ControlNet, suggest tags, encode
vibes, and query account subscription β all through the standard MCP tool
interface.
π Documentation: xinvxueyuan.github.io/NovelAI-Image-MCP
Features
- 11 MCP tools covering the full NovelAI image API surface.
- Two transports: stdio (local agents) + streamable-http (remote / multi-client).
- Dual image return: base64
Imagecontent blocks (the agent sees the image) and PNG saved to disk (path returned as text). - Async + sync: async tool handlers + a
typerCLI for direct invocation. - Monorepo: uv workspace (Python) + pnpm workspace (Node tooling) orchestrated by Turbo; MIT-licensed, Docker-ready, GitHub Pages docs.
Repository layout
This is a uv + pnpm monorepo:
NovelAI-Image-MCP/
βββ apps/
β βββ server/ # MCP server (the installable PyPI package)
β β βββ src/novelai_image_mcp/ # 11 MCP tools + NovelAI HTTP client
β β βββ tests/
β β βββ docker/ # smoke-test entrypoint
β β βββ Dockerfile # built with repo root as context
β β βββ pyproject.toml # ruff / pyright / pytest config
β βββ docs/ # Sphinx documentation site
β βββ source/ # MyST Markdown + conf.py
β βββ Makefile
β βββ pyproject.toml
βββ .github/ # workflows, CODEOWNERS, issue templates
βββ pyproject.toml # uv workspace root (virtual)
βββ uv.lock # single shared lockfile
βββ pnpm-workspace.yaml # pnpm workspace declaration
βββ pnpm-lock.yaml # Node toolchain lockfile
βββ turbo.json # cross-workspace task graph
βββ package.json # root scripts + dev toolchain
βββ docker-compose.yml # local container orchestration
See CONTRIBUTING.md for the developer guide and
apps/docs/source/ for the full documentation source.
Quick start
Install from source (development)
# 1. Clone
git clone https://github.com/xinvxueyuan/NovelAI-Image-MCP.git
cd NovelAI-Image-MCP
# 2. Sync the uv workspace (installs server + docs + dev tools)
uv sync
# 3. Configure credentials
cp .env.example .env
# set NOVELAI_TOKEN=... (preferred)
# or NOVELAI_USERNAME + NOVELAI_PASSWORD
# 4. Run (stdio β for local agents)
uv run python -m novelai_image_mcp serve
# 5. Or over HTTP
MCP_TRANSPORT=streamable-http uv run python -m novelai_image_mcp serve
# β http://127.0.0.1:8000/mcp
Install from PyPI (runtime only)
pip install novelai-image-mcp
export NOVELAI_TOKEN=pst-...
novelai-image-mcp serve
Optional: Node tooling (contributors)
If you plan to contribute, install the cross-cutting Node toolchain (turbo, husky, markdownlint) via pnpm:
corepack enable pnpm # one-time
pnpm install --frozen-lockfile
This wires the husky pre-commit + commit-msg hooks and gives you turbo /
markdownlint-cli2 for local development. The MCP server has zero Node
runtime dependencies β this step is only for contributors.
Connect an agent
The MCP server supports two transports (stdio + http), all configured under
mcpServers:
stdio (local agent β Claude Desktop / Cline)
claude_desktop_config.json:
{
"mcpServers": {
"novelai-image": {
"type": "stdio",
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/NovelAI-Image-MCP",
"python",
"-m",
"novelai_image_mcp",
"serve"
],
"env": {
"NOVELAI_TOKEN": "${input:novelai_token}"
}
}
}
}
Alternative: uvx (published package)
{
"mcpServers": {
"novelai-image": {
"command": "uvx",
"args": ["novelai-image-mcp", "serve"],
"env": { "NOVELAI_TOKEN": "pst-β¦[redacted]" }
}
}
}
Set NOVELAI_TOKEN (or NOVELAI_USERNAME + NOVELAI_PASSWORD) in the host
environment before launching β uvx inherits the parent shell env.
http (remote / Docker deployment)
After docker compose up --build (server listens on http://HOST:8000/mcp):
{
"mcpServers": {
"novelai-image-http": {
"type": "http",
"url": "http://127.0.0.1:8000/mcp",
"headers": {
"Authorization": "Bearer pst-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
Replace http://127.0.0.1:8000/mcp with your self-deployed endpoint (e.g.
https://mcp.example.com/mcp behind a TLS-terminating reverse proxy). Swap
the literal token placeholder for a host-managed secret reference if your
MCP host supports one (Claude Desktop, Cline, etc. expose this via their
own secrets UI).
CLI (sync, for scripting)
uv run python -m novelai_image_mcp generate --prompt "a cat, masterpiece" --width 832 --height 1216
uv run python -m novelai_image_mcp upscale --image ./in.png --factor 4
uv run python -m novelai_image_mcp info # subscription / Anlas balance
uv run python -m novelai_image_mcp --help
Skills (portable agent instructions)
The project ships three skills.sh packages that teach AI agents (Claude Code, Codex, GitHub Copilot, Cursor, β¦) how to drive the CLI and MCP tools without you pasting docs:
npx skills add --yes --global xinvxueyuan/NovelAI-Image-MCP
| Skill | What it teaches |
|---|---|
| novelai-cli | Typer CLI commands (serve, generate, upscale, director, annotate, info) for shell scripting |
| novelai-mcp-tools | The 11 MCP tools β model selection, parameters, return shape, Anlas cost |
| novelai-workflows | Multi-step creative pipelines (txt2imgβupscale, annotateβimg2img, Director edits) |
Skills and the CLI/MCP tools are complementary β install all three and your agent picks the right mode based on context. See the Agent skills docs for details.
Tools
| Tool | Description |
|---|---|
| generate_image | Text-to-image (V3 / V4 / V4.5 models, character prompts, vibes) |
| image_to_image | Image-to-image with strength/noise |
| inpaint | Inpainting (requires an inpaint model + mask) |
| upscale_image | 2Γ / 4Γ upscale |
| 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) |
See the tools reference on the docs site for parameters and examples.
Configuration
All settings are environment variables (see .env.example). Key ones:
| Variable | Default | Notes |
|---|---|---|
| NOVELAI_TOKEN | β | Persistent API token (preferred auth) |
| NOVELAI_USERNAME / NOVELAI_PASSWORD | β | Access-key login (argon2id) |
| NOVELAI_OUTPUT_DIR | outputs | Where generated PNGs are saved |
| MCP_TRANSPORT | stdio | stdio or streamable-http |
| MCP_HOST / MCP_PORT | 127.0.0.1 / 8000 | For streamable-http |
NovelAI API reference: image.novelai.net/docs
Development
The project is a uv + pnpm monorepo orchestrated by Turbo. See
CONTRIBUTING.md for the full setup; the short version:
uv sync # Python workspace (server + docs + dev)
pnpm install --frozen-lockfile # Node toolchain (turbo + husky + markdownlint)
pnpm check # lint + typecheck + test (all workspaces)
pnpm docs:build # build the docs site
pnpm server:serve # run the MCP server
pnpm docs:serve # sphinx-autobuild with live reload
Per-member commands (via uv):
uv run --directory apps/server ruff check src tests # lint
uv run --directory apps/server -m pyright # typecheck
uv run --directory apps/server -m pytest # tests
Docker
docker compose up --build # builds and runs the server (HTTP transport)
The Dockerfile lives at apps/server/Dockerfile but
the build context is the repository root (so uv can resolve the workspace
graph). See docker-compose.yml.
Documentation
The Sphinx documentation site is built with Furo + MyST Markdown and
auto-deploys to GitHub Pages on every push to main:
- Live site: xinvxueyuan.github.io/NovelAI-Image-MCP
- Source:
apps/docs/source/ - Build locally:
pnpm docs:serve
License
MIT β see LICENSE. Per-file SPDX annotations live in
REUSE.toml. Contributions are subject to the
Developer Certificate of Origin (the commit-msg hook signs off
commits automatically).
Links
<!-- mcp-name: io.github.xinvxueyuan/novelai-image-mcp -->Related Skills
Agent-Reach
97.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu β one CLI, zero API fees.
taste-skill
97.0kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
headroom
75.4kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.4kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit β see the Safety scan above for what the skill file itself contains.
