openpencil/packages/mcp
Danila Poyarkov 8404cee664
refactor(design-jsx): extract design JSX into its own package (#793)
* refactor(design-jsx): extract design JSX into its own package

Design JSX elements, helpers, schema, reference, and JSX export only need
the scene graph, yet lived in Core, so every consumer of the authoring API
pulled in the renderer, layout, and file formats.

@open-pencil/design-jsx now owns them and depends only on scene-graph. The
renderer takes icon lookup, SVG conversion, vector creation, and layout as
DesignJSXServices; Core binds its own and exports the bound renderJSX and
renderTree from @open-pencil/core/design-jsx.

* feat(design-jsx): export the JSX runtime for TSX authoring

The package already had a JSX runtime, but nothing exported it, so design
trees could only be written as function calls or JSX strings. Export
`./jsx-runtime` and `./jsx-dev-runtime` so `jsxImportSource` works, and make
`Fragment` produce the same empty-type node as `<>` in `renderJSX` strings.

* fix(design-jsx): render fragments nested in other elements

A fragment builds a node with an empty type, which only renderJSX expanded, and only at the root. Nested fragments and fragments passed to renderTree failed with 'Unknown element: <>'. Inline fragment children when trees are built, and share root expansion between renderTree and renderJSX.
2026-09-30 20:55:27 +04:00
..
bin build: publish node-compatible packages 2026-05-21 17:03:19 +03:00
src refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
tests fix(mcp): repair published exports and Windows roots 2026-08-31 15:01:41 +03:00
AGENTS.md docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00
package.json refactor(design-jsx): extract design JSX into its own package (#793) 2026-09-30 20:55:27 +04:00
README.md docs: route contributors through per-domain guides and ship npm license text (#785) 2026-09-29 01:02:06 +04:00
tsconfig.json feat(mcp): add local transport discovery 2026-07-25 21:29:03 +03:00
tsdown.config.ts feat(mcp)!: migrate to SDK v2 and Valibot 2026-09-14 00:54:13 +03:00

@open-pencil/mcp

Model Context Protocol server for OpenPencil. It lets MCP clients such as Claude Code, Cursor, and Windsurf inspect and edit designs through the running app, reusing the same tool definitions as the built-in AI chat.

npm install -g @open-pencil/mcp
openpencil-mcp        # stdio transport for MCP clients
openpencil-mcp-http   # Streamable HTTP transport for browser extensions and scripts

On macOS and Linux, local clients prefer a private Unix domain socket; Windows and unavailable sockets fall back to localhost TCP. File access is limited to the effective MCP root.

MIT License.