svg-editor
Enables interactive editing of scientific SVG figures in chat, allowing users to open, inspect, modify, undo/redo, and export SVGs through direct manipulation or natural language commands.
README
<p align="center"> <img src=".github/assets/svg-editor-banner.svg" alt="SVG Editor for Claude Science and Wisp Science — MCP App for scientific figures, matplotlib SVG, and ggplot SVG." width="100%" /> </p>
SVG Editor for Claude Science
简体中文 · Quickstart · Releases · Wisp Science · Motif-style plugin layout
SVG Editor is an AI-native MCP App for Claude Science and Wisp Science.
It opens scientific SVG figures — including matplotlib, ggplot2, and
Illustrator exports — as an interactive workbench. You edit titles, colors,
fonts, legends, and panel letters by hand or by spoken / written
instruction. The agent applies surgical svg_apply operations instead of
redrawing the plot.
Claude Science and Wisp Science can call svg_open_editor to mount the live
MCP App (ui://svg-editor/editor.html). If the host does not display the App,
svg_create_artifact returns a self-contained HTML editor that opens in the
right pane.
<p align="center"> <img src="docs/assets/svg-editor-workbench.png" alt="SVG Editor MCP App workbench showing a two-panel scientific figure, layer list, property inspector, and a natural-language command bar for Claude Science and Wisp Science." width="100%" /> </p>
<p align="center"><em>SVG Editor as an MCP App: click to edit a matplotlib/ggplot SVG, or send an instruction such as “change the title to Figure 2A”.</em></p>
This repository is the source for the workbench, Claude / Wisp plugin, skill, and local stdio MCP connector. It is an independent project, not an Anthropic product.
Install with a coding agent
Give Claude Code, Codex, or another local coding agent with terminal access this repository and the following request:
Install the latest released version of SVG Editor for Claude Science from
https://github.com/xuzhougeng/svg-editor.
Follow docs/QUICKSTART.md. Use the published
svg-editor-for-claude-science.zip from GitHub Releases. Verify the release
SHA-256 before installing into Wisp Science (Settings → Plugins) or loading
it as a Claude Science / Claude Code plugin. Do not run npm for an end-user
release install. Use examples/sample-figure.svg for the first test.
Tell me when I need to enable the plugin, start a new session, or reconnect
the MCP server.
For manual installation, follow the quickstart.
What is included
- Interactive SVG canvas: select, pan/zoom, drag, undo/redo
- Property inspector for fill, stroke, font, opacity, and text
- Layer list for matplotlib / ggplot / Illustrator element trees
- Spoken / typed command bar (
ui/message) plus a small local grammar - Live MCP App for Wisp Science and Claude Science (
text/html;profile=mcp-app) - Model tools:
svg_open_editor,svg_inspect,svg_apply,svg_get,svg_undo,svg_redo - Fallback:
svg_create_artifactreturns a self-contained HTML workbench - Surgical edits:
set_text,recolor,set_font,translate,hide— no silent redraw of data paths - Deterministic Claude plugin layout:
.claude-plugin/plugin.json,.mcp.json,skills/*/SKILL.md
First success
Build or install the plugin, enable it, then attach
examples/sample-figure.svg and ask:
Read the complete text of examples/sample-figure.svg. Call svg_open_editor
with filename "sample-figure.svg" and the complete SVG. If no live MCP App
frame appears, call svg_create_artifact, preserve the exact returned HTML,
and open it in the right pane. Then call svg_inspect and change the title
to "Figure 2A" with svg_apply. Do not redraw the bars or lines.
Develop from source
Requires Git and Node.js 20.19+ (22+ recommended):
git clone https://github.com/xuzhougeng/svg-editor.git
cd svg-editor
npm ci
npm test
npm run preview
npm run build
writes:
dist/mcp-app.html
dist/svg-editor-mcp.mjs
dist-plugin/ # Claude Science / Wisp plugin tree
svg-editor-for-claude-science.zip
svg-editor-for-claude-science.checksums.json
Tools
| Tool | Role |
|---|---|
svg_open_editor |
Open the live SVG editor MCP App |
svg_inspect |
List #id / data-se-id / text / paints |
svg_apply |
Surgical operations on the live document |
svg_get |
Return the current SVG |
svg_undo / svg_redo |
Document history |
svg_create_artifact |
Self-contained HTML fallback |
svg_commit |
App-only canvas save |
Selectors: #id, [data-se-id="e12"], text:Exact, text:~partial, simple CSS.
Data safety
The editor has no hosted backend. SVG stays in the local MCP process and the
sandboxed iframe. <script>, foreignObject, event handlers, and
javascript: URLs are stripped. The iframe CSP allows no network. Data
supplied through Claude Science or Wisp Science remains subject to those
hosts’ policies. See SECURITY.md.
License
MIT.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。