Civitai MCP Server
Runs the MCP server that interfaces with Civitai's API, providing access to model discovery, creator profiles, and generated content.
Used for type-safe implementation of the MCP server, ensuring reliable interaction with Civitai's API endpoints.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Civitai MCP Server search for anime-style LoRA models for SDXL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Civitai MCP Server
A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to Civitai's vast collection of AI models, creators, and generated content. Browse, search, and discover AI models seamlessly through your favorite MCP-compatible AI assistant.
Features
š Model Discovery
Advanced Search: Find AI models with flexible filtering by type, creator, tags, and more
Browse Categories: Explore models by type (Checkpoints, LoRA, ControlNet, etc.)
Popular & Trending: Discover the most downloaded and highest-rated models
Latest Models: Stay up-to-date with newly uploaded models
Hash Lookup: Find models by file hash for verification
šØāš» Creator & Community
Creator Profiles: Browse and search for model creators
Creator Collections: View all models from specific creators
Tag System: Explore models through Civitai's comprehensive tagging system
š¼ļø Generated Content
Image Gallery: Browse AI-generated images with detailed metadata
Generation Parameters: Access prompt, settings, and model information
Community Showcase: Discover inspiring creations from the community
š Model Intelligence
Detailed Model Info: Complete model specifications, versions, and files
Version History: Track model updates and improvements
Download URLs: Direct access to model downloads with authentication support
Content Safety: Access scan results for pickle and virus safety
Related MCP server: civitai-mcp-ultimate
Installation
Prerequisites
Node.js 18+
npm or yarn
A Civitai API key (optional, but recommended for higher rate limits)
Quick Start
Clone the repository:
git clone https://github.com/Cicatriiz/civitai-mcp-server.git
cd civitai-mcp-serverInstall dependencies:
npm installBuild the server:
npm run buildSet up your API key (optional):
export CIVITAI_API_KEY="your_api_key_here"Run the server:
npm startGetting a Civitai API Key
Visit Civitai API Keys
Log in to your Civitai account
Generate a new API key
Copy the key and set it as an environment variable
Configuration
MCP Client Setup
Add the server to your MCP client configuration:
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"civitai": {
"command": "node",
"args": ["/path/to/civitai-mcp-server/dist/index.js"],
"env": {
"CIVITAI_API_KEY": "your_api_key_here"
}
}
}
}Other MCP Clients
Configure according to your client's documentation, using:
Command:
node /path/to/civitai-mcp-server/dist/index.jsTransport: stdio
Environment:
CIVITAI_API_KEY=your_key
Usage Examples
Basic Model Search
Search for SDXL LoRA models related to anime:
- Tool: search_models
- Query: "anime"
- Types: ["LORA"]
- BaseModels: ["SDXL 1.0"]Find Popular Models
Get the most downloaded models this week:
- Tool: get_popular_models
- Period: "Week"
- Limit: 10Model Details
Get comprehensive information about a specific model:
- Tool: get_model
- ModelId: 12345Browse Generated Images
Explore recent AI-generated images:
- Tool: browse_images
- Sort: "Newest"
- Limit: 50
- NSFW: "None"Available Tools
Tool | Description | Key Parameters |
| Search models with filters |
|
| Get detailed model info |
|
| Get version details |
|
| Find model by file hash |
|
| Browse generated images |
|
| Search creators |
|
| Browse model tags |
|
| Most popular models |
|
| Newest models |
|
| Highest rated models |
|
| Models with specific tag |
|
| Models by creator |
|
| Filter by model type |
|
| Get model download URL |
|
API Reference
Model Types
Checkpoint- Full Stable Diffusion modelsLORA- Low-Rank Adaptation modelsTextualInversion- Embedding modelsHypernetwork- Hypernetwork modelsControlNet- ControlNet modelsAestheticGradient- Aesthetic gradient modelsPoses- Pose models
Sort Options
Highest Rated- Best community ratingsMost Downloaded- Most popular downloadsNewest- Recently uploaded
Time Periods
AllTime- No time restrictionYear- Past 12 monthsMonth- Past 30 daysWeek- Past 7 daysDay- Past 24 hours
API Coverage
This MCP server implements all major Civitai API v1 endpoints:
ā
/api/v1/models- List and search modelsā
/api/v1/models/:id- Get specific modelā
/api/v1/model-versions/:id- Get model versionā
/api/v1/model-versions/by-hash/:hash- Get version by hashā
/api/v1/images- Browse imagesā
/api/v1/creators- List creatorsā
/api/v1/tags- List tagsā Download URLs with authentication support
Model Types Supported
Checkpoint: Full Stable Diffusion models
LORA: Low-Rank Adaptation models
TextualInversion: Textual inversion embeddings
Hypernetwork: Hypernetwork models
AestheticGradient: Aesthetic gradient models
Controlnet: ControlNet models
Poses: Pose models
Content Filtering
The server supports Civitai's content filtering system:
NSFW content levels (None, Soft, Mature, X)
Commercial use permissions
Model licensing options
Error Handling
The server includes comprehensive error handling for:
API rate limiting
Network connectivity issues
Invalid parameters
Authentication errors
Data validation
Development
Project Structure
civitai-mcp-server/
āāā src/
ā āāā index.ts # Main server implementation
ā āāā civitai-client.ts # Civitai API client
ā āāā types.ts # TypeScript type definitions
āāā dist/ # Compiled JavaScript output
āāā tests/ # Test files
āāā docs/ # Additional documentationBuilding from Source
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run tests
npm test
# Development mode with hot reload
npm run devTesting
# Run comprehensive test suite
npm test
# Test specific endpoints
node test.js
node comprehensive-test.jsContributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
Fork the repository
Create a feature branch
Make your changes
Add tests for new functionality
Submit a pull request
Limitations
Rate Limiting: Civitai API has rate limits. Use an API key for higher limits.
NSFW Content: Some content may be filtered based on your account settings.
Model Availability: Some models may be temporarily unavailable or require authentication.
Troubleshooting
Common Issues
Server won't start:
Ensure Node.js 18+ is installed
Check that all dependencies are installed (
npm install)Verify the build completed successfully (
npm run build)
API rate limiting:
Get a Civitai API key and set the
CIVITAI_API_KEYenvironment variableReduce request frequency if experiencing limits
Models not found:
Check model ID accuracy
Verify the model hasn't been removed or made private
Ensure proper spelling in search queries
License
MIT License - see LICENSE file for details
Related Projects
Model Context Protocol - The MCP specification
Civitai - The AI model sharing platform
MCP Servers - Official MCP server implementations
Support
š Bug Reports: GitHub Issues
š” Feature Requests: GitHub Discussions
š Documentation: Civitai API Reference
š§ MCP Documentation: Model Context Protocol
Available Tools
14 toolsbrowse_imagesC
Browse AI-generated images from Civitai
Inputs: limit, modelId, modelVersionId, nsfw, +5 more.
get_creatorsC
Browse and search for model creators on Civitai
Inputs: limit, page, query.
get_download_urlC
Get the download URL for a specific model version
Inputs: modelVersionId (required).
get_latest_modelsC
Get the newest models uploaded to Civitai
Inputs: limit.
get_modelC
Get detailed information about a specific model by ID
Inputs: modelId (required).
get_models_by_typeC
Get models filtered by type (Checkpoint, LORA, etc.)
Inputs: type (required), limit, sort.
get_model_versionC
Get detailed information about a specific model version
Inputs: modelVersionId (required).
get_model_version_by_hashC
Get model version information by file hash
Inputs: hash (required).
get_popular_modelsC
Get the most popular/downloaded models
Inputs: limit, period.
get_tagsC
Browse and search for model tags on Civitai
Inputs: limit, page, query.
get_top_rated_modelsC
Get the highest rated models
Inputs: limit, period.
search_modelsC
Search for AI models on Civitai with various filters
Inputs: baseModels, limit, nsfw, page, +4 more.
search_models_by_creatorC
Search for models by a specific creator
Inputs: username (required), limit, sort.
search_models_by_tagC
Search for models by a specific tag
Inputs: tag (required), limit, sort.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 14 tools
Most tools have distinct purposes focused on different aspects of the Civitai platform (browsing images, getting creators, downloading models, searching with various filters). However, there is some overlap between search_models, search_models_by_creator, and search_models_by_tag that could potentially cause confusion about which to use for specific search scenarios.
All tool names follow a consistent verb_noun pattern with clear, descriptive names. The naming convention is uniform throughout (get_, browse_, search_) with no mixing of styles or conventions.
14 tools is well-scoped for a Civitai server covering models, creators, tags, and images. Each tool appears to serve a specific purpose within the domain without obvious redundancy or bloat.
The toolset provides comprehensive coverage for browsing, searching, and retrieving information about models, creators, tags, and images. Minor gaps might include operations like creating or updating content (if the API supports it), but for a read-only browsing interface, the coverage is quite complete.
Maintenance
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Search and fetch curated AI agent skills, prompts and MCP servers.
Generate images, video, audio and short films with 140+ AI models from any MCP client.
Create, browse, remix, collaborate on, and run durable AI workflow nodes from MCP hosts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with the Civitai API to search for AI models, browse images, and access creator information. It provides tools for filtering models by popularity, rating, or type and retrieving detailed version metadata.MIT
- AlicenseAqualityBmaintenanceA comprehensive MCP server for interacting with the Civitai API to search models, browse images with generation prompts, and manage downloads. It features extensive support for various base models like SDXL and Flux, includes NSFW filtering, and provides automated download commands for ComfyUI.2132 PyPI26MIT

Civitai MCP Serverofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to fully interact with the Civitai platform, including browsing models, images, and creators; posting, reacting, reviewing, following, collecting, writing articles and comments; sending DMs; and managing bounties and announcements.2Apache 2.0- FlicenseAqualityDmaintenanceEnables browsing Hedra's model catalog and managing AI generation jobs, including submitting, polling, and uploading files, through MCP clients.14-