Skip to main content
Glama

MCP로 사물 그리기

모델 컨텍스트 프로토콜(MCP)을 사용하여 커서에 대한 Draw Things API 통합.

필수 조건

Related MCP server: AI Development Assistant MCP Server

설치

지엑스피1

커서 통합

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)
}

생성된 이미지는 <sanitized_prompt>_<timestamp>.png 파일 이름 형식으로 images 디렉토리에 저장됩니다.

응답 형식

성공:

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

오류:

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

문제 해결

문제가 발생하는 경우:

  • Draw Things API가 http://127.0.0.1:7888 에서 실행 중인지 확인하세요.

  • Cursor와 함께 사용하는 경우 ~/.cursor/logs 에 있는 로그 파일을 확인하세요.

  • src/index.js에 실행 권한이 있는지 확인하세요: chmod +x src/index.js

특허

MIT

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