Mcp Drawthings

io.github.james-see由 GitHub 帳號 james-see 發布v1.1.2更新於 Oct 24, 2026

MCP server for Draw Things - local AI image generation on Mac

已驗證STDIO僅桌面媒體與設計AI 與機器學習

概覽

AI 產生的概覽

此 MCP 伺服器讓助理透過 Apple Silicon Mac 上的 Draw Things 應用程式在本機產生與轉換影像。

可以做什麼
  • 檢查 Draw Things API 伺服器是否可連線,並讀取目前設定,包括已載入的模型與參數
  • 依文字提示產生影像,可設定負面提示、尺寸、步數、引導係數、隨機種子與輸出路徑
  • 以文字提示轉換既有影像,來源可為檔案路徑或 base64 資料,並可調整去噪強度
  • 將結果存到預設圖片資料夾或自訂輸出路徑
適用情境
適合希望助理在 Mac 上以本機 Stable Diffusion 模型創作或改寫影像、而不把提示詞送到雲端影像服務的情境。適合已在使用 Draw Things,並想在 Claude Desktop、Cursor 等 MCP 用戶端中直接產生影像的使用者。
執行需求
Apple Silicon(M1 以上)的 macOS、已安裝並啟用 API/HTTP 伺服器的 Draw Things 應用程式(預設連接埠 7860),以及執行此 npm 套件所需的 Node.js 18 或更新版本。可選環境變數 DRAWTHINGS_HOST、DRAWTHINGS_PORT 與 DRAWTHINGS_OUTPUT_DIR 可調整主機、連接埠與輸出資料夾。
安裝前請注意
伺服器會將影像檔寫入磁碟,預設位於使用者的圖片資料夾,並接受自訂輸出路徑,請確認檔案存放位置。它會連線到 Draw Things 應用程式提供的本機 HTTP 端點,該端點需啟用並保持執行。產生過程相當耗費運算資源,尺寸較大或步數較高時可能較慢。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Drawthings,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-drawthings

An MCP (Model Context Protocol) server for Draw Things - enabling LLMs to generate images locally on Mac using Stable Diffusion and other AI models.

Features

  • Text-to-Image Generation - Generate images from text prompts using the currently loaded model in Draw Things
  • Image-to-Image Transformation - Transform existing images using text prompts
  • Configuration Access - Query the current Draw Things settings and loaded model
  • Local Processing - All image generation runs locally on your Mac using Apple Silicon (M1/M2/M3/M4)

Prerequisites

  • macOS with Apple Silicon (M1/M2/M3/M4)
  • Draw Things app installed
  • Node.js 18 or later

Setup

1. Enable Draw Things API Server

  1. Open Draw Things
  2. Click the gear icon (⚙️) to open Settings
  3. Enable API Server / HTTP Server
  4. The server runs on port 7860 by default

Verify the server is running:

bash
curl http://localhost:7860

2. Configure Your MCP Client

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "drawthings": {      "command": "npx",      "args": ["-y", "mcp-drawthings"]    }  }}
Cursor

Add to .cursor/mcp.json in your project or global config:

json
{  "mcpServers": {    "drawthings": {      "command": "npx",      "args": ["-y", "mcp-drawthings"]    }  }}

3. Restart Your MCP Client

Restart Claude Desktop or Cursor to load the new MCP server.

Available Tools

check_status

Check if the Draw Things API server is running and accessible.

get_config

Get the current Draw Things configuration including the loaded model and settings.

generate_image

Generate an image from a text prompt.

Parameters:

ParameterTypeRequiredDescription
promptstringYesText description of the image to generate
negative_promptstringNoElements to exclude from the generated image
widthnumberNoImage width in pixels (default: 512)
heightnumberNoImage height in pixels (default: 512)
stepsnumberNoNumber of inference steps (default: 20)
cfg_scalenumberNoGuidance scale (default: 7.5)
seednumberNoRandom seed for reproducibility (-1 for random)
output_pathstringNoCustom file path to save the image

Example:

Generate an image of a futuristic city at sunset with flying cars

transform_image

Transform an existing image using a text prompt (img2img).

Parameters:

ParameterTypeRequiredDescription
promptstringYesText description of the desired transformation
image_pathstringNo*Path to the source image file
image_base64stringNo*Base64-encoded source image
negative_promptstringNoElements to exclude
denoising_strengthnumberNoTransformation strength 0.0-1.0 (default: 0.75)
stepsnumberNoNumber of inference steps (default: 20)
cfg_scalenumberNoGuidance scale (default: 7.5)
seednumberNoRandom seed (-1 for random)
output_pathstringNoCustom file path to save the result

*Either image_path or image_base64 must be provided.

Configuration

Environment Variables

VariableDefaultDescription
DRAWTHINGS_HOSTlocalhostDraw Things API host
DRAWTHINGS_PORT7860Draw Things API port
DRAWTHINGS_OUTPUT_DIR~/Pictures/drawthings-mcpDirectory for generated images

Architecture

┌─────────────────┐     stdio      ┌──────────────────┐     HTTP      ┌─────────────┐│   MCP Client    │◄──────────────►│  mcp-drawthings  │◄────────────►│ Draw Things ││ (Claude/Cursor) │   JSON-RPC     │                  │  localhost    │    App      │└─────────────────┘                └──────────────────┘   :7860       └─────────────┘                                           │                                           ▼                                   ┌──────────────┐                                   │  File System │                                   │   (images)   │                                   └──────────────┘

Development

bash
# Clone the repositorygit clone https://github.com/james-see/mcp-drawthingscd mcp-drawthings
# Install dependenciesnpm install
# Buildnpm run build
# Run in development modenpm run dev

Troubleshooting

"Cannot connect to Draw Things API"

  1. Make sure Draw Things is running
  2. Check that the API Server is enabled in Draw Things settings
  3. Verify the server is accessible: curl http://localhost:7860
  4. Check if a different port is configured in Draw Things

Images not generating

  1. Make sure a model is loaded in Draw Things
  2. Check Draw Things for any error messages
  3. Try generating an image directly in Draw Things first

Permission errors saving images

Check that the output directory is writable. You can set a custom directory using the DRAWTHINGS_OUTPUT_DIR environment variable.

License

MIT

Related Projects

來源:README.md,提交 1c7b861

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分