drawing-mcp
Enables creating and refining pencil-style drawings as layered HTML Canvas snippets through natural language descriptions, using classical construction methodology.
README
drawing-mcp
A process-based pencil drawing MCP server. Connects to Claude Code and produces layered HTML Canvas drawings using a classical construction methodology.
What it does
Two tools:
analyse_subject— Takes a text description, returns a pencil construction drawing as a self-contained HTML canvas snippet. Works gesture → volumes → forms.refine_drawing— Takes the previous output and adds line quality, weight variation, or form shadow at detail levels 1–3.
Local development (Claude Code on your machine)
1. Install and build
npm install
npm run build
2. Set up environment
cp .env.example .env
# Edit .env — add your ANTHROPIC_API_KEY
3. Add to Claude Code
Edit your Claude Code MCP config (~/.claude/claude_desktop_config.json
or equivalent):
{
"mcpServers": {
"drawing-mcp": {
"command": "node",
"args": ["/absolute/path/to/drawing-mcp/dist/index.js"],
"env": {
"ANTHROPIC_API_KEY": "your_key_here"
}
}
}
}
Restart Claude Code. You should see analyse_subject and refine_drawing
in the available tools.
4. Test it
In Claude Code:
"Can you draw a bird perched on a branch, side view?"
Claude will call analyse_subject, return an HTML snippet. Paste it into
a Claude artifact or any HTML file to render.
Hosted deployment (DigitalOcean)
Droplet setup (one time)
# On the droplet as root
# Install Docker
curl -fsSL https://get.docker.com | sh
# Install Caddy
apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudflare.com/carlista/caddy/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
apt update && apt install caddy
# Create env file (never in the repo)
cp .env.example /root/drawing-mcp.env
chmod 600 /root/drawing-mcp.env
# Edit /root/drawing-mcp.env with real values
# Generate an API key
openssl rand -hex 32
# Paste the output as API_KEY in /root/drawing-mcp.env
# Copy Caddyfile
cp Caddyfile /etc/caddy/Caddyfile
# Edit /etc/caddy/Caddyfile — replace yourdomain.com with your domain
systemctl restart caddy
Firewall (DO Cloud Firewall or ufw)
Only these ports should be open to the public internet:
| Port | Protocol | Purpose |
|---|---|---|
| 22 | TCP | SSH (restrict to your IP if possible) |
| 80 | TCP | Caddy HTTP→HTTPS redirect |
| 443 | TCP | Caddy HTTPS |
Port 3000 must NOT be public — Caddy proxies to it internally.
Deploy
chmod +x deploy.sh
./deploy.sh root@your-droplet-ip
Connect Claude Code to hosted server
{
"mcpServers": {
"drawing-mcp": {
"url": "https://yourdomain.com/mcp",
"headers": {
"Authorization": "Bearer your_api_key_here"
}
}
}
}
Project structure
src/
index.ts — stdio entry point (local Claude Code)
server.ts — HTTP/SSE entry point (hosted)
schema.ts — Zod schemas for all inputs and outputs
prompts/
system.ts — System prompts (methodology IP — never exposed)
tools/
handlers.ts — Tool logic
anthropic-client.ts — Inner AI call, validation, security checks
rendering/
canvas.ts — Converts validated commands to HTML canvas snippet
security/
sanitise.ts — Input sanitisation, sentinel checks, error scrubbing
Security notes
- The Anthropic API key and system prompts never leave the server process
- All AI output is validated against a strict Zod schema before returning
- User input is sanitised before touching any prompt
- Sentinel checks detect and block prompt extraction attempts
- The container runs as a non-root user with a read-only filesystem
- Caddy handles TLS — the app only binds to localhost
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。