TC

timoncool/civitai-mcp-ultimate

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

26 stars 7 forks 质量 84 趋势 20MIT

Civitai API 的终极 MCP 服务器——搜索模型,浏览带提示的热门图片,下载 LoRA/检查点,分析趋势。双语(英语/俄语)。Python + FastMCP。

概览

全部来自你的AI助手。14个工具覆盖了100%的Civitai公共REST API v1内容。 所有API参数均于2026-03-24与真实的Civitai API核实。不猜测,不复制有缺陷的实现。 - — 快速、准确的文本搜索(Civitai REST API 搜索自2025年5月起失效)- — 检查点、LoRA、ControlNets,带40+基础模型过滤器(SD 1.5 → Flux.2)- — 按反应、评论、集合排序。获得完整生成参数 - — curl/PowerShell 命令带认证,ComfyUI 路径自动映射 - — 完全 NSFW 访问,API 密钥(无/软/成熟/X 过滤)- — 自动下载预览至 ~/.civitai-mcp-cache/,24小时自动清理 - — 英语和俄语(CIVITAI_MCP_LANG=ru)- — httpx 非同步客户端,重试时关闭速率限制 - 覆盖 Civitai 公共REST API v1 100% SD 1.5,SD 1.5 LCM,SD 1.5 Hyper,SD 2.0,SD 2.1,SDXL 1.0,SDXL 闪电,SDXL Hyper,Flux.1 S,Flux.1 D,Flux.1 Krea,Flux.1 Kontext,Flux.2 D,Flux.2 D,Flux。

概述(AI 翻译)

Civitai API 最完整的 MCP 服务器——搜索模型,带提示浏览图片,下载 LoRAs/检查点,分析趋势。

全部来自你的AI助手。14个工具覆盖了100%的Civitai公共REST API v1内容。

所有API参数均于2026-03-24与真实的Civitai API进行验证。不猜测,不复制出故障的实现。


特色

  • Meilisearch支持的搜索 — 快速、准确的文本搜索(Civitai REST API搜索自2025年5月起失效)
  • 搜索模型 — 检查点、LoRA、ControlNet,带40+基础模型滤波器(SD 1.5 → Flux.2)
  • 带提示的热门图片 — 按反应、评论、集合排序。获取完整生成参数
  • 下载命令 — 带有认证功能的curl/PowerShell命令,ComfyUI路径自动映射
  • NSFW 支持 — 完全 NSFW 访问,使用API密钥(无/软/成熟/X过滤)
  • 图片/视频缓存 — 自动下载预览至 ~/.civitai-mcp-cache/,24小时自动清理
  • 双语输出 — 英语和俄语(CIVITAI_MCP_LANG=ru)
  • 异步且快速 — httpx 异步客户端,重试时在速率限制下退回
  • 14个工具,涵盖100%的Civitai公共REST API v1

快速启动

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

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

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
在 GitHub 查看完整 README

安装

uvx civitai-mcp-ultimate
新手?先看 mcpskill.org 教程 →

配置

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