Mcp Drawthings

by james-see

539 downloads
Not rated
GitHub

Description

# mcp-drawthings An MCP (Model Context Protocol) server for [Draw Things](https://drawthings.ai/) - 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…

About

# mcp-drawthings An MCP (Model Context Protocol) server for [Draw Things](https://drawthings.ai/) - 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…

Details

Author
james-see
Downloads
539
Categories
Other

- Text-to-image generation using locally loaded Stable Diffusion models
- Image-to-image transformation with prompt-guided editing
- Query current Draw Things configuration and loaded model
- All processing runs locally on Apple Silicon Macs
- Save generated images to a configurable output directory

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Mcp Drawthings
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install and configure the server via npx -y mcp-drawthings in your MCP client (Claude Desktop or Cursor). Before use, enable the API Server in Draw Things settings (default port 7860). Once connected, the server exposes four tools: check_status, get_config, generate_image, and transform_image. Customize host, port, and output directory via environment variables DRAWTHINGS_HOST, DRAWTHINGS_PORT, and DRAWTHINGS_OUTPUT_DIR.

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 using the Draw Things app. The image will be saved to disk and the file path returned.

transform_image

Transform an existing image using a text prompt (img2img). Either image_path or image_base64 must be provided.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

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:
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| prompt | string | Yes | Text description of the image to generate |
| negative_prompt | string | No | Elements to exclude from the generated image |
| width | number | No | Image width in pixels (default: 512) |
| height | number | No | Image height in pixels (default: 512) |
| steps | number | No | Number of inference steps (default: 20) |
| cfg_scale | number | No | Guidance scale (default: 7.5) |
| seed | number | No | Random seed for reproducibility (-1 for random) |
| output_path | string | No | Custom 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:
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| prompt | string | Yes | Text description of the desired transformation |
| image_path | string | No | Path to the source image file |
| image_base64 | string | No
| Base64-encoded source image |
| negative_prompt | string | No | Elements to exclude |
| denoising_strength | number | No | Transformation strength 0.0-1.0 (default: 0.75) |
| steps | number | No | Number of inference steps (default: 20) |
| cfg_scale | number | No | Guidance scale (default: 7.5) |
| seed | number | No | Random seed (-1 for random) |
| output_path | string | No | Custom file path to save the result |

*Either image_path or image_base64 must be provided.

Configuration

Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| DRAWTHINGS_HOST | localhost | Draw Things API host |
| DRAWTHINGS_PORT | 7860 | Draw Things API port |
| DRAWTHINGS_OUTPUT_DIR | ~/Pictures/drawthings-mcp | Directory for generated images |

Architecture

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

Development

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.