@polypad/mcp 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +65 -3
- package/dist/index.js +35151 -0
- package/package.json +49 -6
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Polypad (Alex Khalevine)
|
|
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,65 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# @polypad/mcp
|
|
2
|
+
|
|
3
|
+
MCP server for [Polypad](https://polypad.ink), a free parametric CAD editor that runs in your browser. It lets Claude, Cursor or another AI assistant build and inspect a 3D model in the Polypad tab you have open, while you watch. Every change is one undo step.
|
|
4
|
+
|
|
5
|
+
The server runs on your own computer. Nothing is uploaded and there is no account.
|
|
6
|
+
|
|
7
|
+
## Set up
|
|
8
|
+
|
|
9
|
+
You need Node.js 22 or newer. Add the server to your AI client; `npx` downloads it on first use.
|
|
10
|
+
|
|
11
|
+
**Claude Code**
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
claude mcp add polypad -- npx -y @polypad/mcp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
**Claude Desktop** (Settings, Developer, Edit Config, then restart)
|
|
18
|
+
|
|
19
|
+
```json
|
|
20
|
+
{
|
|
21
|
+
"mcpServers": {
|
|
22
|
+
"polypad": {
|
|
23
|
+
"command": "npx",
|
|
24
|
+
"args": ["-y", "@polypad/mcp"]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Cursor** (`.cursor/mcp.json` in a project, or `~/.cursor/mcp.json` for all projects): the same `mcpServers` block as above.
|
|
31
|
+
|
|
32
|
+
## Connect
|
|
33
|
+
|
|
34
|
+
1. Open [polypad.ink](https://polypad.ink) in Chrome, Edge or Firefox and open a project.
|
|
35
|
+
2. Click **Connect AI** in the top bar.
|
|
36
|
+
3. Enter the pairing code. It is new on every start; the server prints it to its log, and the assistant's first answer about Polypad shows it too.
|
|
37
|
+
4. Click **Connect**, then ask for a part: "a 40 x 20 x 5 mm bracket with two M3 holes and 1 mm fillets".
|
|
38
|
+
|
|
39
|
+
Safari cannot connect to a local server, so use Chrome, Edge or Firefox for the Polypad tab. The claude.ai website cannot be used either: it needs a hosted server.
|
|
40
|
+
|
|
41
|
+
## Options
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
npx -y @polypad/mcp [--port <n>] [--origin <url>]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- `--port <n>`: port of the local WebSocket bridge (default 41720). Enter the same port under Advanced in the Connect AI dialog.
|
|
48
|
+
- `--origin <url>`: allow another page origin to connect, for example your own Polypad deployment. Repeatable. Always allowed: polypad.ink and localhost:3000.
|
|
49
|
+
|
|
50
|
+
## Tools
|
|
51
|
+
|
|
52
|
+
- Generate: `new_project`, `set_parameter`, `add_primitive`, `add_sketch`, `extrude`, `revolve`, `combine`, `hole`, `fillet`, `chamfer`, `shell`, `pattern`, `mirror`, `move`, `update_feature`, `delete_feature`, `undo`
|
|
53
|
+
- Inspect: `get_project`, `list_faces`, `list_edges`, `measure`, `render_view`
|
|
54
|
+
|
|
55
|
+
Lengths are in mm and angles in degrees. Sizes can be numbers or formulas over your parameters.
|
|
56
|
+
|
|
57
|
+
## Privacy and security
|
|
58
|
+
|
|
59
|
+
- The server listens on `127.0.0.1` only, so nothing on your network can reach it.
|
|
60
|
+
- A pairing code, new at every start, must be entered in the tab. Five wrong codes in a minute lock pairing for that minute.
|
|
61
|
+
- Only Polypad pages are accepted (the `Origin` header is checked), not other websites.
|
|
62
|
+
- The assistant sees and edits only the project you have open. Disconnect in the dialog cuts it off at any time.
|
|
63
|
+
- Polypad sends nothing to a server. What leaves your machine is what your AI client sends to its model provider: your prompts and the tool results.
|
|
64
|
+
|
|
65
|
+
More: [polypad.ink](https://polypad.ink). License: MIT.
|