m3e-canvas 0.0.0-stage → 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 lnkiai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,94 @@
1
- # Temporary Holding Version
1
+ # m3e-canvas
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A [Model Context Protocol](https://modelcontextprotocol.io/) server for [M3E Canvas](https://lnkiai.github.io/m3e-canvas/), the browser editor for Material 3 Expressive screens.
4
+
5
+ With it connected, an AI agent can design the screens of an app and hand you a link. Opening the link adds the design to your projects in M3E Canvas, where you refine it. Give the agent the link of the finished design, and it builds the app from the prompt M3E Canvas writes for it.
6
+
7
+ The server runs on your machine and talks only to the agent that started it. It sends nothing anywhere and does not drive a browser: the link itself carries the design. The one thing it can write is a design file, when the agent is asked for one, and the one thing it reads is a design file you point it at.
8
+
9
+ ## Set up
10
+
11
+ You need Node.js 20 or later.
12
+
13
+ **Claude Code**
14
+
15
+ ```sh
16
+ claude mcp add m3e-canvas -- npx -y m3e-canvas
17
+ ```
18
+
19
+ **Claude Desktop, Cursor and other clients that read `mcpServers`**
20
+
21
+ ```json
22
+ {
23
+ "mcpServers": {
24
+ "m3e-canvas": {
25
+ "command": "npx",
26
+ "args": ["-y", "m3e-canvas"]
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ **VS Code** (`.vscode/mcp.json`)
33
+
34
+ ```json
35
+ {
36
+ "servers": {
37
+ "m3e-canvas": {
38
+ "command": "npx",
39
+ "args": ["-y", "m3e-canvas"]
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ **Codex** (`~/.codex/config.toml`)
46
+
47
+ ```toml
48
+ [mcp_servers.m3e-canvas]
49
+ command = "npx"
50
+ args = ["-y", "m3e-canvas"]
51
+ ```
52
+
53
+ **On Windows**, clients start the command without a shell, so `npx` needs `cmd /c` in front of it:
54
+
55
+ ```sh
56
+ claude mcp add m3e-canvas -- cmd /c npx -y m3e-canvas
57
+ ```
58
+
59
+ In the settings files, that is `"command": "cmd"` with `"args": ["/c", "npx", "-y", "m3e-canvas"]`.
60
+
61
+ Then ask for a design:
62
+
63
+ > In M3E Canvas, design the screens of an app for saving and searching recipes.
64
+
65
+ The agent replies with a link. Open it.
66
+
67
+ ## Tools
68
+
69
+ | Tool | What it does |
70
+ |---|---|
71
+ | `get_guide` | Returns the guide to the design format: the document's fields and every kind of part. |
72
+ | `check_design` | Checks a design and says what to fix, with the path of each field. |
73
+ | `create_design_link` | Checks a design and returns the link that opens it as a new project. |
74
+ | `save_design_file` | Checks a design and saves it as a `.json` file, for a design too large for a link. Never writes over an existing file. |
75
+ | `read_design_link` | Returns the design a link carries, so an existing design can be changed. |
76
+ | `get_build_prompt` | Returns the prompt M3E Canvas writes for a design, from its link or its saved file, so the agent can build the app that was drawn. |
77
+
78
+ To change a design you already have, press **Copy link** in the app's **Ask an AI** dialog and give the link to the agent.
79
+
80
+ To have the app built, give the agent the same link and ask for it:
81
+
82
+ > Build the app in this M3E Canvas design: https://lnkiai.github.io/m3e-canvas/#docz=...
83
+
84
+ The agent gets the prompt the app itself writes for that design (the screens part by part, the color scheme, the theme, and how the screens connect) and builds from it. The prompt is in English unless you ask for Japanese, Chinese or Korean.
85
+
86
+ A saved file opens from the projects page: **Open from file**, or drop it on the page.
87
+
88
+ ## Options
89
+
90
+ `M3E_CANVAS_URL` sets the address the links open, for a copy of the app hosted somewhere else. It defaults to `https://lnkiai.github.io/m3e-canvas/`.
91
+
92
+ ## License
93
+
94
+ MIT. The source is in [`packages/mcp`](https://github.com/lnkiai/m3e-canvas/tree/main/packages/mcp) of the M3E Canvas repository.