civitai-mcp-ultimate
civitai-mcp-ultimate
最完整的 Civitai API MCP 服务器 —— 搜索模型、浏览带有提示词的图像、下载 LoRA/Checkpoints、分析趋势。
一切尽在你的 AI 助手之中。14 个工具涵盖了 100% 的 Civitai 公共 REST API v1。
所有 API 参数均已于 2026-03-24 在真实的 Civitai API 上验证。没有猜测,没有从损坏的实现中复制。
功能
基于 Meilisearch 的搜索 —— 快速、准确的文本搜索(Civitai REST API 的搜索功能自 2025 年 5 月起已损坏)
搜索模型 —— Checkpoints、LoRAs、ControlNets,支持 40 多种基础模型过滤器(SD 1.5 → Flux.2)
热门图像及提示词 —— 按反应、评论、收藏排序。获取完整的生成参数
下载命令 —— 带有身份验证的 curl/PowerShell 命令,支持 ComfyUI 路径自动映射
NSFW 支持 —— 使用 API 密钥可完全访问 NSFW 内容(无/轻度/成熟/X 级过滤)
图像/视频缓存 —— 自动下载预览图到
~/.civitai-mcp-cache/,24 小时自动清理双语输出 —— 英语和俄语 (
CIVITAI_MCP_LANG=ru)异步且快速 —— 使用 httpx 异步客户端,在速率限制时自动重试
14 个工具 涵盖 100% 的 Civitai 公共 REST API v1
Related MCP server: good-comfyui-mcp
快速开始
从 PyPI 安装
pip install civitai-mcp-ultimateClaude Code
claude mcp add civitai -e CIVITAI_API_KEY=your_key_here -- uvx civitai-mcp-ultimateClaude Desktop
添加到 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工具
模型 (6 个工具)
工具 | 描述 |
| 通过 Meilisearch(文本)或 REST API(过滤器)搜索。支持类型、基础模型、标签、创建者、排序 |
| 按 ID 获取完整模型详情 |
| 版本详情:文件、触发词、下载链接 |
| 通过文件哈希查找模型 |
| 按基础模型(SDXL, Flux, Pony...)获取热门 Checkpoints |
| 按基础模型获取热门 LoRAs |
图像 (4 个工具)
工具 | 描述 |
| 带有过滤器和排序功能的图像浏览 |
| 按反应/评论/收藏获取热门图像 |
| 获取带有提示词的模型示例图像 |
| 从热门图像中获取完整的生成参数 |
创建者与标签 (2 个工具)
工具 | 描述 |
| 浏览/搜索模型创建者 |
| 浏览/搜索模型标签 |
下载 (2 个工具)
工具 | 描述 |
| 已验证的下载链接 |
| 下载命令 (curl/PowerShell) + ComfyUI 路径映射 |
支持的过滤器
基础模型 (全部验证可用)
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 (所有变体)
模型类型
Checkpoint, LORA, LoCon, TextualInversion, Hypernetwork, Controlnet, Poses, AestheticGradient, Wildcards, MotionModule, VAE, Upscaler, Workflows, Other
图像排序
最多反应, 最多评论, 最多收藏, 最新, 最旧
配置
变量 | 必需 | 默认 | 描述 |
| 推荐 | — | 用于访问 NSFW 内容 + 更高速率限制的 API 密钥 |
| 否 |
| 输出语言: |
| 否 | — | 用于下载命令的 ComfyUI 模型路径 |
| 否 | 内置 | Meilisearch 仅搜索密钥(公开,有默认值) |
获取你的 API 密钥:Civitai 账户设置
示例
> 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开发
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 创始人
@timoncool 的其他项目
项目 | 描述 |
作为 MCP 服务器的完整 Telegram Bot API | |
TRAIL — 跨 MCP 内容追踪协议 | |
AI 音乐工作室 — 歌曲、人声、翻唱、视频 | |
浏览器中的 AI 视频制作 | |
实时编码音乐平台 | |
你的人生周历 — 交互式日历 |
支持作者
我构建开源软件并进行 AI 研究。我创建的大部分内容都是免费且向所有人开放的。您的捐赠能帮助我继续创作,而不必担心生计问题 =)
所有捐赠方式 | dalink.to/nerual_dreming | boosty.to/neuro_art
BTC:
1E7dHL22RpyhJGVpcvKdbyZgksSYkYeEBCETH (ERC20):
0xb5db65adf478983186d4897ba92fe2c25c594a0cUSDT (TRC20):
TQST9Lp2TjK6FiVkn4fwfGUee7NmkxEE7C
星标历史
许可证
MIT
Available Tools
21 toolsbrowse_imagesARead-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_creatorsBRead-onlyIdempotent
Browse and search model creators on Civitai.
Inputs: query, limit, page. Returns: result
get_current_userARead-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_infoARead-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_urlBRead-onlyIdempotent
Get authenticated download URL for a model version.
Inputs: version_id (required). Returns: result
get_enumsARead-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_dataARead-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_modelARead-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_imagesARead-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_versionARead-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_hashARead-onlyIdempotent
Find a model version by its file hash (SHA256, AutoV2, CRC32, BLAKE3).
Inputs: hash (required). Returns: result
get_model_version_miniARead-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_tagsARead-onlyIdempotent
Browse and search model tags. Use tags in search_models filter.
Inputs: query, limit, page. Returns: result
get_top_checkpointsBRead-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_imagesARead-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_lorasBRead-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_trailARead-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_statsARead-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_usedAIdempotent
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_trailAIdempotent
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_modelsARead-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
Scored across 21 tools
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.
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.
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.
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
Related MCP Connectors
MCP server for Flux AI image generation
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
MCP server for Qwen Image 3 AI image generation
An MCP server that integrates with Discord to provide AI-powered features.
Related MCP Servers
- AlicenseBqualityDmaintenanceA server that integrates ComfyUI with MCP, allowing users to generate images and download them through natural language interactions.422Apache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server for generating AI images with local ComfyUI, featuring a reference-image-to-replication toolchain including Danbooru tag lookup, local Ollama vision, deobfuscation, and Civitai LoRA search/download.3MIT
- FlicenseAqualityDmaintenanceAn MCP server for generating images and checking generation status through ComfyUI's API. It allows interaction with local ComfyUI instances by providing workflow-based image generation and status checking tools.3-
- AlicenseAqualityBmaintenanceMCP server that connects an AI assistant to a running ComfyUI instance, allowing it to fetch saved workflows, inject a prompt and seed, run generation, and return the image inline in chat.2GPL 3.0