loading…
Search for a command to run...
loading…
Enables interaction with the Civitai API to search for AI models, browse images, and access creator information. It provides tools for filtering models by popul
Enables 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.
A Python FastMCP implementation of an MCP server for interacting with the Civitai API. Browse AI models, images, creators, and more.
pip install -r requirements.txt
cp .env.example .env
# Edit .env file to set your Civitai API key
python civitai_mcp_server.py
docker run -d --name civitai-mcp-server -p 8000:8000 -e CIVITAI_API_KEY=your_api_key_here waura/civitai-mcp-server:latest
docker build -t civitai-mcp-server .
docker run -d --name civitai-mcp-server -p 8000:8000 -e CIVITAI_API_KEY=your_api_key_here civitai-mcp-server
Access the MCP server at http://localhost:8000/mcp
Stop the container:
docker stop civitai-mcp-server
docker rm civitai-mcp-server
Deploy using Amazon Bedrock AgentCore starter toolkit
agentcore configure -e civitai_mcp_server.py --protocol MCP
agentcore launch
Add the following to your Kiro configuration file (.kiro/settings/mcp.json):
{
"mcpServers": {
"civitai": {
"command": "python",
"args": ["path/to/civitai_mcp_server.py"],
"env": {
"CIVITAI_API_KEY": "your_api_key_here"
},
"disabled": false,
"autoApprove": []
}
}
}
Option 1: HTTP Transport (推奨)
Add the following to your Kiro configuration file (.kiro/settings/mcp.json):
{
"mcpServers": {
"civitai": {
"transport": "http",
"url": "http://localhost:8000/mcp",
"disabled": false,
"autoApprove": []
}
}
}
Option 2: Docker Command (Pre-built Image)
{
"mcpServers": {
"civitai": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-p", "8000:8000",
"-e", "CIVITAI_API_KEY=your_api_key_here",
"waura/civitai-mcp-server:latest"
],
"disabled": false,
"autoApprove": []
}
}
}
Option 3: Docker Command (Local Build)
{
"mcpServers": {
"civitai": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-p", "8000:8000",
"-e", "CIVITAI_API_KEY=your_api_key_here",
"civitai-mcp-server"
],
"disabled": false,
"autoApprove": []
}
}
}
Option 4: curl Command
{
"mcpServers": {
"civitai": {
"command": "curl",
"args": ["-X", "POST", "http://localhost:8000/mcp"],
"disabled": false,
"autoApprove": []
}
}
}
search_models: Search models with query, type, sort filtersget_model: Get detailed model information by IDget_model_version: Get model version detailsget_model_version_by_hash: Get model version by file hashget_popular_models: Get popular modelsget_latest_models: Get newest modelsget_top_rated_models: Get highest rated modelssearch_models_by_tag: Search models by tagsearch_models_by_creator: Search models by creatorget_models_by_type: Filter models by typeget_download_url: Get download URLget_images: Get imagesget_creators: Search creatorsget_tags: Search tagsThis server also provides structured resource definitions that can be accessed via FastMCP resource URIs:
civitai://models/{limit} - List models with filtering options (limit parameter required)civitai://models/{model_id} - Get specific model detailscivitai://model-versions/{version_id} - Get model version detailscivitai://model-versions/by-hash/{hash} - Get model version by file hashcivitai://images/{limit} - List images with filtering options (limit parameter required)civitai://creators/{limit} - List creators (limit parameter required)civitai://tags/{limit} - List tags (limit parameter required)These resources provide structured data models that can be used programmatically by MCP clients.
A Civitai API key is not required but recommended for:
You can get an API key from your Civitai account settings.
# Search models
search_models(query="anime", limit=10, sort="Most Downloaded")
# Get specific model details
get_model(model_id=12345)
# Get popular LORA models
get_models_by_type(type="LORA", sort="Most Downloaded", limit=5)
# Get images
get_images(limit=20, nsfw="None", sort="Newest")
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"civitai-mcp-server": {
"command": "npx",
"args": []
}
}
}