Server data from the Official MCP Registry
NovelAI image generation as MCP tools: txt2img, img2img, inpaint, upscale, Director, ControlNet.
NovelAI image generation as MCP tools: txt2img, img2img, inpaint, upscale, Director, ControlNet.
Valid MCP server (2 strong, 1 medium validity signals). No known CVEs in dependencies. โ ๏ธ Package registry links to a different repository than scanned source. Imported from the Official MCP Registry. 1 finding(s) downgraded by scanner intelligence.
10 files analyzed ยท 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: NOVELAI_TOKEN
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-xinvxueyuan-novelai-image-mcp": {
"env": {
"NOVELAI_TOKEN": "your-novelai-token-here"
},
"args": [
"novelai-image-mcp",
"serve",
"novelai-image-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
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: https://xinvxueyuan.github.io/NovelAI-Image-MCP/
Image content blocks (the agent sees the image)
and PNG saved to disk (path returned as text).typer CLI for direct invocation.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.
# 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
pip install novelai-image-mcp
export NOVELAI_TOKEN=pst-...
novelai-image-mcp serve
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.
The MCP server supports two transports (stdio + http), all configured under
mcpServers:
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}"
}
}
}
}
{
"mcpServers": {
"novelai-image": {
"command": "uvx",
"args": ["--prerelease=allow", "novelai-image-mcp", "serve"],
"env": { "NOVELAI_TOKEN": "pst-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" }
}
}
}
Set NOVELAI_TOKEN (or NOVELAI_USERNAME + NOVELAI_PASSWORD) in the host
environment before launching โ uvx inherits the parent shell env.
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).
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
| 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.
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: https://image.novelai.net/docs/index.html
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 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.
The Sphinx documentation site is built with Furo + MyST Markdown and
auto-deploys to GitHub Pages on every push to main:
apps/docs/source/pnpm docs:serveMIT โ 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).
Be the first to review this server!
by Modelcontextprotocol ยท Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno ยท Developer Tools
Toleno Network MCP Server โ Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace ยท Developer Tools
Create, build, and publish Python MCP servers to PyPI โ conversationally.