Skip to main content
Glama

civitai-mcp-ultimate

The most complete MCP server for Civitai API — search models, browse images with prompts, download LoRAs/Checkpoints, analyze trends.

Stars PyPI License TRAIL

All from your AI assistant. 14 tools covering 100% of the Civitai public REST API v1.

All API parameters verified against real Civitai API on 2026-03-24. No guessing, no copying from broken implementations.


Features

  • Meilisearch-powered search — fast, accurate text search (Civitai REST API search is broken since May 2025)

  • Search models — Checkpoints, LoRAs, ControlNets with 40+ base model filters (SD 1.5 → Flux.2)

  • Top images with prompts — sort by reactions, comments, collections. Get full generation params

  • Download commands — curl/PowerShell commands with auth, ComfyUI path auto-mapping

  • NSFW support — full NSFW access with API key (None/Soft/Mature/X filtering)

  • Image/video cache — auto-download previews to ~/.civitai-mcp-cache/, 24h auto-cleanup

  • Bilingual output — English and Russian (CIVITAI_MCP_LANG=ru)

  • Async & fast — httpx async client, retry with backoff on rate limits

  • 14 tools covering 100% of the Civitai public REST API v1


Related MCP server: good-comfyui-mcp

Quick Start

Install from PyPI

pip install civitai-mcp-ultimate

Claude Code

claude mcp add civitai -e CIVITAI_API_KEY=your_key_here -- uvx civitai-mcp-ultimate

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "civitai": {
      "command": "uvx",
      "args": ["civitai-mcp-ultimate"],
      "env": {
        "CIVITAI_API_KEY": "your_key_here"
      }
    }
  }
}

pip

pip install civitai-mcp-ultimate
civitai-mcp-ultimate

Tools

Models (6 tools)

Tool

Description

search_models

Search via Meilisearch (text) or REST API (filters). Type, base model, tag, creator, sort

get_model

Full model details by ID

get_model_version

Version details: files, trigger words, download URLs

get_model_version_by_hash

Find model by file hash

get_top_checkpoints

Top checkpoints by base model (SDXL, Flux, Pony...)

get_top_loras

Top LoRAs by base model

Images (4 tools)

Tool

Description

browse_images

Browse images with filters and sorting

get_top_images

Top images by reactions/comments/collections

get_model_images

Example images for a model with prompts

get_image_generation_data

Full generation params from top images

Creators & Tags (2 tools)

Tool

Description

get_creators

Browse/search model creators

get_tags

Browse/search model tags

Downloads (2 tools)

Tool

Description

get_download_url

Authenticated download URL

get_download_info

Download commands (curl/PowerShell) + ComfyUI path mapping


Supported Filters

Base Models (all verified working)

SD 1.5, SD 1.5 LCM, SD 1.5 Hyper, SD 2.0, SD 2.1, SDXL 1.0, SDXL Lightning, SDXL Hyper, Flux.1 S, Flux.1 D, Flux.1 Krea, Flux.1 Kontext, Flux.2 D, Flux.2 Klein 9B/4B, Pony, Pony V7, Illustrious, NoobAI, Anima, ZImageBase, AuraFlow, Chroma, HiDream, Hunyuan 1, Kolors, PixArt a/E, Lumina, CogVideoX, Hunyuan Video, LTXV/LTXV2, Mochi, Wan Video (all variants)

Model Types

Checkpoint, LORA, LoCon, TextualInversion, Hypernetwork, Controlnet, Poses, AestheticGradient, Wildcards, MotionModule, VAE, Upscaler, Workflows, Other

Image Sort

Most Reactions, Most Comments, Most Collected, Newest, Oldest


Configuration

Variable

Required

Default

Description

CIVITAI_API_KEY

Recommended

—

API key for NSFW access + higher rate limits

CIVITAI_MCP_LANG

No

en

Output language: en or ru

COMFYUI_MODELS_PATH

No

—

ComfyUI models path for download commands

MEILISEARCH_KEY

No

built-in

Meilisearch search-only key (public, has default)

Get your API key: Civitai Account Settings


Examples

> Search for the top Flux LoRAs this month
> Show me the most popular SDXL checkpoints
> Get the best prompts for model 12345
> Give me download commands for this LoRA into my ComfyUI
> Find NSFW LoRAs for Illustrious sorted by reactions

Development

git clone https://github.com/timoncool/civitai-mcp-ultimate
cd civitai-mcp-ultimate
pip install -e ".[dev]"
pytest

Автор

Nerual Dreming (t.me/nerual_dreming) — neuro-cartel.com | основатель ArtGeneration.me

Other Projects by @timoncool

Project

Description

telegram-api-mcp

Full Telegram Bot API as MCP server

trail-spec

TRAIL — cross-MCP content tracking protocol

ACE-Step Studio

AI music studio — songs, vocals, covers, videos

VideoSOS

AI video production in the browser

Bulka

Live-coding music platform

GitLife

Your life in weeks — interactive calendar

Support the Author

I build open-source software and do AI research. Most of what I create is free and available to everyone. Your donations help me keep creating without worrying about where the next meal comes from =)

All donation methods | dalink.to/nerual_dreming | boosty.to/neuro_art

  • BTC: 1E7dHL22RpyhJGVpcvKdbyZgksSYkYeEBC

  • ETH (ERC20): 0xb5db65adf478983186d4897ba92fe2c25c594a0c

  • USDT (TRC20): TQST9Lp2TjK6FiVkn4fwfGUee7NmkxEE7C

Star History

License

MIT

Available Tools

21 tools
browse_imagesA
Read-onlyIdempotent

Browse AI-generated images/videos on Civitai.

Sort: Most Reactions, Most Comments, Most Collected, Newest, Oldest. NSFW filter: None, Soft, Mature, X. content_type: "image" or "video". browsing_level: "PG", "PG-13", "R", "X", "XXX" (comma-separated for multiple). tag: filter by tag (e.g. "anime", "animal", "architecture"). base_model: filter by base model (e.g. "Flux.1 D", "SDXL 1.0", "Pony"). tools: filter by tool (e.g. "ComfyUI", "Automatic1111"). techniques: filter by technique (e.g. "txt2img", "img2img"). has_meta: true = only with generation metadata. made_on_site: true = only generated on Civitai. originals_only/remixes_only: filter originals vs remixes. exclude_used: true = skip images/videos already in history (avoid duplicates). requester: who is requesting (e.g. "pikabu", "telegram", "scheduled:daily-post"). Always specify when fetching content for another MCP tool. Previews are cached locally for viewing via Read tool.

Inputs: model_id, model_version_id, post_id, username, +17 more. Returns: result

get_creatorsB
Read-onlyIdempotent

Browse and search model creators on Civitai.

Inputs: query, limit, page. Returns: result

get_current_userA
Read-onlyIdempotent

Get info about the currently authenticated user (requires CIVITAI_API_KEY).

Returns: username, tier, membership status. Use to verify API key is valid.

Inputs: no named parameters. Returns: result

get_download_infoA
Read-onlyIdempotent

Get download URLs + curl/PowerShell commands for a model.

If version_id not specified, uses latest version. Set comfyui_path to auto-map to correct ComfyUI model directory. Generates ready-to-paste download commands with authentication.

Inputs: model_id (required), version_id, comfyui_path. Returns: result

get_download_urlB
Read-onlyIdempotent

Get authenticated download URL for a model version.

Inputs: version_id (required). Returns: result

get_enumsA
Read-onlyIdempotent

Get all valid enum values for Civitai API filters.

Returns valid values for: ModelType, BaseModel, ActiveBaseModel, BaseModelType, ModelFileType. Use this to discover currently supported model types and base models.

Inputs: no named parameters. Returns: result

get_image_generation_dataA
Read-onlyIdempotent

Get full generation parameters from top images of a model.

Focused on extracting the best prompts, settings, and LoRA combinations. Only returns images that have generation metadata. exclude_used: true = skip already-used images. requester: who is requesting (e.g. "pikabu", "telegram").

Inputs: model_id (required), sort, limit, exclude_used, +1 more. Returns: result

get_modelA
Read-onlyIdempotent

Get detailed info about a specific model by ID.

Returns: description, all versions, files, trigger words, stats, creator, tags, download URLs.

Inputs: model_id (required). Returns: result

get_model_imagesA
Read-onlyIdempotent

Get example images generated with a specific model.

Returns images with full generation params: prompt, negative prompt, steps, CFG, sampler, seed, LoRAs used. Learn how to use a model well. exclude_used: true = skip already-used images. requester: who is requesting (e.g. "pikabu", "telegram").

Inputs: model_id (required), limit, exclude_used, requester. Returns: result

get_model_versionA
Read-onlyIdempotent

Get details about a specific model version by version ID.

Returns: download URLs, trigger words, base model, files, example images.

Inputs: version_id (required). Returns: result

get_model_version_by_hashA
Read-onlyIdempotent

Find a model version by its file hash (SHA256, AutoV2, CRC32, BLAKE3).

Inputs: hash (required). Returns: result

get_model_version_miniA
Read-onlyIdempotent

Quick check for a model version — availability, size, hashes, generation support.

Faster than get_model_version. Use for download/compatibility checks.

Inputs: version_id (required). Returns: result

get_tagsA
Read-onlyIdempotent

Browse and search model tags. Use tags in search_models filter.

Inputs: query, limit, page. Returns: result

get_top_checkpointsB
Read-onlyIdempotent

Get top checkpoint models for a specific base model.

Best for finding SDXL, Flux, Pony, Illustrious checkpoints. Base models: SD 1.5, SDXL 1.0, Flux.1 D, Flux.2 D, Pony, Pony V7, Illustrious, NoobAI, Chroma, HiDream, etc.

Inputs: base_model, period, sort, limit. Returns: result

get_top_imagesA
Read-onlyIdempotent

Get top images/videos from Civitai — best for finding great prompts.

