Token导航 LogoToken导航TokenDH.com
Draw Things MCP logo
设计创作stdio官方级别未说明来源级核验

Draw Things MCP

MCP Server

draw-things-mcp-cursor

Draw Things MCP是一个通过Model Context Protocol (MCP)将Draw Things API集成到Cursor中的工具,用于根据文本提示生成图像。

工具数

1

提示词数

0

GitHub Stars

14

资源数

0
图像生成JavaScriptCursorAPI集成Cursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

jaokuohsuan

提供方

jaokuohsuan

最后核验

2026/5/17 20:19

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx draw-things-mcp-cursor

详细介绍

绘制事物MCP

使用模型上下文协议(MCP)为Cursor绘制事物API集成。

先决条件

  • Node.js>=14.0.0
  • Draw Things API正在运行http://127.0.0.1:7888

安装

# Install globally
npm install -g draw-things-mcp-cursor

# Or run directly
npx draw-things-mcp-cursor

光标集成

要在Cursor中设置此工具,请参阅中的详细指南 cursor-setup.md.

快速设置:

  1. 创建或编辑 ~/.cursor/claude_desktop_config.json:
{
  "mcpServers": {
    "draw-things": {
      "command": "draw-things-mcp-cursor",
      "args": []
    }
  }
}
  1. 重新启动游标
  2. 在游标中使用: generateImage({"prompt": "a cute cat"})

CLI使用情况

生成图像

echo '{"prompt": "your prompt here"}' | 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": "a happy smiling dog, professional photography",
  "negative_prompt": "ugly, deformed, blurry",
  "width": 360,
  "height": 360,
  "steps": 4
}' | npx draw-things-mcp-cursor

MCP工具集成

当在Cursor中用作MCP工具时,该工具将注册为 generateImage 具有以下参数:

{
  prompt: string;       // Required - The prompt to generate the image from
  negative_prompt?: string;  // Optional - The negative prompt
  width?: number;       // Optional - Image width (default: 360)
  height?: number;      // Optional - Image height (default: 360)
  model?: string;       // Optional - Model name
  steps?: number;       // Optional - Number of steps (default: 8)
}

生成的图像将保存在 images 文件名格式为的目录: _.png

响应格式

成功:

{
  "type": "success",
  "content": [{
    "type": "image",
    "data": "base64 encoded image data",
    "mimeType": "image/png"
  }],
  "metadata": {
    "parameters": { ... }
  }
}

错误:

{
  "type": "error",
  "error": "error message",
  "code": 500
}

故障排除

如果您遇到问题:

  • 确保Draw Things API正在运行http://127.0.0.1:7888
  • 检查中的日志文件 ~/.cursor/logs 如果与游标一起使用
  • 确保src/index.js具有执行权限: chmod +x src/index.js

许可证

麻省理工学院

目录标签

目录标签

图像生成JavaScriptCursorAPI集成本地部署文本转图像AI工具

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

部署方式(deploymentType,部署类型)

local-only

来源包(packageName,安装包名)

draw-things-mcp-cursor

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP