Draw Things MCP

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Provides a Node.js runtime environment for the MCP server, with version 14.0.0 or higher required.

  • Enables installation and package management for the Draw Things MCP server.

  • Used for type definitions in the MCP tool integration, providing structured parameter typing for the generateImage function.

描くものMCP

モデル コンテキスト プロトコル (MCP) を使用したカーソル用の Draw Things API 統合。

前提条件

インストール

# 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ディレクトリに保存されます: <sanitized_prompt>_<timestamp>.png

応答フォーマット

成功:

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

エラー:

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

トラブルシューティング

問題が発生した場合:

  • http://127.0.0.1:7888で Draw Things API が実行されていることを確認します。
  • Cursor を使用する場合は~/.cursor/logsのログファイルを確認してください。
  • src/index.js に実行権限があることを確認します: chmod +x src/index.js

ライセンス

マサチューセッツ工科大学

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Cursor AI が自然言語プロンプトを使用して Draw Things API を通じて画像を生成できるようにする統合。

  1. Prerequisites
    1. Installation
      1. Cursor Integration
        1. CLI Usage
          1. Generate Image
          2. Parameters
          3. MCP Tool Integration
        2. Response Format
          1. Troubleshooting
            1. License
              ID: lsb9xcaj7h