civitai

$npx mdskill add artokun/comfyui-mcp/civitai

Search, download, and generate with Civitai models locally in ComfyUI.

  • Finds checkpoints, LoRAs, and embeddings on Civitai by query and base model.
  • Uses built-in search_civitai_models tool and ComfyUI model management.
  • Filters results by base model compatibility and SFW preference automatically.
  • Downloads models into correct subfolders and enables immediate generation with trigger words.

SKILL.md

.github/skills/civitaiView on GitHub ↗
---
name: civitai
description: Discover Civitai models with the BUILT-IN search_civitai_models tool and install/generate them locally — find a checkpoint/LoRA/embedding on Civitai, download it into ComfyUI, and use its trigger words. Optionally pair the official Civitai MCP for community features (images browsing, posting, collections).
---

# Civitai + comfyui-mcp

comfyui-mcp has **native Civitai search built in** — `search_civitai_models` —
plus the local half of the loop: download, wire, queue, tag. The full flow
(find → install → generate) needs no other server, no API key, and works on
EVERY backend, including small local models behind the compact router.

## The built-in flow (default path)

```
search_civitai_models({ query, types: ["LORA"], base_models: ["Flux.1 D"] })
        │                    each hit: model_id · model_version_id · trigger words
        ▼
download_civitai_model({ model_version_id, target_subfolder: "loras" })
        │
        ▼
list_local_models  →  panel_add_node loader / generate_image   # use it
```

- **ALWAYS filter `base_models`** when the user's checkpoint family is known —
  a Flux LoRA will not load on an SDXL checkpoint (see `model-compatibility`).
  CivitAI labels: `Flux.1 D`, `SDXL 1.0`, `SD 1.5`, `Pony`, `Illustrious`,
  `Wan Video`.
- `target_subfolder` must match the model type: `checkpoints`, `loras`, `vae`,
  `controlnet`, `embeddings`, `upscale_models`, …
- Results are **SFW-only by default** (`nsfw: true` to opt in).
- Each hit carries **trigger words** — put them in the prompt after installing.
- Prefer `model_version_id` over `model_id` — a Civitai page can list several
  versions and the user usually means a specific one.

**API key (optional).** Search needs none. `CIVITAI_API_TOKEN` (from
civitai.com/user/account) unlocks **gated/early-access downloads** and gated
search results — set it once (panel Settings › "Set CivitAI token…" or env).

## Recipes

**"Find me a good anime LoRA for Flux and install it"**
1. `search_civitai_models({ query: "anime style", types: ["LORA"], base_models: ["Flux.1 D"] })`.
2. Present the top 3–5 with name, creator, base model, downloads, and the
   version id. Let the user pick.
3. `download_civitai_model({ model_version_id, target_subfolder: "loras" })`.
4. In the panel: `panel_add_node` a `LoraLoader`, `panel_set_widget` the
   `lora_name`, wire it between checkpoint and sampler — and use the hit's
   trigger words in the prompt. Headless: `generate_image` / build the workflow.

**"Download this Civitai page for me"** (user pastes a URL)
- Parse the `modelVersionId` from the URL if present; otherwise pass the model
  id from the URL to `download_civitai_model` (it resolves the latest version).
  A raw `civitai.com/api/download/...` URL also works via `download_model`
  with `CIVITAI_API_TOKEN` set.

## Optional: the official Civitai MCP (community surface)

For features beyond search→install — browsing example **images** and their
generation params, collections, posting, reviews, bounties — pair the official
remote server (no longer auto-bundled; add it once):

```bash
claude mcp add --transport http civitai https://mcp.civitai.com/mcp \
  --header "Authorization: Bearer YOUR_CIVITAI_API_KEY"
```

Then `mcp__civitai__*` tools appear alongside comfyui-mcp's. Its discovery
results hand off identically (`modelVersions[].id` → `download_civitai_model`).

