Skip to main content
Glama

描くものMCP

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

前提条件

Related MCP server: AI Development Assistant MCP Server

インストール

# 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

ライセンス

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

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaokuohsuan/draw-things-mcp-cursor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server