mcp-excalidraw-server 1.0.7 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +248 -194
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +41 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli/args.d.ts +14 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +74 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/commands/arrange.d.ts +2 -0
- package/dist/cli/commands/arrange.d.ts.map +1 -0
- package/dist/cli/commands/arrange.js +85 -0
- package/dist/cli/commands/arrange.js.map +1 -0
- package/dist/cli/commands/elements.d.ts +7 -0
- package/dist/cli/commands/elements.d.ts.map +1 -0
- package/dist/cli/commands/elements.js +209 -0
- package/dist/cli/commands/elements.js.map +1 -0
- package/dist/cli/commands/install-skill.d.ts +2 -0
- package/dist/cli/commands/install-skill.d.ts.map +1 -0
- package/dist/cli/commands/install-skill.js +108 -0
- package/dist/cli/commands/install-skill.js.map +1 -0
- package/dist/cli/commands/scene.d.ts +8 -0
- package/dist/cli/commands/scene.d.ts.map +1 -0
- package/dist/cli/commands/scene.js +110 -0
- package/dist/cli/commands/scene.js.map +1 -0
- package/dist/cli/commands/server.d.ts +4 -0
- package/dist/cli/commands/server.d.ts.map +1 -0
- package/dist/cli/commands/server.js +64 -0
- package/dist/cli/commands/server.js.map +1 -0
- package/dist/cli/commands/snapshot.d.ts +2 -0
- package/dist/cli/commands/snapshot.d.ts.map +1 -0
- package/dist/cli/commands/snapshot.js +41 -0
- package/dist/cli/commands/snapshot.js.map +1 -0
- package/dist/cli/run.d.ts +2 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +99 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/util.d.ts +5 -0
- package/dist/cli/util.d.ts.map +1 -0
- package/dist/cli/util.js +34 -0
- package/dist/cli/util.js.map +1 -0
- package/dist/core/canvas-client.d.ts +68 -0
- package/dist/core/canvas-client.d.ts.map +1 -0
- package/dist/core/canvas-client.js +294 -0
- package/dist/core/canvas-client.js.map +1 -0
- package/dist/core/config.d.ts +5 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +11 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/describe.d.ts +3 -0
- package/dist/core/describe.d.ts.map +1 -0
- package/dist/core/describe.js +94 -0
- package/dist/core/describe.js.map +1 -0
- package/dist/core/design-guide.d.ts +2 -0
- package/dist/core/design-guide.d.ts.map +1 -0
- package/dist/core/design-guide.js +95 -0
- package/dist/core/design-guide.js.map +1 -0
- package/dist/core/entry.d.ts +3 -0
- package/dist/core/entry.d.ts.map +1 -0
- package/dist/core/entry.js +35 -0
- package/dist/core/entry.js.map +1 -0
- package/dist/core/geometry.d.ts +37 -0
- package/dist/core/geometry.d.ts.map +1 -0
- package/dist/core/geometry.js +196 -0
- package/dist/core/geometry.js.map +1 -0
- package/dist/core/normalize.d.ts +24 -0
- package/dist/core/normalize.d.ts.map +1 -0
- package/dist/core/normalize.js +95 -0
- package/dist/core/normalize.js.map +1 -0
- package/dist/core/pidfile.d.ts +5 -0
- package/dist/core/pidfile.d.ts.map +1 -0
- package/dist/core/pidfile.js +51 -0
- package/dist/core/pidfile.js.map +1 -0
- package/dist/core/scene-io.d.ts +16 -0
- package/dist/core/scene-io.d.ts.map +1 -0
- package/dist/core/scene-io.js +81 -0
- package/dist/core/scene-io.js.map +1 -0
- package/dist/core/share-url.d.ts +3 -0
- package/dist/core/share-url.d.ts.map +1 -0
- package/dist/core/share-url.js +246 -0
- package/dist/core/share-url.js.map +1 -0
- package/dist/core/spawn.d.ts +40 -0
- package/dist/core/spawn.d.ts.map +1 -0
- package/dist/core/spawn.js +151 -0
- package/dist/core/spawn.js.map +1 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +14 -0
- package/dist/core/version.js.map +1 -0
- package/dist/frontend/assets/{advancedFormat-BB0p-EFm.js → advancedFormat-Cu4RdwYX.js} +1 -1
- package/dist/frontend/assets/{ar-SA-G6X2FPQ2-DQjC7E2l.js → ar-SA-G6X2FPQ2-BrG9D5mB.js} +1 -1
- package/dist/frontend/assets/{arc-DeeplnFI.js → arc-CzN7s4I_.js} +1 -1
- package/dist/frontend/assets/{az-AZ-76LH7QW2-i2mid_KF.js → az-AZ-76LH7QW2-CBmyqnOx.js} +1 -1
- package/dist/frontend/assets/{bg-BG-XCXSNQG7-DEeQGR6G.js → bg-BG-XCXSNQG7-D6Jn9Jka.js} +1 -1
- package/dist/frontend/assets/{blockDiagram-38ab4fdb-ft3Qmbnk.js → blockDiagram-38ab4fdb-D-xprr1O.js} +1 -1
- package/dist/frontend/assets/{blockDiagram-68f4deed-BhATEkwK.js → blockDiagram-68f4deed-CuasSwoS.js} +1 -1
- package/dist/frontend/assets/{bn-BD-2XOGV67Q-Cyoi_9HX.js → bn-BD-2XOGV67Q-B-xVQHpa.js} +1 -1
- package/dist/frontend/assets/{c4Diagram-15b5d702-D9y4gbPI.js → c4Diagram-15b5d702-DngzuSSz.js} +1 -1
- package/dist/frontend/assets/{c4Diagram-3d4e48cf-JFijLclV.js → c4Diagram-3d4e48cf-UI2vKyjh.js} +1 -1
- package/dist/frontend/assets/{ca-ES-6MX7JW3Y-BVVWU1rs.js → ca-ES-6MX7JW3Y-CXxzVHI2.js} +1 -1
- package/dist/frontend/assets/channel-DHpR-e5t.js +1 -0
- package/dist/frontend/assets/{classDiagram-70f12bd4-Ca9Kd1Ds.js → classDiagram-70f12bd4-B-W1h0ye.js} +1 -1
- package/dist/frontend/assets/{classDiagram-d40c83e7-Bq3MDvmx.js → classDiagram-d40c83e7-CHgATOtg.js} +1 -1
- package/dist/frontend/assets/{classDiagram-v2-d5a6b087-o29qZ8vi.js → classDiagram-v2-d5a6b087-CrVxqaxV.js} +1 -1
- package/dist/frontend/assets/{classDiagram-v2-f2320105-C9ex7BCO.js → classDiagram-v2-f2320105-DeNcMPNN.js} +1 -1
- package/dist/frontend/assets/clone-lup5BMBm.js +1 -0
- package/dist/frontend/assets/{createText-2e5e7dd3-FTBPE3EK.js → createText-2e5e7dd3-BCvKSdde.js} +1 -1
- package/dist/frontend/assets/{createText-d213de94-5nVTf_jC.js → createText-d213de94-C1e-WoOI.js} +1 -1
- package/dist/frontend/assets/{cs-CZ-2BRQDIVT-BhMjw9tI.js → cs-CZ-2BRQDIVT-D985JfJM.js} +1 -1
- package/dist/frontend/assets/{cytoscape-cose-bilkent-D2omlyvD.js → cytoscape-cose-bilkent-BpNex8hm.js} +1 -1
- package/dist/frontend/assets/{da-DK-5WZEPLOC-MfLFmlD6.js → da-DK-5WZEPLOC-DnO8UYdw.js} +1 -1
- package/dist/frontend/assets/{de-DE-XR44H4JA-JhYak0I3.js → de-DE-XR44H4JA-DpLEycXf.js} +1 -1
- package/dist/frontend/assets/{edges-332bd1c7-DRJZgTC2.js → edges-332bd1c7-BTWqXXOh.js} +1 -1
- package/dist/frontend/assets/{edges-e0da2a9e-BDwG7z0K.js → edges-e0da2a9e-DB5hSRMS.js} +1 -1
- package/dist/frontend/assets/{el-GR-BZB4AONW-Cdt2Ptk6.js → el-GR-BZB4AONW-CxD2fU_-.js} +1 -1
- package/dist/frontend/assets/{elk.bundled-D6I4pvAp.js → elk.bundled-BdkkLQ9v.js} +1 -1
- package/dist/frontend/assets/{erDiagram-880f2ed8-C8waXJ0r.js → erDiagram-880f2ed8-CcFsVKbm.js} +1 -1
- package/dist/frontend/assets/{erDiagram-9861fffd-F9WuyAYm.js → erDiagram-9861fffd-CesvXcG3.js} +1 -1
- package/dist/frontend/assets/{es-ES-U4NZUMDT-C2-CtGrr.js → es-ES-U4NZUMDT-eLkUAGrd.js} +1 -1
- package/dist/frontend/assets/{eu-ES-A7QVB2H4-CU_zCaYP.js → eu-ES-A7QVB2H4-C5So4PTb.js} +1 -1
- package/dist/frontend/assets/{fa-IR-HGAKTJCU-Ck3uNCF1.js → fa-IR-HGAKTJCU-8SlB6qKf.js} +1 -1
- package/dist/frontend/assets/{fi-FI-Z5N7JZ37-B095Plv2.js → fi-FI-Z5N7JZ37-BomDdmSm.js} +1 -1
- package/dist/frontend/assets/{flowDb-7c981674-DuBfksmG.js → flowDb-7c981674-DUYo8xot.js} +1 -1
- package/dist/frontend/assets/{flowDb-956e92f1-CeLnP8Y5.js → flowDb-956e92f1-BJgXZYDf.js} +1 -1
- package/dist/frontend/assets/{flowDiagram-66a62f08-Bm4RJknB.js → flowDiagram-66a62f08-4g_Edke8.js} +1 -1
- package/dist/frontend/assets/{flowDiagram-cbd28bf7-DGIWJa28.js → flowDiagram-cbd28bf7-BlrPxNWv.js} +1 -1
- package/dist/frontend/assets/flowDiagram-v2-96b9c2cf-Czu9PPGk.js +1 -0
- package/dist/frontend/assets/flowDiagram-v2-ffc7f31a-BXmTKhDc.js +1 -0
- package/dist/frontend/assets/{flowchart-elk-definition-36e2d292-Dpo4AMxk.js → flowchart-elk-definition-36e2d292-Ci2E7lRB.js} +1 -1
- package/dist/frontend/assets/{flowchart-elk-definition-4a651766-ChOn_l6T.js → flowchart-elk-definition-4a651766-C58ugksC.js} +1 -1
- package/dist/frontend/assets/{fr-FR-RHASNOE6-BqyLXGYl.js → fr-FR-RHASNOE6-CISuwHIw.js} +1 -1
- package/dist/frontend/assets/{ganttDiagram-04f9e578-CkdnwMOW.js → ganttDiagram-04f9e578-DtN69sC0.js} +1 -1
- package/dist/frontend/assets/{ganttDiagram-c361ad54-CJzn5gXR.js → ganttDiagram-c361ad54-uoOAidYg.js} +1 -1
- package/dist/frontend/assets/{gitGraphDiagram-21fc4d3e-CIOFS-AG.js → gitGraphDiagram-21fc4d3e-BeTO0_jl.js} +1 -1
- package/dist/frontend/assets/{gitGraphDiagram-72cf32ee-Bcto3HlW.js → gitGraphDiagram-72cf32ee-BReQlBMg.js} +1 -1
- package/dist/frontend/assets/{gl-ES-HMX3MZ6V-B7bR1uHP.js → gl-ES-HMX3MZ6V-7cWOAJGF.js} +1 -1
- package/dist/frontend/assets/{graph-BHaTz2pM.js → graph-BATMMMJj.js} +1 -1
- package/dist/frontend/assets/{graph-DsUM2NHp.js → graph-Dlrlf4lh.js} +1 -1
- package/dist/frontend/assets/{he-IL-6SHJWFNN-DwXoH57J.js → he-IL-6SHJWFNN-DL7AZuDJ.js} +1 -1
- package/dist/frontend/assets/{hi-IN-IWLTKZ5I-D7SfqhT6.js → hi-IN-IWLTKZ5I-DmD9bUM1.js} +1 -1
- package/dist/frontend/assets/{hu-HU-A5ZG7DT2-GZMnh_86.js → hu-HU-A5ZG7DT2-CRtguMHd.js} +1 -1
- package/dist/frontend/assets/{id-ID-SAP4L64H-CKj2F_pf.js → id-ID-SAP4L64H-DtFfu6C-.js} +1 -1
- package/dist/frontend/assets/{index-3862675e-Bsb9vcL0.js → index-3862675e-DeYQrklP.js} +1 -1
- package/dist/frontend/assets/{index-6079d271-Bvcb58DE.js → index-6079d271-Bf_wfFkO.js} +1 -1
- package/dist/frontend/assets/{index-C1JelwHC.js → index-CJ8IXn8v.js} +69 -69
- package/dist/frontend/assets/{index-CkitXLJb.js → index-DEiTON1j.js} +4 -4
- package/dist/frontend/assets/{infoDiagram-4a4f5b27-DYMh8eXF.js → infoDiagram-4a4f5b27-WzbAum_g.js} +1 -1
- package/dist/frontend/assets/{infoDiagram-f8f76790-B2YXmH0v.js → infoDiagram-f8f76790-C961YhU4.js} +1 -1
- package/dist/frontend/assets/{it-IT-JPQ66NNP-woTcXUdD.js → it-IT-JPQ66NNP-BvUrFdLL.js} +1 -1
- package/dist/frontend/assets/{ja-JP-DBVTYXUO-CGJZIn_N.js → ja-JP-DBVTYXUO-bTtjENx1.js} +1 -1
- package/dist/frontend/assets/{journeyDiagram-29694f62-20n3n2ey.js → journeyDiagram-29694f62-Cv8OEe7W.js} +1 -1
- package/dist/frontend/assets/{journeyDiagram-49397b02-Df2fBEZG.js → journeyDiagram-49397b02-tYl_lKi9.js} +1 -1
- package/dist/frontend/assets/{kaa-6HZHGXH3-BtBBG4jh.js → kaa-6HZHGXH3-Bv2KyQYW.js} +1 -1
- package/dist/frontend/assets/{kab-KAB-ZGHBKWFO-CbxAj5W8.js → kab-KAB-ZGHBKWFO-BADb-eTr.js} +1 -1
- package/dist/frontend/assets/{kk-KZ-P5N5QNE5-fS-Upvvh.js → kk-KZ-P5N5QNE5-Bf7oZ_PX.js} +1 -1
- package/dist/frontend/assets/{km-KH-HSX4SM5Z-BA1j7Xmb.js → km-KH-HSX4SM5Z-Dl89KnDo.js} +1 -1
- package/dist/frontend/assets/{ko-KR-MTYHY66A-CFvLJngn.js → ko-KR-MTYHY66A-KJMINqTm.js} +1 -1
- package/dist/frontend/assets/{ku-TR-6OUDTVRD-BkE-_tGQ.js → ku-TR-6OUDTVRD-C3XIFH4f.js} +1 -1
- package/dist/frontend/assets/{layout-D56ApGxy.js → layout-Cz8myur7.js} +1 -1
- package/dist/frontend/assets/{layout-D3_N-32k.js → layout-DB62LdLJ.js} +1 -1
- package/dist/frontend/assets/{line-Dq_sNFvr.js → line-CBrVjdDC.js} +1 -1
- package/dist/frontend/assets/{linear-BaWzW4O4.js → linear-BqYCMXJr.js} +1 -1
- package/dist/frontend/assets/{lt-LT-XHIRWOB4-BSnb0UTH.js → lt-LT-XHIRWOB4-Oj2fWkIx.js} +1 -1
- package/dist/frontend/assets/{lv-LV-5QDEKY6T-CLjiMRc2.js → lv-LV-5QDEKY6T-Bh0Mah1s.js} +1 -1
- package/dist/frontend/assets/{mindmap-definition-ac74a2e8-BY3Tg6Pe.js → mindmap-definition-ac74a2e8-4n3cEnEy.js} +1 -1
- package/dist/frontend/assets/{mindmap-definition-fc14e90a-CLKKSvyA.js → mindmap-definition-fc14e90a-BET0ZXH5.js} +1 -1
- package/dist/frontend/assets/{mr-IN-CRQNXWMA-D9DBZK36.js → mr-IN-CRQNXWMA-Dashya6c.js} +1 -1
- package/dist/frontend/assets/{my-MM-5M5IBNSE-DpU38Yme.js → my-MM-5M5IBNSE-B_azhrE2.js} +1 -1
- package/dist/frontend/assets/{nb-NO-T6EIAALU-C510_VhX.js → nb-NO-T6EIAALU-Bdg2vJB0.js} +1 -1
- package/dist/frontend/assets/{nl-NL-IS3SIHDZ-CTxHa7fQ.js → nl-NL-IS3SIHDZ-Bh0k8Kbj.js} +1 -1
- package/dist/frontend/assets/{nn-NO-6E72VCQL-BrJEF_cT.js → nn-NO-6E72VCQL-BLjsiv6i.js} +1 -1
- package/dist/frontend/assets/{oc-FR-POXYY2M6-BQ6jh9ah.js → oc-FR-POXYY2M6-Dw9C6QDS.js} +1 -1
- package/dist/frontend/assets/{pa-IN-N4M65BXN-DHhO4NEC.js → pa-IN-N4M65BXN-mJNVnYBQ.js} +1 -1
- package/dist/frontend/assets/{pica-CofPkJ36.js → pica-BpgspmBQ.js} +1 -1
- package/dist/frontend/assets/{pie-lyWsw7iq.js → pie-n8S5fYo4.js} +1 -1
- package/dist/frontend/assets/{pieDiagram-421022e6-CT-muZCn.js → pieDiagram-421022e6-Dl8pALsT.js} +1 -1
- package/dist/frontend/assets/{pieDiagram-8a3498a8-DtYj6G3V.js → pieDiagram-8a3498a8-rBzfDh4o.js} +1 -1
- package/dist/frontend/assets/{pl-PL-T2D74RX3-CwxEKsFG.js → pl-PL-T2D74RX3-CjZaoK9w.js} +1 -1
- package/dist/frontend/assets/{pt-BR-5N22H2LF-MbElHXpG.js → pt-BR-5N22H2LF-s3ixCOkJ.js} +1 -1
- package/dist/frontend/assets/{pt-PT-UZXXM6DQ-DM4vWcwF.js → pt-PT-UZXXM6DQ-CoUBIa6j.js} +1 -1
- package/dist/frontend/assets/{quadrantDiagram-0957ecba-CblbtN7K.js → quadrantDiagram-0957ecba-EksbVhl6.js} +1 -1
- package/dist/frontend/assets/{quadrantDiagram-120e2f19-jzz3ehZq.js → quadrantDiagram-120e2f19-CktkC7UT.js} +1 -1
- package/dist/frontend/assets/{requirementDiagram-23d650b8-C-JoH6A7.js → requirementDiagram-23d650b8-DEopC6db.js} +1 -1
- package/dist/frontend/assets/{requirementDiagram-deff3bca-Ctl4rNQu.js → requirementDiagram-deff3bca-CC80WbpO.js} +1 -1
- package/dist/frontend/assets/{ro-RO-JPDTUUEW-DdMtPkP_.js → ro-RO-JPDTUUEW-Bbw9iCSN.js} +1 -1
- package/dist/frontend/assets/{ru-RU-B4JR7IUQ-DFOiB9Jg.js → ru-RU-B4JR7IUQ-CZHHqw73.js} +1 -1
- package/dist/frontend/assets/{sankeyDiagram-04a897e0-CUAS8b8U.js → sankeyDiagram-04a897e0-_Xj8bCQC.js} +1 -1
- package/dist/frontend/assets/{sankeyDiagram-23345273-CjwxDsME.js → sankeyDiagram-23345273-CEXemcPc.js} +1 -1
- package/dist/frontend/assets/{selectAll-BMyQi_9w.js → selectAll-D-n6T_f8.js} +1 -1
- package/dist/frontend/assets/{sequenceDiagram-17ac3bff-BhnIexBX.js → sequenceDiagram-17ac3bff-GH91EKYV.js} +1 -1
- package/dist/frontend/assets/{sequenceDiagram-704730f1-DZhrMzp5.js → sequenceDiagram-704730f1-CVkxSLd8.js} +1 -1
- package/dist/frontend/assets/{si-LK-N5RQ5JYF-CoNWh4qU.js → si-LK-N5RQ5JYF-DwmyP-Mo.js} +1 -1
- package/dist/frontend/assets/{sk-SK-C5VTKIMK-Cv5NV02v.js → sk-SK-C5VTKIMK-DV1bZenk.js} +1 -1
- package/dist/frontend/assets/{sl-SI-NN7IZMDC-C_vlgIOB.js → sl-SI-NN7IZMDC-BK2Zi_zn.js} +1 -1
- package/dist/frontend/assets/{stateDiagram-587899a1-CACHP_Jt.js → stateDiagram-587899a1-BeYLYWNF.js} +1 -1
- package/dist/frontend/assets/{stateDiagram-9c5f0230-DsuPkPjh.js → stateDiagram-9c5f0230-Cxuwv8Kd.js} +1 -1
- package/dist/frontend/assets/{stateDiagram-v2-51a3dcff-B5h534aI.js → stateDiagram-v2-51a3dcff-CNFwMiQ0.js} +1 -1
- package/dist/frontend/assets/{stateDiagram-v2-d93cdb3a-Dm93b3N0.js → stateDiagram-v2-d93cdb3a-5aVWGtU-.js} +1 -1
- package/dist/frontend/assets/{styles-2ab5d517-DsYBO0WP.js → styles-2ab5d517-Cpfmvcp5.js} +1 -1
- package/dist/frontend/assets/{styles-5f03d8d2-LS13RtPA.js → styles-5f03d8d2-qddx0_9K.js} +1 -1
- package/dist/frontend/assets/{styles-6aaf32cf-KUcsVvLX.js → styles-6aaf32cf-B-2WTBc4.js} +1 -1
- package/dist/frontend/assets/{styles-9a916d00-BjTkeUBK.js → styles-9a916d00-CN0F6be-.js} +1 -1
- package/dist/frontend/assets/{styles-c10674c1-0477ds-x.js → styles-c10674c1-CEEfSl05.js} +1 -1
- package/dist/frontend/assets/{styles-edf9a4b0-DxfsUCVO.js → styles-edf9a4b0-DHXM7msa.js} +1 -1
- package/dist/frontend/assets/subset-shared.chunk.js +1 -1
- package/dist/frontend/assets/subset-worker.chunk.js +1 -1
- package/dist/frontend/assets/{sv-SE-XGPEYMSR-BILGi8-a.js → sv-SE-XGPEYMSR-DTYa1sJx.js} +1 -1
- package/dist/frontend/assets/{svgDrawCommon-08f97a94-DK3eIkMD.js → svgDrawCommon-08f97a94-CHwlzhLZ.js} +1 -1
- package/dist/frontend/assets/{svgDrawCommon-3ba9043b-CnkFvHbE.js → svgDrawCommon-3ba9043b-n85eSiYv.js} +1 -1
- package/dist/frontend/assets/{ta-IN-2NMHFXQM-B2-G7tUs.js → ta-IN-2NMHFXQM-EsNqKJyl.js} +1 -1
- package/dist/frontend/assets/{th-TH-HPSO5L25-BaOUPhiZ.js → th-TH-HPSO5L25-Ca6GHTm_.js} +1 -1
- package/dist/frontend/assets/{timeline-definition-7e6b55e7-ChAZUdsQ.js → timeline-definition-7e6b55e7-BTKVtcIE.js} +1 -1
- package/dist/frontend/assets/{timeline-definition-85554ec2-FT1qcwfh.js → timeline-definition-85554ec2-CNR3gaJX.js} +1 -1
- package/dist/frontend/assets/{tr-TR-DEFEU3FU-_3NLP7we.js → tr-TR-DEFEU3FU-Cx33dqUv.js} +1 -1
- package/dist/frontend/assets/{uk-UA-QMV73CPH-e9ZZsONo.js → uk-UA-QMV73CPH-CgyIgoqy.js} +1 -1
- package/dist/frontend/assets/{union-j7EoioKl.js → union-ByT_sNuE.js} +1 -1
- package/dist/frontend/assets/{vi-VN-M7AON7JQ-Bl1etnNc.js → vi-VN-M7AON7JQ-bbYYfwkp.js} +1 -1
- package/dist/frontend/assets/{xychartDiagram-b6496bcd-DpRHtxW2.js → xychartDiagram-b6496bcd-B19I2K2s.js} +1 -1
- package/dist/frontend/assets/{xychartDiagram-e933f94c-CePJDM-w.js → xychartDiagram-e933f94c-R1AdCL9O.js} +1 -1
- package/dist/frontend/assets/{zh-CN-LNUGB5OW-BVkMlvEs.js → zh-CN-LNUGB5OW-C5YxrJBz.js} +1 -1
- package/dist/frontend/assets/{zh-HK-E62DVLB3-BMvPopwA.js → zh-HK-E62DVLB3-Bh25UqeW.js} +1 -1
- package/dist/frontend/assets/{zh-TW-RAJ6MFWO-D_Eu0QQx.js → zh-TW-RAJ6MFWO-DWbjYFDi.js} +1 -1
- package/dist/frontend/assets/{zipObject-DKSN1jwq.js → zipObject-BNcQvyjX.js} +1 -1
- package/dist/frontend/index.html +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +93 -1010
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +69 -5
- package/dist/server.js.map +1 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +42 -2
- package/dist/utils/logger.js.map +1 -1
- package/package.json +13 -6
- package/skills/excalidraw-skill/SKILL.md +265 -0
- package/skills/excalidraw-skill/evals/evals.json +29 -0
- package/skills/excalidraw-skill/references/cheatsheet.md +192 -0
- package/src/bin.ts +45 -0
- package/src/cli/args.ts +92 -0
- package/src/cli/commands/arrange.ts +97 -0
- package/src/cli/commands/elements.ts +230 -0
- package/src/cli/commands/install-skill.ts +116 -0
- package/src/cli/commands/scene.ts +135 -0
- package/src/cli/commands/server.ts +69 -0
- package/src/cli/commands/snapshot.ts +46 -0
- package/src/cli/run.ts +107 -0
- package/src/cli/util.ts +38 -0
- package/src/core/canvas-client.ts +366 -0
- package/src/core/config.ts +14 -0
- package/src/core/describe.ts +100 -0
- package/src/core/design-guide.ts +94 -0
- package/src/core/entry.ts +37 -0
- package/src/core/geometry.ts +250 -0
- package/src/core/normalize.ts +124 -0
- package/src/core/pidfile.ts +52 -0
- package/src/core/scene-io.ts +109 -0
- package/src/core/share-url.ts +285 -0
- package/src/core/spawn.ts +182 -0
- package/src/core/version.ts +13 -0
- package/src/index.ts +143 -1191
- package/src/server.ts +70 -5
- package/src/utils/logger.ts +47 -3
- package/dist/frontend/assets/channel-Cb5NStnu.js +0 -1
- package/dist/frontend/assets/clone-90Lq8jWj.js +0 -1
- package/dist/frontend/assets/flowDiagram-v2-96b9c2cf-FcyWkMPn.js +0 -1
- package/dist/frontend/assets/flowDiagram-v2-ffc7f31a-BpjLoFsq.js +0 -1
package/README.md
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
# Excalidraw MCP Server & Agent Skill
|
|
1
|
+
# Excalidraw MCP Server, CLI & Agent Skill
|
|
2
2
|
|
|
3
3
|
[](https://github.com/yctimlin/mcp_excalidraw/actions/workflows/ci.yml)
|
|
4
4
|
[](https://github.com/yctimlin/mcp_excalidraw/actions/workflows/docker.yml)
|
|
5
5
|
[](https://www.npmjs.com/package/mcp-excalidraw-server)
|
|
6
6
|
[](LICENSE)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**mcp-excalidraw-server** gives AI agents a live [Excalidraw](https://excalidraw.com) canvas they can draw on, look at, refine, and save into your repo. Your agent creates architecture diagrams and flowcharts programmatically, **sees its own work via screenshots**, fixes layout problems, and exports `.excalidraw` files you can commit next to your code.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
- **Agent Skill**: Portable skill for Claude Code, Codex CLI, and other skill-enabled agents
|
|
10
|
+
One canvas, three ways to drive it:
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
- **Agent Skill + CLI** — recommended for coding agents (Claude Code, Codex CLI, Cursor, OpenCode): `npx -y mcp-excalidraw-server <command>`. Zero config, auto-starts the canvas, composable JSON in/out.
|
|
13
|
+
- **MCP Server** — 26 tools over stdio for any Model Context Protocol client (Claude Desktop, Cursor, Codex CLI, Antigravity, ...).
|
|
14
|
+
- **REST API** — plain HTTP for LangChain and custom frameworks.
|
|
15
|
+
|
|
16
|
+
Core drawing runs fully local (Node ≥ 18, MIT licensed) — no API keys. Mermaid conversion runs in the local browser canvas; `share` is optional and uploads an encrypted scene to excalidraw.com.
|
|
14
17
|
|
|
15
18
|
## Demo
|
|
16
19
|
|
|
17
|
-

|
|
18
21
|
|
|
19
22
|
*AI agent creates a complete architecture diagram from a single prompt (4x speed). [Watch full video on YouTube](https://youtu.be/ufW78Amq5qA)*
|
|
20
23
|
|
|
@@ -24,8 +27,9 @@ Keywords: Excalidraw agent skill, Excalidraw MCP server, AI diagramming, Claude
|
|
|
24
27
|
- [What It Is](#what-it-is)
|
|
25
28
|
- [How We Differ from the Official Excalidraw MCP](#how-we-differ-from-the-official-excalidraw-mcp)
|
|
26
29
|
- [What's New](#whats-new)
|
|
27
|
-
- [
|
|
28
|
-
- [
|
|
30
|
+
- [Installation](#installation)
|
|
31
|
+
- [Agent Skill](#agent-skill)
|
|
32
|
+
- [CLI Reference](#cli-reference)
|
|
29
33
|
- [Configure MCP Clients](#configure-mcp-clients)
|
|
30
34
|
- [Claude Desktop](#claude-desktop)
|
|
31
35
|
- [Claude Code](#claude-code)
|
|
@@ -33,99 +37,173 @@ Keywords: Excalidraw agent skill, Excalidraw MCP server, AI diagramming, Claude
|
|
|
33
37
|
- [Codex CLI](#codex-cli)
|
|
34
38
|
- [OpenCode](#opencode)
|
|
35
39
|
- [Antigravity (Google)](#antigravity-google)
|
|
36
|
-
- [Agent Skill (Optional)](#agent-skill-optional)
|
|
37
40
|
- [MCP Tools (26 Total)](#mcp-tools-26-total)
|
|
41
|
+
- [Quick Start (From Source / Docker)](#quick-start-from-source--docker)
|
|
38
42
|
- [Testing](#testing)
|
|
43
|
+
- [FAQ](#faq)
|
|
39
44
|
- [Troubleshooting](#troubleshooting)
|
|
40
45
|
- [Known Issues / TODO](#known-issues--todo)
|
|
41
46
|
- [Development](#development)
|
|
47
|
+
- [License](#license)
|
|
42
48
|
|
|
43
49
|
## What It Is
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
Ask your agent to *"draw the architecture of this service"* and it produces a real, editable Excalidraw diagram — not a one-shot image. Because the agent can query, screenshot, and update individual elements, it iterates until labels fit, nothing overlaps, and arrows route cleanly; then it exports the result as a `.excalidraw` file that lives in your repo and gets updated when the code changes.
|
|
52
|
+
|
|
53
|
+
Under the hood there are two processes, one product:
|
|
54
|
+
|
|
55
|
+
- **Canvas server**: Excalidraw web UI + REST API + WebSocket real-time sync (default `http://127.0.0.1:3000`)
|
|
56
|
+
- **A thin front-end of your choice**: the CLI, the MCP stdio server, or raw HTTP — all drive the same canvas
|
|
46
57
|
|
|
47
|
-
|
|
48
|
-
- MCP server: exposes MCP tools over stdio; syncs to the canvas via `EXPRESS_SERVER_URL`
|
|
58
|
+
Since v1.1 the canvas server starts itself: canvas-driving CLI commands (and the MCP server on launch) auto-spawn it if nothing is listening. `status` only inspects the current server state. Set `EXCALIDRAW_NO_AUTOSTART=1` to opt out.
|
|
49
59
|
|
|
50
60
|
## How We Differ from the Official Excalidraw MCP
|
|
51
61
|
|
|
52
|
-
Excalidraw
|
|
62
|
+
Excalidraw has an [official MCP](https://github.com/excalidraw/excalidraw-mcp) — a chat widget that streams a diagram inline from a single prompt (the model gets two tools: a format reference and `create_view`). It's great for "draw me a cat" in Claude or ChatGPT. We solve a different problem: giving *coding agents* a persistent canvas workbench.
|
|
53
63
|
|
|
54
64
|
| | Official Excalidraw MCP | This Project |
|
|
55
65
|
|---|---|---|
|
|
56
|
-
| **Approach** | Prompt in, diagram out (one-shot) | Programmatic element-level control (26 tools) |
|
|
57
|
-
| **State** |
|
|
58
|
-
| **Element CRUD** |
|
|
59
|
-
| **AI sees the canvas** | No | `
|
|
60
|
-
| **Iterative refinement** |
|
|
61
|
-
| **Layout tools** | No |
|
|
62
|
-
| **File I/O** | No | `
|
|
63
|
-
| **Snapshot & rollback** |
|
|
64
|
-
| **Mermaid conversion** | No | `create_from_mermaid` |
|
|
65
|
-
| **Shareable URLs** |
|
|
66
|
-
| **
|
|
67
|
-
| **
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
| **Works without MCP** | No | Yes — REST API fallback via agent skill |
|
|
71
|
-
|
|
72
|
-
**TL;DR** — The official MCP generates diagrams. We give AI agents a full canvas toolkit to build, inspect, and iteratively refine diagrams — including the ability to see what they drew.
|
|
66
|
+
| **Approach** | Prompt in, diagram out (one-shot widget) | Programmatic element-level control (CLI + 26 MCP tools) |
|
|
67
|
+
| **State** | Checkpoints inside the chat widget | Persistent live canvas with real-time sync |
|
|
68
|
+
| **Element CRUD** | Declarative re-send with delete markers | Full create / read / update / delete per element |
|
|
69
|
+
| **AI sees the canvas** | No | `describe` (structured text) + `screenshot` (image) |
|
|
70
|
+
| **Iterative refinement** | Regenerate from checkpoint | Draw → look → adjust → look again, element by element |
|
|
71
|
+
| **Layout tools** | No | align, distribute, group / ungroup, lock, duplicate |
|
|
72
|
+
| **File I/O** | No model-facing export | `.excalidraw` export/import — diagrams as repo artifacts |
|
|
73
|
+
| **Snapshot & rollback** | Widget-side checkpoints | Named server-side snapshots |
|
|
74
|
+
| **Mermaid conversion** | No | `mermaid` / `create_from_mermaid` |
|
|
75
|
+
| **Shareable URLs** | Widget-only | `share` / `export_to_excalidraw_url` |
|
|
76
|
+
| **Works without MCP** | No | Yes — CLI + agent skill + REST API |
|
|
77
|
+
| **Multi-agent** | Single chat | Multiple agents on the same canvas concurrently |
|
|
78
|
+
|
|
79
|
+
**TL;DR** — The official MCP shows Excalidraw diagrams in your chat. This project gives your coding agent a full Excalidraw workbench: a canvas it can draw on, inspect, refine, and commit to your repo.
|
|
73
80
|
|
|
74
81
|
## What's New
|
|
75
82
|
|
|
76
|
-
|
|
83
|
+
Current package version: **1.1.0**. The current release line is **v1.1 — CLI-First**.
|
|
77
84
|
|
|
78
|
-
|
|
79
|
-
- **Closed feedback loop**: AI can now inspect the canvas (`describe_scene`) and see it (`get_canvas_screenshot` returns an image) — enabling iterative refinement
|
|
80
|
-
- **Design guide**: `read_diagram_guide` returns best-practice color palettes, sizing rules, layout patterns, and anti-patterns — dramatically improves AI-generated diagram quality
|
|
81
|
-
- **Shareable URLs**: `export_to_excalidraw_url` encrypts and uploads the scene to excalidraw.com, returns a shareable link anyone can open
|
|
82
|
-
- **Viewport control**: `set_viewport` with `scrollToContent`, `scrollToElementId`, or manual zoom/offset — agents can auto-fit diagrams after creation
|
|
83
|
-
- **File I/O**: export/import full `.excalidraw` JSON files
|
|
84
|
-
- **Snapshots**: save and restore named canvas states
|
|
85
|
-
- **Skill fallback**: Agent skill auto-detects MCP vs REST API mode, gracefully falls back to HTTP endpoints when MCP server isn't configured
|
|
86
|
-
- Fixed all previously known issues: `align_elements` / `distribute_elements` fully implemented, points type normalization, removed invalid `label` type, removed HTTP transport dead code, `ungroup_elements` now errors on failure
|
|
85
|
+
### v1.1 — CLI-First
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
- **First-class CLI**: every capability is now a composable command — `npx -y mcp-excalidraw-server add|query|describe|screenshot|export|import|mermaid|snapshot|arrange|share|...` — JSON on stdout, meaningful exit codes. Also installed as the `excalidraw-canvas` alias.
|
|
88
|
+
- **Zero-setup**: canvas-driving CLI commands and the MCP server **auto-start the canvas server** if it isn't running (closes #66). Opt out with `EXCALIDRAW_NO_AUTOSTART=1`.
|
|
89
|
+
- **`apply`**: multi-op patches (`{"create":[...],"update":[{"id":"a","set":{...}}],"delete":[...]}`) in a single invocation.
|
|
90
|
+
- **`install-skill`**: `npx -y mcp-excalidraw-server install-skill --dir <skills-root>` copies the portable agent skill into the directory your agent chooses (project or global), cleanly replacing older versions.
|
|
91
|
+
- **Skill is now CLI-first** and no longer needs a cloned repo or configured MCP server to work.
|
|
92
|
+
- **Typed queries**: `query --filter locked=true --filter label.text=API` — booleans, numbers, and nested keys work.
|
|
93
|
+
- **Internals**: shared core library (`src/core/`) behind both the CLI and MCP server; canvas `groupIds` are the source of truth for grouping (ungroup now works across restarts); `node-fetch` dropped; MCP version metadata derived from `package.json`; canvas server writes a pidfile and shuts down cleanly.
|
|
89
94
|
|
|
90
|
-
|
|
91
|
-
- Better testing loop: MCP Inspector CLI examples + browser screenshot checks (`agent-browser`)
|
|
92
|
-
- Bugfixes: batch create now preserves element ids (fixes update/delete after batch); frontend entrypoint fixed (`main.tsx`)
|
|
95
|
+
## Installation
|
|
93
96
|
|
|
94
|
-
|
|
97
|
+
The only prerequisite is **Node.js ≥ 18**.
|
|
95
98
|
|
|
96
|
-
|
|
99
|
+
### Easiest: let your agent install it
|
|
97
100
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
+
Copy this into your coding agent — it installs the portable skill into the project/global skill directory that agent already knows how to use, then verifies it by drawing a test diagram:
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
Install the Excalidraw canvas toolkit so you can draw diagrams for me:
|
|
105
|
+
|
|
106
|
+
1. Choose the right skill directory for this agent and scope (project or global).
|
|
107
|
+
2. Run: npx -y mcp-excalidraw-server install-skill --dir <that-skills-directory>
|
|
108
|
+
3. Read the installed excalidraw-skill/SKILL.md so you know the drawing workflow.
|
|
109
|
+
4. Start the canvas with: npx -y mcp-excalidraw-server start
|
|
110
|
+
then tell me to open http://127.0.0.1:3000 in my browser (screenshots need an open tab).
|
|
111
|
+
5. Draw a small test diagram — two labeled boxes connected by an arrow — take a
|
|
112
|
+
screenshot, and show me the result to confirm everything works.
|
|
101
113
|
```
|
|
102
114
|
|
|
103
|
-
|
|
115
|
+
### Manual install
|
|
116
|
+
|
|
117
|
+
| You are... | Install with | Then |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| **Modern coding agent** | `npx -y mcp-excalidraw-server install-skill --dir <skills-root>` | Let the agent choose project/global scope and its skill root |
|
|
120
|
+
| **Claude Code shortcut** | `npx -y mcp-excalidraw-server install-skill` | Installs to `~/.claude/skills` for backward compatibility |
|
|
121
|
+
| **Codex shortcut** | `npx -y mcp-excalidraw-server install-skill --target codex` | Installs to `~/.codex/skills` for backward compatibility |
|
|
122
|
+
| **MCP client user** (Claude Desktop, Cursor, ...) | Add the npx config below | See [Configure MCP Clients](#configure-mcp-clients) |
|
|
123
|
+
| **CLI user / scripting** | Nothing — `npx -y mcp-excalidraw-server <command>` | See [CLI Reference](#cli-reference) |
|
|
124
|
+
| **Contributor / from source** | `git clone` + `npm ci` + `npm run build` | See [Quick Start (From Source / Docker)](#quick-start-from-source--docker) |
|
|
125
|
+
|
|
126
|
+
There is no separate server setup: any drawing command auto-starts the local canvas server on `http://127.0.0.1:3000`.
|
|
127
|
+
|
|
128
|
+
### 60-Second Quick Start (CLI)
|
|
129
|
+
|
|
130
|
+
No clone, no config:
|
|
131
|
+
|
|
104
132
|
```bash
|
|
105
|
-
|
|
133
|
+
# start the canvas (drawing commands auto-start it too) and open it
|
|
134
|
+
npx -y mcp-excalidraw-server start
|
|
135
|
+
open http://127.0.0.1:3000 # browser tab enables screenshots & mermaid
|
|
136
|
+
|
|
137
|
+
# draw something
|
|
138
|
+
echo '[
|
|
139
|
+
{"id":"api","type":"rectangle","x":100,"y":100,"width":160,"height":80,"text":"API Server","backgroundColor":"#a5d8ff"},
|
|
140
|
+
{"id":"db","type":"rectangle","x":400,"y":100,"width":160,"height":80,"text":"Database","backgroundColor":"#99e9f2"},
|
|
141
|
+
{"type":"arrow","x":0,"y":0,"startElementId":"api","endElementId":"db","text":"SQL"}
|
|
142
|
+
]' | npx -y mcp-excalidraw-server add
|
|
143
|
+
|
|
144
|
+
# let your agent see its work
|
|
145
|
+
npx -y mcp-excalidraw-server describe
|
|
146
|
+
npx -y mcp-excalidraw-server screenshot --out diagram.png
|
|
147
|
+
|
|
148
|
+
# diagrams as repo artifacts
|
|
149
|
+
mkdir -p docs
|
|
150
|
+
npx -y mcp-excalidraw-server export --out docs/architecture.excalidraw
|
|
106
151
|
```
|
|
107
152
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
Open `http://127.0.0.1:3000`.
|
|
153
|
+
Give your agent the full playbook:
|
|
111
154
|
|
|
112
|
-
Terminal 2: run the MCP server (stdio)
|
|
113
155
|
```bash
|
|
114
|
-
|
|
156
|
+
npx -y mcp-excalidraw-server install-skill --dir <skills-root>
|
|
157
|
+
npx -y mcp-excalidraw-server install-skill --print-source # inspect bundled source path
|
|
115
158
|
```
|
|
116
159
|
|
|
117
|
-
|
|
160
|
+
> **Security note:** The canvas server binds `127.0.0.1` only by default. If you expose it on a network interface (`HOST=0.0.0.0`), put network-level access controls in front — the API has no built-in authentication.
|
|
161
|
+
|
|
162
|
+
## Agent Skill
|
|
163
|
+
|
|
164
|
+
The skill at `skills/excalidraw-skill/` teaches agents the full workflow — layout planning, the screenshot-verify-fix quality loop, arrow routing, anti-patterns, snapshots, and file I/O. It works through the CLI (preferred, zero setup), MCP tools (if configured), or raw REST — in that order.
|
|
118
165
|
|
|
119
|
-
Canvas server:
|
|
120
166
|
```bash
|
|
121
|
-
|
|
167
|
+
npx -y mcp-excalidraw-server install-skill --dir <skills-root>
|
|
122
168
|
```
|
|
123
169
|
|
|
124
|
-
|
|
170
|
+
The command copies the bundled `excalidraw-skill/` directory into `<skills-root>/excalidraw-skill`. Let your agent choose whether that root should be project-level or global. Re-running `install-skill` upgrades in place — it replaces the target directory, so files removed upstream don't linger.
|
|
171
|
+
|
|
172
|
+
Where the skill shines:
|
|
173
|
+
|
|
174
|
+
- **Diagrams as code artifacts**: export `.excalidraw` files into the repo, commit them, re-import + refine when the architecture changes.
|
|
175
|
+
- **Self-verifying diagrams**: the agent screenshots its own work and fixes truncation/overlap before calling it done.
|
|
176
|
+
- **No-MCP environments**: CI jobs, plain shells, and frameworks get the same capabilities through the CLI.
|
|
177
|
+
|
|
178
|
+
## CLI Reference
|
|
179
|
+
|
|
180
|
+
`npx -y mcp-excalidraw-server <command>` or (after `npm i -g mcp-excalidraw-server`) `excalidraw-canvas <command>`.
|
|
181
|
+
|
|
182
|
+
Conventions: JSON results on stdout — except `describe` (plain text by design) and raw-content output when `--out` is omitted (`export` prints the scene JSON, `screenshot --format svg` prints SVG). Diagnostics on stderr. Exit codes: `0` ok, `1` error, `2` usage, `3` canvas unreachable, `4` browser tab required. Canvas URL from `EXPRESS_SERVER_URL` or `--url`. Canvas-driving commands auto-start the server; `status` only reports current state. Explicit `start` overrides the `EXCALIDRAW_NO_AUTOSTART=1` opt-out (it's user intent, not auto-start).
|
|
183
|
+
|
|
184
|
+
| Command | Description |
|
|
185
|
+
|---------|-------------|
|
|
186
|
+
| `start` / `stop` / `status` | Manage the canvas server (detached; `stop` identity-checks the live server via `/health` before signaling) |
|
|
187
|
+
| `add [file\|-]` | Batch-create elements from a JSON array (file or stdin); `--one '{...}'` for a single element |
|
|
188
|
+
| `apply [file\|-]` | One-call multi-op patch: `{"create":[...],"update":[{"id":"a","set":{...}}],"delete":["id"]}` |
|
|
189
|
+
| `get <id>` / `delete <id...>` | Read / remove elements |
|
|
190
|
+
| `update <id> --set '{...}'` | Update an element |
|
|
191
|
+
| `query` | `--type`, `--bbox x0,y0,x1,y1`, `--filter k=v` (typed, nested keys), `--filter-json '{...}'` |
|
|
192
|
+
| `describe` | AI-readable scene summary (plain text) |
|
|
193
|
+
| `screenshot` | `--out f.png`, `--format png\|svg`, `--no-background` (browser tab required) |
|
|
194
|
+
| `export [--out f.excalidraw]` / `import [file\|-] [--replace]` | Scene file I/O |
|
|
195
|
+
| `mermaid [file\|-]` | Mermaid → canvas (browser tab required) |
|
|
196
|
+
| `snapshot save\|list\|restore <name>` | Named snapshots |
|
|
197
|
+
| `arrange align\|distribute\|group\|ungroup\|lock\|unlock\|duplicate` | Layout ops (`--ids a,b,c`, `--to left\|horizontal\|...`) |
|
|
198
|
+
| `share` | Encrypted upload → shareable excalidraw.com URL |
|
|
199
|
+
| `clear --yes` | Wipe the canvas |
|
|
200
|
+
| `install-skill [--dir <skills-root>]` | Install the portable agent skill |
|
|
201
|
+
|
|
202
|
+
Labels and arrow bindings use the agent-friendly format everywhere in the CLI: `"text"` on any shape, `"startElementId"`/`"endElementId"` on arrows — normalization is automatic.
|
|
125
203
|
|
|
126
204
|
## Configure MCP Clients
|
|
127
205
|
|
|
128
|
-
The MCP server runs over stdio
|
|
206
|
+
The MCP server runs over stdio. Since v1.1 the simplest config is `npx` — no clone, no absolute paths, and the canvas auto-starts:
|
|
129
207
|
|
|
130
208
|
### Environment Variables
|
|
131
209
|
|
|
@@ -133,6 +211,9 @@ The MCP server runs over stdio and can be configured with any MCP-compatible cli
|
|
|
133
211
|
|----------|-------------|---------|
|
|
134
212
|
| `EXPRESS_SERVER_URL` | URL of the canvas server | `http://127.0.0.1:3000` |
|
|
135
213
|
| `ENABLE_CANVAS_SYNC` | Enable real-time canvas sync | `true` |
|
|
214
|
+
| `EXCALIDRAW_NO_AUTOSTART` | Set `1` to disable canvas auto-start | (unset) |
|
|
215
|
+
| `EXCALIDRAW_EXPORT_DIR` | Base directory MCP file exports may write to | current working dir |
|
|
216
|
+
| `PORT` / `HOST` | Canvas server bind address | `3000` / `127.0.0.1` |
|
|
136
217
|
|
|
137
218
|
---
|
|
138
219
|
|
|
@@ -143,6 +224,18 @@ Config location:
|
|
|
143
224
|
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
144
225
|
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
145
226
|
|
|
227
|
+
**npx (recommended)**
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"mcpServers": {
|
|
231
|
+
"excalidraw": {
|
|
232
|
+
"command": "npx",
|
|
233
|
+
"args": ["-y", "mcp-excalidraw-server"]
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
146
239
|
**Local (node)**
|
|
147
240
|
```json
|
|
148
241
|
{
|
|
@@ -180,19 +273,16 @@ Config location:
|
|
|
180
273
|
|
|
181
274
|
### Claude Code
|
|
182
275
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
**Local (node)** - User-level (available across all projects):
|
|
276
|
+
**npx (recommended)**
|
|
186
277
|
```bash
|
|
187
|
-
claude mcp add excalidraw --scope user
|
|
188
|
-
-e EXPRESS_SERVER_URL=http://127.0.0.1:3000 \
|
|
189
|
-
-e ENABLE_CANVAS_SYNC=true \
|
|
190
|
-
-- node /absolute/path/to/mcp_excalidraw/dist/index.js
|
|
278
|
+
claude mcp add excalidraw --scope user -- npx -y mcp-excalidraw-server
|
|
191
279
|
```
|
|
192
280
|
|
|
193
|
-
|
|
281
|
+
> Tip: for coding agents, the skill + CLI often beats MCP config entirely — let the agent pick its skill root, then run `npx -y mcp-excalidraw-server install-skill --dir <skills-root>`.
|
|
282
|
+
|
|
283
|
+
**Local (node)** - User-level (available across all projects):
|
|
194
284
|
```bash
|
|
195
|
-
claude mcp add excalidraw --scope
|
|
285
|
+
claude mcp add excalidraw --scope user \
|
|
196
286
|
-e EXPRESS_SERVER_URL=http://127.0.0.1:3000 \
|
|
197
287
|
-e ENABLE_CANVAS_SYNC=true \
|
|
198
288
|
-- node /absolute/path/to/mcp_excalidraw/dist/index.js
|
|
@@ -219,17 +309,13 @@ claude mcp remove excalidraw # Remove a server
|
|
|
219
309
|
|
|
220
310
|
Config location: `.cursor/mcp.json` in your project root (or `~/.cursor/mcp.json` for global config)
|
|
221
311
|
|
|
222
|
-
**
|
|
312
|
+
**npx (recommended)**
|
|
223
313
|
```json
|
|
224
314
|
{
|
|
225
315
|
"mcpServers": {
|
|
226
316
|
"excalidraw": {
|
|
227
|
-
"command": "
|
|
228
|
-
"args": ["
|
|
229
|
-
"env": {
|
|
230
|
-
"EXPRESS_SERVER_URL": "http://127.0.0.1:3000",
|
|
231
|
-
"ENABLE_CANVAS_SYNC": "true"
|
|
232
|
-
}
|
|
317
|
+
"command": "npx",
|
|
318
|
+
"args": ["-y", "mcp-excalidraw-server"]
|
|
233
319
|
}
|
|
234
320
|
}
|
|
235
321
|
}
|
|
@@ -256,14 +342,9 @@ Config location: `.cursor/mcp.json` in your project root (or `~/.cursor/mcp.json
|
|
|
256
342
|
|
|
257
343
|
### Codex CLI
|
|
258
344
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
**Local (node)**
|
|
345
|
+
**npx (recommended)**
|
|
262
346
|
```bash
|
|
263
|
-
codex mcp add excalidraw
|
|
264
|
-
--env EXPRESS_SERVER_URL=http://127.0.0.1:3000 \
|
|
265
|
-
--env ENABLE_CANVAS_SYNC=true \
|
|
266
|
-
-- node /absolute/path/to/mcp_excalidraw/dist/index.js
|
|
347
|
+
codex mcp add excalidraw -- npx -y mcp-excalidraw-server
|
|
267
348
|
```
|
|
268
349
|
|
|
269
350
|
**Docker**
|
|
@@ -287,32 +368,13 @@ codex mcp remove excalidraw # Remove a server
|
|
|
287
368
|
|
|
288
369
|
Config location: `~/.config/opencode/opencode.json` or project-level `opencode.json`
|
|
289
370
|
|
|
290
|
-
**Local (node)**
|
|
291
371
|
```json
|
|
292
372
|
{
|
|
293
373
|
"$schema": "https://opencode.ai/config.json",
|
|
294
374
|
"mcp": {
|
|
295
375
|
"excalidraw": {
|
|
296
376
|
"type": "local",
|
|
297
|
-
"command": ["
|
|
298
|
-
"enabled": true,
|
|
299
|
-
"environment": {
|
|
300
|
-
"EXPRESS_SERVER_URL": "http://127.0.0.1:3000",
|
|
301
|
-
"ENABLE_CANVAS_SYNC": "true"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
**Docker**
|
|
309
|
-
```json
|
|
310
|
-
{
|
|
311
|
-
"$schema": "https://opencode.ai/config.json",
|
|
312
|
-
"mcp": {
|
|
313
|
-
"excalidraw": {
|
|
314
|
-
"type": "local",
|
|
315
|
-
"command": ["docker", "run", "-i", "--rm", "-e", "EXPRESS_SERVER_URL=http://host.docker.internal:3000", "-e", "ENABLE_CANVAS_SYNC=true", "ghcr.io/yctimlin/mcp_excalidraw:latest"],
|
|
377
|
+
"command": ["npx", "-y", "mcp-excalidraw-server"],
|
|
316
378
|
"enabled": true
|
|
317
379
|
}
|
|
318
380
|
}
|
|
@@ -325,34 +387,12 @@ Config location: `~/.config/opencode/opencode.json` or project-level `opencode.j
|
|
|
325
387
|
|
|
326
388
|
Config location: `~/.gemini/antigravity/mcp_config.json`
|
|
327
389
|
|
|
328
|
-
**Local (node)**
|
|
329
|
-
```json
|
|
330
|
-
{
|
|
331
|
-
"mcpServers": {
|
|
332
|
-
"excalidraw": {
|
|
333
|
-
"command": "node",
|
|
334
|
-
"args": ["/absolute/path/to/mcp_excalidraw/dist/index.js"],
|
|
335
|
-
"env": {
|
|
336
|
-
"EXPRESS_SERVER_URL": "http://127.0.0.1:3000",
|
|
337
|
-
"ENABLE_CANVAS_SYNC": "true"
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
**Docker**
|
|
345
390
|
```json
|
|
346
391
|
{
|
|
347
392
|
"mcpServers": {
|
|
348
393
|
"excalidraw": {
|
|
349
|
-
"command": "
|
|
350
|
-
"args": [
|
|
351
|
-
"run", "-i", "--rm",
|
|
352
|
-
"-e", "EXPRESS_SERVER_URL=http://host.docker.internal:3000",
|
|
353
|
-
"-e", "ENABLE_CANVAS_SYNC=true",
|
|
354
|
-
"ghcr.io/yctimlin/mcp_excalidraw:latest"
|
|
355
|
-
]
|
|
394
|
+
"command": "npx",
|
|
395
|
+
"args": ["-y", "mcp-excalidraw-server"]
|
|
356
396
|
}
|
|
357
397
|
}
|
|
358
398
|
}
|
|
@@ -362,66 +402,8 @@ Config location: `~/.gemini/antigravity/mcp_config.json`
|
|
|
362
402
|
|
|
363
403
|
### Notes
|
|
364
404
|
|
|
365
|
-
- **Docker networking**: Use `host.docker.internal` to reach the canvas server running on your host machine. On Linux, you may need `--add-host=host.docker.internal:host-gateway` or use `172.17.0.1`.
|
|
366
|
-
- **
|
|
367
|
-
- **Absolute paths**: When using local node setup, replace `/absolute/path/to/mcp_excalidraw` with the actual path where you cloned and built the repo.
|
|
368
|
-
- **In-memory storage**: The canvas server stores elements in memory. Restarting the server will clear all elements. Use the export/import scripts if you need persistence.
|
|
369
|
-
|
|
370
|
-
## Agent Skill (Optional)
|
|
371
|
-
|
|
372
|
-
This repo includes a skill at `skills/excalidraw-skill/` that provides:
|
|
373
|
-
|
|
374
|
-
- **Workflow playbook** (`SKILL.md`): step-by-step guidance for drawing, refining, and exporting diagrams
|
|
375
|
-
- **Cheatsheet** (`references/cheatsheet.md`): MCP tool and REST API reference
|
|
376
|
-
- **Helper scripts** (`scripts/*.cjs`): export, import, clear, healthcheck, CRUD operations
|
|
377
|
-
|
|
378
|
-
The skill complements the MCP server by giving your AI agent structured workflows to follow.
|
|
379
|
-
|
|
380
|
-
### Install The Skill (Codex CLI example)
|
|
381
|
-
|
|
382
|
-
```bash
|
|
383
|
-
mkdir -p ~/.codex/skills
|
|
384
|
-
cp -R skills/excalidraw-skill ~/.codex/skills/excalidraw-skill
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
To update an existing installation, remove the old folder first (`rm -rf ~/.codex/skills/excalidraw-skill`) then re-copy.
|
|
388
|
-
|
|
389
|
-
### Install The Skill (Claude Code)
|
|
390
|
-
|
|
391
|
-
**User-level** (available across all your projects):
|
|
392
|
-
```bash
|
|
393
|
-
mkdir -p ~/.claude/skills
|
|
394
|
-
cp -R skills/excalidraw-skill ~/.claude/skills/excalidraw-skill
|
|
395
|
-
```
|
|
396
|
-
|
|
397
|
-
**Project-level** (scoped to a specific project, can be committed to the repo):
|
|
398
|
-
```bash
|
|
399
|
-
mkdir -p /path/to/your/project/.claude/skills
|
|
400
|
-
cp -R skills/excalidraw-skill /path/to/your/project/.claude/skills/excalidraw-skill
|
|
401
|
-
```
|
|
402
|
-
|
|
403
|
-
Then invoke the skill in Claude Code with `/excalidraw-skill`.
|
|
404
|
-
|
|
405
|
-
To update an existing installation, remove the old folder first then re-copy.
|
|
406
|
-
|
|
407
|
-
### Use The Skill Scripts
|
|
408
|
-
|
|
409
|
-
All scripts respect `EXPRESS_SERVER_URL` (default `http://127.0.0.1:3000`) or accept `--url`.
|
|
410
|
-
|
|
411
|
-
```bash
|
|
412
|
-
EXPRESS_SERVER_URL=http://127.0.0.1:3000 node skills/excalidraw-skill/scripts/healthcheck.cjs
|
|
413
|
-
EXPRESS_SERVER_URL=http://127.0.0.1:3000 node skills/excalidraw-skill/scripts/export-elements.cjs --out diagram.elements.json
|
|
414
|
-
EXPRESS_SERVER_URL=http://127.0.0.1:3000 node skills/excalidraw-skill/scripts/import-elements.cjs --in diagram.elements.json --mode batch
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
### When The Skill Is Useful
|
|
418
|
-
|
|
419
|
-
- Repository workflow: export elements as JSON, commit it, and re-import later.
|
|
420
|
-
- Reliable refactors: clear + re-import in `sync` mode to make canvas match a file.
|
|
421
|
-
- Automated smoke tests: create/update/delete a known element to validate a deployment.
|
|
422
|
-
- Repeatable diagrams: keep a library of element JSON snippets and import them.
|
|
423
|
-
|
|
424
|
-
See `skills/excalidraw-skill/SKILL.md` and `skills/excalidraw-skill/references/cheatsheet.md`.
|
|
405
|
+
- **Docker networking**: Use `host.docker.internal` to reach the canvas server running on your host machine. On Linux, you may need `--add-host=host.docker.internal:host-gateway` or use `172.17.0.1`. The Docker MCP image sets `EXCALIDRAW_NO_AUTOSTART=1` (it has no frontend build) — run the canvas as its own container.
|
|
406
|
+
- **In-memory storage**: The canvas server stores elements in memory. Restarting the server clears all elements — use `export` / `snapshot` for persistence.
|
|
425
407
|
|
|
426
408
|
## MCP Tools (26 Total)
|
|
427
409
|
|
|
@@ -438,8 +420,36 @@ See `skills/excalidraw-skill/SKILL.md` and `skills/excalidraw-skill/references/c
|
|
|
438
420
|
|
|
439
421
|
Full schemas are discoverable via `tools/list` or in `skills/excalidraw-skill/references/cheatsheet.md`.
|
|
440
422
|
|
|
423
|
+
## Quick Start (From Source / Docker)
|
|
424
|
+
|
|
425
|
+
From source (Node >= 18):
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
npm ci
|
|
429
|
+
npm run build
|
|
430
|
+
PORT=3000 npm run canvas # canvas server (terminal 1)
|
|
431
|
+
node dist/index.js # MCP server over stdio (terminal 2, usually launched by your MCP client)
|
|
432
|
+
node dist/bin.js status # or drive the CLI straight from the build
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
Docker canvas server:
|
|
436
|
+
```bash
|
|
437
|
+
docker run -d -p 3000:3000 --name mcp-excalidraw-canvas ghcr.io/yctimlin/mcp_excalidraw-canvas:latest
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
MCP server image: `ghcr.io/yctimlin/mcp_excalidraw:latest` (stdio; point `EXPRESS_SERVER_URL` at the canvas container).
|
|
441
|
+
|
|
441
442
|
## Testing
|
|
442
443
|
|
|
444
|
+
### CLI Smoke Test
|
|
445
|
+
|
|
446
|
+
```bash
|
|
447
|
+
npx -y mcp-excalidraw-server start
|
|
448
|
+
npx -y mcp-excalidraw-server status
|
|
449
|
+
npx -y mcp-excalidraw-server add --one '{"type":"rectangle","x":100,"y":100,"width":300,"height":200}'
|
|
450
|
+
npx -y mcp-excalidraw-server describe
|
|
451
|
+
```
|
|
452
|
+
|
|
443
453
|
### Canvas Smoke Test (HTTP)
|
|
444
454
|
|
|
445
455
|
```bash
|
|
@@ -482,17 +492,51 @@ agent-browser wait --load networkidle
|
|
|
482
492
|
agent-browser screenshot /tmp/canvas.png
|
|
483
493
|
```
|
|
484
494
|
|
|
495
|
+
## FAQ
|
|
496
|
+
|
|
497
|
+
### How is this different from the official Excalidraw MCP?
|
|
498
|
+
|
|
499
|
+
The [official Excalidraw MCP](https://github.com/excalidraw/excalidraw-mcp) is a chat widget: you prompt, it streams a diagram into the conversation (the model gets two tools). This project is a **workbench for coding agents**: a persistent local canvas with element-level create/read/update/delete, layout tools, screenshots the model can see, snapshots, and `.excalidraw` file I/O — driveable via CLI, MCP, or REST. See the [full comparison table](#how-we-differ-from-the-official-excalidraw-mcp).
|
|
500
|
+
|
|
501
|
+
### Which AI tools does it work with?
|
|
502
|
+
|
|
503
|
+
Claude Code, Claude Desktop, Cursor, Codex CLI, OpenCode, and Google Antigravity are documented below — but any agent that can run shell commands can use the CLI, any MCP client can use the MCP server, and anything else (LangChain, custom apps) can use the REST API.
|
|
504
|
+
|
|
505
|
+
### Can the AI actually see the diagram it drew?
|
|
506
|
+
|
|
507
|
+
Yes — that's the core feature. `describe` returns a structured text summary (ids, positions, labels, connections) and `screenshot` returns a rendered PNG. Agents use both to catch truncated labels, overlaps, and bad arrow routing, then fix them element by element.
|
|
508
|
+
|
|
509
|
+
### Do I need a browser open?
|
|
510
|
+
|
|
511
|
+
Only for rendering-dependent features: screenshots, PNG/SVG export, viewport control, and Mermaid conversion (they render in the Excalidraw frontend). Creating, querying, updating elements and exporting `.excalidraw` JSON all work headless. The CLI exits with code `4` and tells you when a browser tab is needed.
|
|
512
|
+
|
|
513
|
+
### Are my diagrams persistent?
|
|
514
|
+
|
|
515
|
+
The canvas is in-memory by design (restart = blank canvas). Persist by exporting `.excalidraw` files into your repo (`export --out docs/architecture.excalidraw`) or with named `snapshot`s while working. Re-`import` a file to keep refining it later.
|
|
516
|
+
|
|
517
|
+
### Are excalidraw.com share links private?
|
|
518
|
+
|
|
519
|
+
`share` encrypts the scene locally with AES-GCM before uploading; the decryption key is only in the URL fragment, which excalidraw.com's server never sees. Anyone you give the full link to can view the diagram.
|
|
520
|
+
|
|
521
|
+
### Does it need an API key or cloud service?
|
|
522
|
+
|
|
523
|
+
No API key is required. Core drawing runs locally under MIT license. The only outbound call is the optional `share` upload to excalidraw.com.
|
|
524
|
+
|
|
525
|
+
### Can I use it without configuring MCP?
|
|
526
|
+
|
|
527
|
+
Yes — that's the recommended path for coding agents: `npx -y mcp-excalidraw-server install-skill --dir <skills-root>` and the agent drives everything through the CLI. MCP configuration is only needed for chat clients like Claude Desktop.
|
|
528
|
+
|
|
485
529
|
## Troubleshooting
|
|
486
530
|
|
|
487
|
-
-
|
|
488
|
-
-
|
|
531
|
+
- **CLI exit code 3** (canvas unreachable): the server is not running for an inspecting command such as `status`, auto-start is disabled (`EXCALIDRAW_NO_AUTOSTART=1`), or `EXPRESS_SERVER_URL` points at a non-loopback host. Run `start` explicitly or fix the env.
|
|
532
|
+
- **CLI exit code 4** (browser required): screenshots, image export, viewport, and mermaid conversion render in the frontend — open `http://127.0.0.1:3000` in a browser and retry.
|
|
533
|
+
- **Canvas not updating**: confirm `EXPRESS_SERVER_URL` points at the running canvas server (`status` shows the URL in use).
|
|
534
|
+
- **Updates/deletes fail after batch creation**: ensure you are on a build that includes the batch id preservation fix (merged via PR #34).
|
|
489
535
|
|
|
490
536
|
## Known Issues / TODO
|
|
491
537
|
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
- [ ] **Persistent storage**: Elements are stored in-memory — restarting the server clears everything. Use `export_scene` / snapshots as a workaround.
|
|
495
|
-
- [ ] **Image export requires a browser**: `export_to_image` and `get_canvas_screenshot` rely on the frontend doing the actual rendering. The canvas UI must be open in a browser.
|
|
538
|
+
- [ ] **Persistent storage**: Elements are stored in-memory — restarting the server clears everything. Use `export` / snapshots as a workaround.
|
|
539
|
+
- [ ] **Image export requires a browser**: screenshots and image export rely on the frontend doing the actual rendering. A headless rendering mode is planned.
|
|
496
540
|
|
|
497
541
|
Contributions welcome!
|
|
498
542
|
|
|
@@ -501,4 +545,14 @@ Contributions welcome!
|
|
|
501
545
|
```bash
|
|
502
546
|
npm run type-check
|
|
503
547
|
npm run build
|
|
548
|
+
npm run cli -- status # run the CLI from the local build
|
|
549
|
+
npm run sync:skills # after editing skills/excalidraw-skill, sync the repo-local agent copy
|
|
504
550
|
```
|
|
551
|
+
|
|
552
|
+
Bug reports and pull requests are welcome on [GitHub issues](https://github.com/yctimlin/mcp_excalidraw/issues). If this project helps you, a ⭐ helps others find it.
|
|
553
|
+
|
|
554
|
+
## License
|
|
555
|
+
|
|
556
|
+
[MIT](LICENSE) © [yctimlin](https://github.com/yctimlin) — not affiliated with the Excalidraw team. [Excalidraw](https://github.com/excalidraw/excalidraw) is its own MIT-licensed project; this toolkit builds on it with love.
|
|
557
|
+
|
|
558
|
+
**Links:** [npm package](https://www.npmjs.com/package/mcp-excalidraw-server) · [GitHub](https://github.com/yctimlin/mcp_excalidraw) · [Issues](https://github.com/yctimlin/mcp_excalidraw/issues) · [Demo video](https://youtu.be/ufW78Amq5qA)
|
package/dist/bin.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AA4CA,OAAO,EAAE,CAAC"}
|