**Boundaries:** that server also exposes **write/social** tools (post,
comment, review, DM, follow). Those publish on the user's behalf — surface
what you're about to post and get an explicit yes first. This skill is about
discovery → local install → generation; don't post or message without being
asked.

## See also

- `model-registry` — curated direct download URLs (HF + Civitai notes)
- `model-compatibility` — base-model / VAE / CLIP pairing (why a LoRA won't load)
- `prompt-engineering` — Civitai image params are a prompt goldmine

More from artokun/comfyui-mcp

SkillDescription
ai-toolkit-trainerTrain custom LoRAs with ostris AI-Toolkit — covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM image LoRAs). Use when the user wants to train a WAN or Z-Image LoRA; covers local + RunPod setup, dataset prep, key params, and using the result in a ComfyUI workflow.
anima-baseAnime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT) — use for anime, manga, illustrated characters; accepts Danbooru tags + natural language; runs/trains on <6GB VRAM; includes anime inpainting via Anima-LLLite ControlNet
anima-lora-trainerTrain a custom anime LoRA on the ANIMA base model — Citron's local Gradio trainer (kohya sd-scripts), <6GB VRAM, character/style LoRAs; covers setup, dataset prep, training params, and using the result in the anima-base workflow
color-correctionDiagnose and fix video/image color OBJECTIVELY with the analyze_color tool (scopes/stats — black/white points, contrast, saturation, clipping, cast) instead of eyeballing a contact sheet. Covers the "washed out" signature, why reference color-match (mkl/ColorMatch/ColorMatchAdobe) CAN'T add contrast a flat source lacks, the levels/contrast-stretch fix (core AdjustContrast / CurveEditor), the measure→fix→re-measure loop, the side-by-side sandbox pattern, and where to place the fix in a render graph (after decode, before save). Use when a render looks washed out / flat / dull / over-saturated / color-cast, or when deciding between a color-match and a contrast/levels fix.
comfyui-coreCore ComfyUI knowledge — workflow format, node types, pipeline patterns, and MCP tool usage
comfyui-frontend-extensionsAuthoring ComfyUI v2 frontend extensions with @comfyorg/extension-api — defineNode/defineExtension/defineWidget, shell UI (sidebar tabs, commands, hotkeys), typed events, and handles. Use when writing or editing ComfyUI web-UI extension code (custom node JS, sidebar panels, widgets).
comfyui-launch-flagsPick the right ComfyUI startup flags for VRAM, attention, caching, and speed — the full decision matrix for OOM (--novram / --cache-none / --disable-smart-memory), shared-VRAM creep on Windows (--reserve-vram N), model-switching with big text encoders (--cache-none), high-VRAM throughput (--gpu-only / --highvram), and attention-backend selection (--use-sage-attention for speed, --use-pytorch-cross-attention as the highest-quality / Z-Image-safe fallback). Also the acceleration-stack + Blackwell/RTX 5000 (sm_120) notes. Use when a graph OOMs (especially long video like LTX 2 / WAN), when the GPU spills into shared VRAM and slows to a crawl, when switching between models eats all RAM, when Z-Image produces black/garbled output under Sage, or when deciding which attention backend to launch with. Flag names verified against upstream comfy/cli_args.py — see Sources.
comfyui-node-registryAuthoring & publishing ComfyUI custom nodes to the Comfy Registry — node structure, pyproject.toml spec, comfy-cli publishing, and CI
debug-renderDebug a WRONG or imperfect render (not a hard error) by inspecting inputs and intermediate steps with run-to-node — render one branch up to an output, preview-tap latents/masks/preprocessor maps, localize the first bad stage, then fix. Use when a final image/video comes out wrong — artifacts, wrong subject/pose/composition/color, blur, a ControlNet/IPAdapter/mask/LoRA not taking, a two-stage refiner or upscale degrading the result — rather than the run failing with an error (for errors/OOM/missing nodes use the troubleshooting skill).
directorFull production pipeline — story to scenes, Z-Image start frames, Qwen Edit end frames, WAN FLF video clips, ffmpeg concatenation