🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

draw2agent

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draw2agent

Draw on your website, let your AI agent see it. Visual context for code generation via MCP.

Source
npmnpm
Version
2.0.1
Version published
Weekly downloads
17
-50%
Maintainers
1
Weekly downloads
 
Created
Source

draw2agent ✏️

npm version mcp-registry

Draw on your website. Your AI agent sees it.

draw2agent is an MCP server that lets you draw annotations directly on top of your local dev page. When you submit, your IDE agent receives a screenshot, structured DOM data, and annotation context to make precise code edits.

👉 Try it out at: draw2agent.vercel.app

Demo

draw2agent demo video

Quick Start

1. Add to your IDE (one-time)

Cursor (~/.cursor/mcp.json):

{
  "mcpServers": {
    "draw2agent": {
      "command": "npx",
      "args": ["-y", "draw2agent@latest"]
    }
  }
}

2. Use it

Tell your agent:

"Use draw2agent to fix the navbar"

  • 🌐 Agent opens your browser with drawing tools on your page
  • ✏️ Draw circles, arrows, text directly on your website
  • 📸 Click Submit
  • 🤖 Agent reads the visual context and applies code changes

How It Works

Your Dev Page (proxied)
├── Your original page content
└── Excalidraw overlay (transparent, on top)
    ├── Draw mode: annotate directly on the page
    ├── Select mode: interact with the page normally (Esc)
    └── Submit: screenshot + DOM + annotations → agent

Tools

The MCP server exposes the following tools:

ToolDescription
launch_canvasOpens your dev page with the drawing overlay
launch_ipad_canvasCreates a tunnel and returns a QR code for remote drawing from iPad/mobile
launch_scratchOpens a standalone Excalidraw whiteboard for freehand sketching
get_drawing_stateReturns screenshot, DOM nodes, and annotations for the current state

launch_canvas

The core tool — proxies your localhost dev server and injects an Excalidraw overlay. Draw annotations directly on your running app, then submit to send visual context to your agent. The tool blocks until you submit.

launch_ipad_canvas

Same as launch_canvas, but exposes the proxy over the internet via a secure tunnel. Returns a QR code that you can scan from your iPad or phone to draw annotations with touch. Perfect for whiteboard-style feedback sessions.

launch_scratch

Opens a blank Excalidraw whiteboard — no target URL needed. Sketch UI mockups, wireframes, or diagrams from scratch. Your agent receives the drawing and implements the design.

get_drawing_state

Returns the last captured drawing state (screenshot, DOM nodes, annotations) without launching a new session. Useful for re-fetching context.

License

MIT

Keywords

mcp

FAQs

Package last updated on 01 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts