
Draw2agent
io.github.zero-abdPublished by GitHub account zero-abdv1.3.4Updated Oct 24, 2026
Draw on your website, let your AI agent see it. Visual context for code generation via MCP.
Overview
Lets an assistant open your local dev page with a drawing overlay, then read your annotations, screenshot and DOM data to make code edits.
- What you can do
- Draw2agent proxies your localhost dev server and injects a transparent Excalidraw overlay so you can circle, arrow and label parts of a running page. Tools include launch_canvas, launch_ipad_canvas (serves the page on your LAN with a QR code for touch drawing), launch_scratch (a blank whiteboard for mockups), and get_drawing_state, which returns the last screenshot, DOM nodes and annotations. The launch tools block until you submit the drawing.
- When to use it
- Useful when you want to point at a specific element of a running web app instead of describing it in words, for UI fixes, layout feedback, or sketching a mockup for the agent to implement.
- Requirements
- Runs locally over stdio as the npm package draw2agent, typically started with npx, so Node.js is needed. It expects a local dev server to proxy, and the iPad/mobile mode requires the phone and computer to be on the same Wi-Fi network. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open Draw2agent in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
draw2agent ✏️
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
Quick Start
1. Add to your IDE (one-time)
Cursor (~/.cursor/mcp.json):
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
Tools
The MCP server exposes the following tools:
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 serves the proxy on your computer's local network (LAN) address. Automatically opens a new browser tab on your computer with a QR code. Scan it from your iPad or phone — connected to the same Wi-Fi network — to draw annotations with touch. Perfect for whiteboard-style feedback sessions. No internet tunnel required, so it's fast and reliable.
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.
Releasing
Publishing to npm is automated via GitHub Actions (.github/workflows/publish.yml).
To cut a release, just bump the version and push to main:
When package.json's version changes on main, the workflow builds the
server + overlay and publishes the new version to npm. You can also trigger it
manually from the Actions tab (e.g. to publish the current version).
One-time setup: npm Trusted Publishing
The workflow authenticates with npm via OIDC — no NPM_TOKEN secret needed.
Configure the trusted publisher once:
- Go to npmjs.com/package/draw2agent → Settings → Trusted Publisher.
- Choose GitHub Actions and enter:
- Organization or user:
zero-abd - Repository:
draw2agent - Workflow filename:
publish.yml
- Organization or user:
- Save.
This also satisfies npm's 2FA requirement, so publishing works even with
account 2FA enabled. (Alternative: create an npm Granular Access Token with
publish rights, add it as the NPM_TOKEN repo secret, and set
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} on the publish step instead.)
License
MIT
Source: README.md at commit f5b0d57
Tools
0Version history
1- v1.3.4LatestSep 16, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.