Sponsored by Deepsite.site

Mcp Drawthings

Created By
james-seea month ago
Content

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:

curl http://localhost:7860

2. Configure Your MCP Client

Claude Desktop

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

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

Cursor

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

{
  "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

# Clone the repository
git clone https://github.com/james-see/mcp-drawthings
cd mcp-drawthings

# Install dependencies
npm install

# Build
npm run build

# Run in development mode
npm 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

Server Config

{
  "mcpServers": {
    "drawthings": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-drawthings"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
CursorThe AI Code Editor
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
DeepChatYour AI Partner on Desktop
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic
Playwright McpPlaywright MCP server
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.