NovelAI MCP Server
An MCP server that lets Claude, Cursor and other MCP clients generate and edit images with NovelAI.
Supports NovelAI Diffusion V5 (Full and Curated) and V4.5: text-to-image, img2img, inpainting, Director Tools, Vibe Transfer, upscaling and tag suggestions.
This is an unofficial project. It is not affiliated with or endorsed by NovelAI / Anlatan.
Tools
| Tool | What it does |
|---|---|
novelai_generate_image |
Text-to-image. Size presets or custom size, multi-character prompts with positions, in-image text, transparent background, comic panels, furry and background modes. |
novelai_img2img |
Redraws an existing image from a new prompt. strength (0.0–1.0) controls how much changes. |
novelai_inpaint |
Redraws the masked area of an image. White in the mask = repaint, black = keep. |
novelai_augment |
Director Tools: bg-removal, lineart, sketch, colorize, emotion (24 emotions), declutter. |
novelai_upscale |
Neural upscale. NovelAI chooses the factor. |
novelai_vibe_transfer |
Generates a new image in the style and palette of a reference image. |
novelai_suggest_tags |
Danbooru/NovelAI tag autocomplete. |
Generated images are saved to disk and also returned to the client, so the model can see them.
Requirements
- A NovelAI subscription and a Persistent API Token: NovelAI → Settings → Account → Persistent API Tokens.
- uv. It runs the server without a manual install.
Cost
Requests spend your Anlas the same way the NovelAI website does. Large sizes, more steps, upscale and Vibe Transfer cost more. Check your Anlas balance before running many generations. The server does not limit spending.
Setup
Claude Code
claude mcp add novelai -e NOVELAI_API_KEY=your_token -- uvx mcp-server-novelai
Claude Desktop
Edit claude_desktop_config.json:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"novelai": {
"command": "uvx",
"args": ["mcp-server-novelai"],
"env": {
"NOVELAI_API_KEY": "your_token"
}
}
}
}
Restart Claude Desktop after editing.
Cursor
Add the same mcpServers block to .cursor/mcp.json or to Settings → MCP.
Install from GitHub instead of PyPI
Replace "args": ["mcp-server-novelai"] with:
"args": ["--from", "git+https://github.com/DesmondFox/novelai-mcp", "mcp-server-novelai"]
Configuration
| Variable | Required | Default | Meaning |
|---|---|---|---|
NOVELAI_API_KEY |
yes | — | Persistent API Token. |
NOVELAI_OUTPUT_DIR |
no | ~/Pictures/NovelAI |
Where images are saved. Each tool also accepts output_dir. |
Usage
Ask the model in plain language. It picks the tool and parameters. Examples:
- "Generate a portrait of a girl with silver hair and blue eyes in a sunflower field."
- "Make a chibi cat girl holding a coffee mug, transparent background."
- "Draw a tavern scene: a knight girl on the left, a mage boy on the right."
- "Cyberpunk storefront at night with a neon sign that says NEON DREAMS."
- "Take
~/Pictures/NovelAI/t2i_20260101_120000_abc123.pngand change her expression to smug." - "Remove the background from that image, then upscale it."
- "Suggest tags for 'kimono'."
Useful parameters of novelai_generate_image:
| Parameter | Default | Notes |
|---|---|---|
model |
nai-diffusion-5-full |
Also nai-diffusion-5-curated, nai-diffusion-4-5-full, nai-diffusion-4-5-curated. |
size |
portrait |
portrait 832×1216, landscape 1216×832, square 1024×1024, wallpaper 1920×1088, comic_strip 1536×640, and others. |
width, height |
— | Custom size, rounded to a multiple of 64. Both must be set. |
steps |
23 | Same default as the NovelAI website. |
scale |
5.0 | Prompt guidance. |
seed |
random | Set it to reproduce an image. The used seed is returned. |
uc_preset |
light |
strong, light, furry_focus, human_focus, none. |
characters |
— | List of {"prompt": ..., "negative_prompt": ..., "position": [x, y]}, x and y in 0.0–1.0. Up to 22 on V5, 6 on V4/V4.5. |
render_text |
— | Text to draw inside the image. |
transparent |
false | Transparent background. |
comic_panels |
false | Adds comic/manga panel tags. |
Development
git clone https://github.com/DesmondFox/novelai-mcp
cd novelai-mcp
pip install -e ".[dev]"
pytest
ruff check .
For local development you can put the key in a .env file (see .env.example) instead of the client config.
License
Metadata
Release files for mcp-server-novelai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_server_novelai-0.1.0.tar.gz | 20.8 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_server_novelai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.6 kB
Release files / mcp_server_novelai-0.1.0.tar.gz
| Download URL | mcp_server_novelai-0.1.0.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1771234e0f68d5309d964f9c0a7c12b1c05c88d9e8cf7ead2ca6c00c1fc6e948
|
|
BLAKE2b-256 checksum How to use checksums |
2e8582562bd09c4394bd1bbb9eb39f5c4626aa8fe5fcfc609bbb100d2e16ad7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mcp_server_novelai-0.1.0-py3-none-any.whl
| Download URL | mcp_server_novelai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cac0f9e203248df7626ea0cc4c07282b28a20771b549a21c0fc0b29c333022e4
|
|
BLAKE2b-256 checksum How to use checksums |
4915641c2a729cb38f36e42276371715dfd59811f8063e995b37d0fbcdedf207
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for mcp-server-novelai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mcp_server_novelai-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.