Sort: Most Reactions, Most Comments, Most Collected, Newest, Oldest. Period: Day, Week, Month, Year, AllTime. content_type: "image" or "video". browsing_level: "PG", "PG-13", "R", "X", "XXX" (comma-separated). tag/base_model/tools/techniques: additional filters. has_meta/made_on_site/originals_only/remixes_only: boolean modifiers. exclude_used: true = skip images/videos already in history (avoid duplicate posts). requester: who is requesting (e.g. "pikabu", "telegram", "scheduled:daily-post"). Always specify for publishing workflows. Previews cached locally for Read tool.

Inputs: sort, period, nsfw, limit, +12 more. Returns: result

get_top_lorasB
Read-onlyIdempotent

Get top LoRA models for a specific base model.

Find the most popular LoRAs for SDXL, Flux, Pony, Illustrious. Set nsfw=true to include NSFW LoRAs (requires API key).

Inputs: base_model, period, sort, limit, +1 more. Returns: result

get_trailA
Read-onlyIdempotent

Query the TRAIL content log. Use to check what content was fetched, selected, posted, or skipped.

content_id: filter by content ID (exact or prefix like "civitai:image:"). action: filter by action(s) — "fetched", "selected", "posted", "failed", "skipped". String or list. requester: filter by workflow/task ID. trace_id: filter by pipeline trace ID. since: ISO 8601 timestamp — only entries after this time. limit: max entries, newest first (0 = all). offset: entries to skip for pagination.

Inputs: content_id, action, requester, trace_id, +3 more. Returns: result

get_trail_statsA
Read-onlyIdempotent

Get summary statistics from the TRAIL content log.

requester: filter by workflow/task ID. since: ISO 8601 timestamp — only count entries after this time.

Inputs: requester, since. Returns: result

mark_as_usedA
Idempotent

Mark images/videos as used (e.g. after sending to Pikabu, Telegram, etc.).

Call this AFTER successfully publishing content to another platform. image_ids: list of Civitai image IDs that were used. action: TRAIL action — "posted", "selected", "skipped", etc. requester: which workflow used this (e.g. "prompthub-daily", "txt2vid-daily"). context: optional note (e.g. "posted to community Stable Diffusion"). trace_id: optional TRAIL trace ID for pipeline correlation.

Inputs: image_ids (required), action, requester, context, +1 more. Returns: result

mark_trailA
Idempotent

Write an entry to the TRAIL content log.

content_id: content ID in format source:type:id (e.g. "civitai:image:12345"). action: what happened — fetched, selected, posted, failed, skipped. requester: workflow/task ID (e.g. "prompthub-daily"). details: optional platform-specific data. trace_id: optional pipeline trace ID. tags: optional labels for filtering.

Inputs: content_id (required), action (required), requester (required), details, +2 more. Returns: result

search_modelsA
Read-onlyIdempotent

Search for AI models on Civitai with flexible filters.

Uses Meilisearch for text queries (fast, accurate results). Falls back to REST API for filter-only queries, batch IDs, favorites, etc.

Find checkpoints, LoRAs, ControlNets and more. Types: Checkpoint, LORA, LoCon, DoRA, TextualInversion, Hypernetwork, Controlnet, Poses, VAE, Upscaler, Wildcards, MotionModule, Workflows, Detection, Other. Base models: SD 1.5, SDXL 1.0, Flux.1 D, Flux.2 D, Pony, Illustrious, NoobAI, Hunyuan 1, Kolors, Chroma, ZImageBase, etc. Sort: Highest Rated, Most Downloaded, Most Collected, Most Comments, Most Tipped, Newest. Period: AllTime, Year, Month, Week, Day (REST API only). Commercial use filter: None, Image, Rent, RentCivit, Sell (REST API only). cursor: pagination cursor from previous response (REST API).

Tips: text search works best via Meilisearch. Use get_model if you know the ID. Set favorites=true or hidden=true to filter your own models (requires API key, REST API). Set ids to fetch specific models by ID in batch (REST API).

Inputs: query, types, base_model, tag, +16 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 21 tools

    Disambiguation4/5

    Most tools have distinct purposes, such as browsing images, searching models, or managing download info, but there is some overlap between browse_images and get_top_images, both of which fetch top images with similar filters, which could cause confusion. Additionally, get_model and get_model_version serve related but slightly different functions, but their descriptions help clarify the distinction.

    Naming Consistency5/5

    Tool names follow a consistent verb_noun pattern throughout, such as browse_images, get_creators, search_models, and mark_as_used. All tools use snake_case, and the naming convention is predictable and readable, making it easy for agents to understand the action and target.

    Tool Count3/5

    With 21 tools, the count is on the higher side for a Civitai-focused server, which may feel heavy but is somewhat justified by the comprehensive coverage of browsing, searching, downloading, and logging functionalities. However, it borders on being excessive, as some tools like get_download_info and get_download_url could potentially be consolidated, and the TRAIL-related tools (get_trail, get_trail_stats, mark_trail, mark_as_used) add complexity that might not be essential for all use cases.

    Completeness5/5

    The tool set provides complete coverage for interacting with Civitai, including browsing and searching images and models, fetching detailed model info, handling downloads, managing user data, and logging content usage via TRAIL. There are no obvious gaps; agents can perform full workflows from discovery to download and tracking, with tools like get_enums and get_current_user supporting auxiliary needs effectively.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers