像素放大mcp
MCP服务器,使用Google Gemini伪造像素艺术精灵和游戏资产——生成、裁剪、分割和处理,所有这些都来自你的人工智能助手。
特性
- 人工智能发电 --通过Google Gemini显示精灵、动画、背景、缩略图
- 智能后处理 --背景移除、自动裁剪、像素缩小、方形填充
- 雪碧片分割 --自动检测纸张并将其分割成单独的帧
- 风格预设 --霓虹灯,复古,游戏男孩,打喷嚏,干净
- 纯PNG管道 --零依赖PNG编码器/解码器,无原生模块
- 参考匹配 --传递现有的精灵以匹配视觉风格
安装
克劳德代码(CLI)
claude mcp add pixelforge npx pixelforge-mcp@latest \
--env GEMINI_API_KEY=your-api-key克劳德代码(插件)
/plugin marketplace add freema/pixelforge-mcp
/plugin install pixelforge-mcp重新启动Claude Code以加载MCP服务器(请检查 /mcp).
克劳德桌面版
添加到您的 claude_desktop_config.json:
{
"mcpServers": {
"pixelforge": {
"command": "npx",
"args": ["-y", "pixelforge-mcp@latest"],
"env": {
"GEMINI_API_KEY": "your-api-key"
}
}
}
}手册(任何MCP客户端)
添加到您的 .mcp.json 或等效配置:
{
"mcpServers": {
"pixelforge": {
"command": "npx",
"args": ["-y", "pixelforge-mcp@latest"],
"env": {
"GEMINI_API_KEY": "your-api-key"
}
}
}
}需求
- Node.js>=20
- Google Gemini API密钥
工具
forge_sprite
通过自动后处理(裁剪、背景图像删除、缩小比例、方形填充)生成单像素艺术精灵。
"Generate a green slime enemy sprite, 48px, retro style"必修的: description, outputPath 可选: size (默认值:48), style, background, aspect, square, model, references
forge_animation
将动画帧生成为子画面,然后自动拆分为单独的帧PNG。
"Animate a slime bouncing, 4 frames"必修的: description, action, outputPrefix 可选: frames (默认值:3), frameDescriptions, names, size, style, model, references
forge_background
生成完整的游戏背景——无裁剪,按原样输出图像。
"Deep space background with stars and nebula, 16:9"必修的: description, outputPath, aspect 可选: style, model
forge_thumbnail
生成游戏缩略图/屏幕截图。通过 references 为了与你的精灵在视觉上保持一致。
"Space shooter scene with player ship vs alien rows"必修的: description, outputPath 可选: references, aspect (默认值:4:3), style, model
process_sprite
对现有的PNG进行后处理——背景移除、自动裁剪、子画面分割。
"Split this sprite sheet into individual frames"必修的: inputPath 可选: outputPath, split, names, threshold, square, padding, skipCrop, skipTransparent
optimize_sprite
使用面积平均(不是模糊的双线性)将超大AI图像缩小到真正的像素艺术分辨率。
"Optimize this 1024px image down to 48px pixel art"必修的: inputPath, size 可选: outputPath, removeBackground, square
完整参数文档:请参阅 docs/tools.md
模型
| 别名 | 型号ID | 备注 |
|---|---|---|
nano-banana, banana | 纳米香蕉专业预览 | 默认 --最适合像素艺术 |
flash, gemini-flash | gemini-3.1闪光图像回顾 | 快速、可靠 |
pro, gemini-pro | gemini3-pro-image-review | 最佳质量 |
25, gemini-25 | gemini-2.5-flash-image | 稳定回退 |
提示
pixel_art_guide
内置MCP提示,具有全面的像素艺术生成指南——提示规则、风格提示、尺寸建议和最佳实践。
许可证
麻省理工学院——见 许可证
______________________________________________________________________
建造于 托马斯·格拉斯尔
