novelai-cli

novelai-cli is a skill for Claude Code, Codex from xinvxueyuan/NovelAI-Image-MCP. It costs 44 tokens per session (3,255 once invoked), scanned A, original, MIT.

A command-line program for creating and transforming images with NovelAI, an image-generation service, from a shell or script.

In plain words
What is it for?
Use it to generate, enlarge, direct, annotate, or inspect NovelAI images from the terminal.
Why use it?
It lets you run image tasks outside an MCP host and repeat them in scripts, batch jobs, or automated builds.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for cline. Also seen: built for cline.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is novelai-image-mcp upscale ./outputs/generate-20260728.png --factor 4.

Good fit Use it to generate, enlarge, direct, annotate, or inspect NovelAI images from the terminal.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/xinvxueyuan/NovelAI-Image-MCP
agentmods
npx agentmods add skills/xinvxueyuan/novelai-image-mcp/novelai-cli

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for novelai-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/xinvxueyuan/novelai-image-mcp/novelai-cli/github.svg)](https://agentmods.dev/skills/xinvxueyuan/novelai-image-mcp/novelai-cli)
Your own site
<a href="https://agentmods.dev/skills/xinvxueyuan/novelai-image-mcp/novelai-cli"><img src="https://agentmods.dev/badge/skills/xinvxueyuan/novelai-image-mcp/novelai-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for novelai-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/xinvxueyuan/novelai-image-mcp/novelai-cli"><img src="https://agentmods.dev/badge/skills/xinvxueyuan/novelai-image-mcp/novelai-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,255 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.03255
Opus 5 $0.00022 $0.01628
Sonnet 5 $0.00009 $0.00651
Haiku 4.5 $0.00004 $0.00326

Measured 12d ago against content hash 0bc3ed5862ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

novelai-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/novelai-cli/SKILL.md · 298 lines

How it starts

The opening of the file, as written. The whole thing — 298 lines — stays where its author put it; the contents beside it link to each section on GitHub.

novelai-cli

Instructions for the agent to follow when driving the NovelAI image CLI from a shell.

When to use

Use this skill when driving NovelAI image generation from a shell script, CI job, or one-off command instead of through an MCP host like Claude Desktop. The novelai-image-mcp package ships a Typer-based sync CLI (entry point: novelai-image-mcp) that wraps the same async NovelAIClient the MCP server uses. This skill covers the CLI only — for the MCP tool interface (the 11 registered tools exposed over stdio / streamable-http), see the novelai-mcp-tools skill instead, and do not duplicate that reference here.

Instructions

  1. Install the CLI — see Installation.
  2. Configure credentials — see Credentials.
  3. Run a command — see Commands for the six subcommands (serve, generate, upscale, director, annotate, info).
  4. Read the output — see Output behavior.

Installation

# From PyPI
pip install novelai-image-mcp

# Or run ad-hoc without installing
uvx novelai-image-mcp <command>

# From source (monorepo)
uv sync
uv run --directory apps/server novelai-image-mcp <command>

Credentials

The CLI needs exactly one auth method configured via environment variables (see .env.example):

  • PreferredNOVELAI_TOKEN: a persistent API token. Get it from https://novelai.net > Account (the pst-... string).
  • FallbackNOVELAI_USERNAME + NOVELAI_PASSWORD: the access key is derived with argon2id. Requires argon2-cffi (a core dependency).

If neither is set, every command (except serve without credentials loaded) exits with code 2 and prints a reminder. Set credentials inline for one-shot use:

export NOVELAI_TOKEN=pst-xxxxxxxxxxxxxxxx
novelai-image-mcp info
Useful environment variables

All are optional; defaults shown.

Variable Default Purpose
NOVELAI_TOKEN API token (preferred auth)
NOVELAI_USERNAME / NOVELAI_PASSWORD Alt auth (derived)
NOVELAI_OUTPUT_DIR outputs Where PNGs are saved
NOVELAI_DEFAULT_MODEL nai-diffusion-4-5-full Default model id
NOVELAI_DEFAULT_WIDTH / NOVELAI_DEFAULT_HEIGHT 832 / 1216 Default size
NOVELAI_DEFAULT_STEPS 28 Default step count
NOVELAI_DEFAULT_SCALE 5.0 Default CFG scale
NOVELAI_DEFAULT_SAMPLER k_euler_ancestral Default sampler
NOVELAI_TIMEOUT 120 HTTP timeout (seconds)
MCP_TRANSPORT stdio serve transport (stdio or streamable-http)
MCP_HOST / MCP_PORT 127.0.0.1 / 8000 serve HTTP bind

Read the full file on GitHub · 298 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 298 lines · 44 tokens per session scan A 0bc3ed5862ed

Subscribe to this mod's changes

novelai-cli is a skill published in the GitHub repository xinvxueyuan/NovelAI-Image-MCP (4 stars, last pushed yesterday), licensed MIT. It adds 44 tokens to every session and 3,255 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.