
Draw Things MCP
一个集成,允许 Cursor AI 通过 Draw Things API 使用自然语言提示生成图像。
Tools
generateImage
Generate an image based on a prompt
README
Draw Things MCP
使用模型上下文协议 (MCP) 为 Cursor 集成的 Draw Things API。
前提条件
- Node.js >= 14.0.0
- Draw Things API 运行在 http://127.0.0.1:7888
安装
# 全局安装
npm install -g draw-things-mcp-cursor
# 或者直接运行
npx draw-things-mcp-cursor
Cursor 集成
要在 Cursor 中设置此工具,请参阅 cursor-setup.md 中的详细指南。
快速设置:
- 创建或编辑
~/.cursor/claude_desktop_config.json
:
{
"mcpServers": {
"draw-things": {
"command": "draw-things-mcp-cursor",
"args": []
}
}
}
- 重启 Cursor
- 在 Cursor 中使用:
generateImage({"prompt": "a cute cat"})
CLI 用法
生成图像
echo '{"prompt": "你的提示语"}' | npx draw-things-mcp-cursor
参数
prompt
: 用于图像生成的文本提示语 (必需)negative_prompt
: 用于图像生成的负面提示语width
: 图像宽度 (默认: 360)height
: 图像高度 (默认: 360)steps
: 生成步骤数 (默认: 8)model
: 用于生成的模型 (默认: "flux_1_schnell_q5p.ckpt")sampler
: 采样方法 (默认: "DPM++ 2M AYS")
示例:
echo '{
"prompt": "一只快乐微笑的狗,专业摄影",
"negative_prompt": "丑陋,畸形,模糊",
"width": 360,
"height": 360,
"steps": 4
}' | npx draw-things-mcp-cursor
MCP 工具集成
当在 Cursor 中用作 MCP 工具时,该工具将被注册为 generateImage
,并具有以下参数:
{
prompt: string; // 必需 - 用于生成图像的提示语
negative_prompt?: string; // 可选 - 负面提示语
width?: number; // 可选 - 图像宽度 (默认: 360)
height?: number; // 可选 - 图像高度 (默认: 360)
model?: string; // 可选 - 模型名称
steps?: number; // 可选 - 步骤数 (默认: 8)
}
生成的图像将保存在 images
目录中,文件名格式为:
<sanitized_prompt>_<timestamp>.png
响应格式
成功:
{
"type": "success",
"content": [{
"type": "image",
"data": "base64 编码的图像数据",
"mimeType": "image/png"
}],
"metadata": {
"parameters": { ... }
}
}
错误:
{
"type": "error",
"error": "错误信息",
"code": 500
}
故障排除
如果您遇到问题:
- 确保 Draw Things API 正在 http://127.0.0.1:7888 运行
- 如果与 Cursor 一起使用,请检查
~/.cursor/logs
中的日志文件 - 确保 src/index.js 具有执行权限:
chmod +x src/index.js
许可证
MIT
推荐服务器
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
@kazuph/mcp-fetch
用于获取网页内容和处理图像的模型上下文协议服务器。这使得 Claude Desktop(或任何 MCP 客户端)能够适当地获取网页内容和处理图像。
mermaid-mcp-server
一个模型上下文协议 (MCP) 服务器,用于将 Mermaid 图表转换为 PNG 图像。
mcp-pinterest
用于图像搜索和信息检索的 Pinterest 模型上下文协议 (MCP) 服务器
DeepSRT MCP Server
一个 MCP 服务器,通过与 DeepSRT 的 API 集成,使用户能够以多种语言和格式生成 YouTube 视频的摘要。 (Alternatively, a slightly more formal translation:) 一个 MCP 服务器,它与 DeepSRT 的 API 集成,使用户能够生成多种语言和格式的 YouTube 视频摘要。
ScreenshotOne MCP Server
一个官方的 MCP 服务器实现,它允许 AI 助手通过 ScreenshotOne API 捕获网站截图,从而在对话期间提供来自网页的视觉上下文。
Glif
通过 MCP 运行托管在 Glif.app 上的 AI 工作流程,包括基于 ComfyUI 的图像生成器、表情包生成器、自拍、链式 LLM 调用等等。
WebPerfect MCP Server
一个智能的MCP服务器,具有全自动化的批处理流水线,可用于生成适用于网络的图像。功能包括降噪、自动色阶/曲线、JPEG伪影去除、4K调整大小、智能锐化(带阴影/高光增强)以及高级WebP转换。
Stealth Browser MCP Server
使用 Playwright 提供隐身浏览器功能,采用反检测技术,使 MCP 客户端能够浏览网站并截取屏幕截图,同时规避常见的机器人检测系统。

Video Editor MCP Server
使用自然语言命令进行视频编辑,由 FFmpeg 提供支持,支持剪辑、合并、格式转换等操作,并具有实时进度跟踪和错误处理功能。