Automatically generate complete Live2D models from a single photo.
Live2D Automation MCP Server
从单张照片自动生成完整的 Live2D 模型。
功能特点
- AI 自动分析角色图片
- 自动生成 Live2D 分层
- 自动生成基础网格与绑定
- 自动配置物理与动作
- 支持 MCP 一键流水线调用
安装
pip install -r requirements.txt
使用
方法 1:在 VS Code 中使用 MCP
- 打开 VS Code 命令面板 (
Ctrl+Shift+P) - 运行
MCP: Add Server - 选择
Command - 输入:
python -m mcp_server.server
方法 2:直接运行
python -m mcp_server.server
方法 3:调用完整流水线
from mcp_server.server import full_pipeline
result = await full_pipeline(
image_path="path/to/photo.png",
output_dir="output/MyCharacter",
model_name="MyCharacter",
motion_types=["idle", "tap", "move", "emotional"],
)
MCP Tools
| 工具 | 说明 |
|---|---|
analyze_photo |
分析图片并创建隔离的 session_id |
generate_layers |
生成 Live2D 分层 |
create_mesh |
创建 ArtMesh 网格 |
setup_rigging |
设置骨骼绑定 |
configure_physics |
配置物理效果 |
generate_motions |
生成动作文件 |
full_pipeline |
一键完成完整流水线 |
安全约束
output_dir必须位于项目output/目录内model_name仅支持字母、数字、_、-- 支持的输入图片格式:
png、jpg、jpeg、webp
系统要求
- Python 3.8+
- NVIDIA GPU(推荐 8GB+ 显存)
- CUDA 11.8+(如使用 GPU)
License
MIT
Tools (7)
analyze_photoAnalyzes the input image and creates an isolated session ID.generate_layersGenerates the necessary Live2D layering for the model.create_meshCreates the ArtMesh grid for the model.setup_riggingSets up the skeletal rigging for the model.configure_physicsConfigures the physics effects for the model.generate_motionsGenerates the motion files for the model.full_pipelineExecutes the complete pipeline to create a Live2D model from start to finish.Configuration
{"mcpServers": {"live2d-automation": {"command": "python", "args": ["-m", "mcp_server.server"]}}}