{
  "markdown": "# mcp-drawthings\n\nAn 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.\n\n## Features\n\n- **Text-to-Image Generation** - Generate images from text prompts using the currently loaded model in Draw Things\n- **Image-to-Image Transformation** - Transform existing images using text prompts\n- **Configuration Access** - Query the current Draw Things settings and loaded model\n- **Local Processing** - All image generation runs locally on your Mac using Apple Silicon (M1/M2/M3/M4)\n\n## Prerequisites\n\n- macOS with Apple Silicon (M1/M2/M3/M4)\n- [Draw Things](https://drawthings.ai/) app installed\n- Node.js 18 or later\n\n## Setup\n\n### 1. Enable Draw Things API Server\n\n1. Open Draw Things\n2. Click the gear icon (⚙️) to open Settings\n3. Enable **API Server** / **HTTP Server**\n4. The server runs on port 7860 by default\n\nVerify the server is running:\n\n```bash\ncurl http://localhost:7860\n```\n\n### 2. Configure Your MCP Client\n\n#### Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"drawthings\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-drawthings\"]\n    }\n  }\n}\n```\n\n#### Cursor\n\nAdd to `.cursor/mcp.json` in your project or global config:\n\n```json\n{\n  \"mcpServers\": {\n    \"drawthings\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-drawthings\"]\n    }\n  }\n}\n```\n\n### 3. Restart Your MCP Client\n\nRestart Claude Desktop or Cursor to load the new MCP server.\n\n## Available Tools\n\n### `check_status`\n\nCheck if the Draw Things API server is running and accessible.\n\n### `get_config`\n\nGet the current Draw Things configuration including the loaded model and settings.\n\n### `generate_image`\n\nGenerate an image from a text prompt.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `prompt` | string | Yes | Text description of the image to generate |\n| `negative_prompt` | string | No | Elements to exclude from the generated image |\n| `width` | number | No | Image width in pixels (default: 512) |\n| `height` | number | No | Image height in pixels (default: 512) |\n| `steps` | number | No | Number of inference steps (default: 20) |\n| `cfg_scale` | number | No | Guidance scale (default: 7.5) |\n| `seed` | number | No | Random seed for reproducibility (-1 for random) |\n| `output_path` | string | No | Custom file path to save the image |\n\n**Example:**\n```\nGenerate an image of a futuristic city at sunset with flying cars\n```\n\n### `transform_image`\n\nTransform an existing image using a text prompt (img2img).\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `prompt` | string | Yes | Text description of the desired transformation |\n| `image_path` | string | No* | Path to the source image file |\n| `image_base64` | string | No* | Base64-encoded source image |\n| `negative_prompt` | string | No | Elements to exclude |\n| `denoising_strength` | number | No | Transformation strength 0.0-1.0 (default: 0.75) |\n| `steps` | number | No | Number of inference steps (default: 20) |\n| `cfg_scale` | number | No | Guidance scale (default: 7.5) |\n| `seed` | number | No | Random seed (-1 for random) |\n| `output_path` | string | No | Custom file path to save the result |\n\n*Either `image_path` or `image_base64` must be provided.\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `DRAWTHINGS_HOST` | `localhost` | Draw Things API host |\n| `DRAWTHINGS_PORT` | `7860` | Draw Things API port |\n| `DRAWTHINGS_OUTPUT_DIR` | `~/Pictures/drawthings-mcp` | Directory for generated images |\n\n## Architecture\n\n```\n┌─────────────────┐     stdio      ┌──────────────────┐     HTTP      ┌─────────────┐\n│   MCP Client    │◄──────────────►│  mcp-drawthings  │◄────────────►│ Draw Things │\n│ (Claude/Cursor) │   JSON-RPC     │                  │  localhost    │    App      │\n└─────────────────┘                └──────────────────┘   :7860       └─────────────┘\n                                           │\n                                           ▼\n                                   ┌──────────────┐\n                                   │  File System │\n                                   │   (images)   │\n                                   └──────────────┘\n```\n\n## Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/james-see/mcp-drawthings\ncd mcp-drawthings\n\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Run in development mode\nnpm run dev\n```\n\n## Troubleshooting\n\n### \"Cannot connect to Draw Things API\"\n\n1. Make sure Draw Things is running\n2. Check that the API Server is enabled in Draw Things settings\n3. Verify the server is accessible: `curl http://localhost:7860`\n4. Check if a different port is configured in Draw Things\n\n### Images not generating\n\n1. Make sure a model is loaded in Draw Things\n2. Check Draw Things for any error messages\n3. Try generating an image directly in Draw Things first\n\n### Permission errors saving images\n\nCheck that the output directory is writable. You can set a custom directory using the `DRAWTHINGS_OUTPUT_DIR` environment variable.\n\n## License\n\nMIT\n\n## Related Projects\n\n- [Draw Things](https://drawthings.ai/) - The AI image generation app for Mac/iOS\n- [Model Context Protocol](https://modelcontextprotocol.io/) - The protocol specification\n- [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk) - TypeScript SDK for MCP\n",
  "bytes": 5603,
  "sha": "7b74a099aec8c2fec1a75dc9b05bc9f12488e89b9efe79c672440a58044c0f29",
  "repo_slug": "james-see/mcp-drawthings",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_james_see_mcp_drawthings_4c589525/readme"
}