Plasticity MCP
# Plasticity MCP
A local MCP server for driving native CAD operations in Plasticity, with an optional Workbench for model review, structured feedback, and print preparation.
The primary target is Plasticity 26.1.3 on macOS Apple Silicon. The server uses Plasticity's own command factories and document history through a loopback-only Electron CDP endpoint. It does not patch or re-sign the application. MCP geometry inputs use millimeters and degrees; native edits support Plasticity Undo and Redo.
## What it provides
- Native Plasticity scene inspection, precise B-rep measurements, and revision-bound references to bodies, faces, and edges.
- Native CAD creation and editing, document operations, import/export, and camera screenshots.
- Agent guidance and workflows for image/sketch-driven design, functional clarification, fasteners, and practical strength screening.
- Optional Workbench for viewing models and measurement tables, submitting validated dimensional feedback, and tablet annotations on the same local network.
- Optional Creality Print workflow for slicing and print-job preparation. The agent waits for explicit user confirmation before starting a print.
See the [full tool reference](docs/tool-reference.md), [acceptance matrix](docs/acceptance-matrix.md), and [Workbench operations guide](docs/workbench-operations.md) for details and current verification status.
## Requirements
- macOS on Apple Silicon
- Plasticity 26.1.3 installed at `/Applications/Plasticity.app`
- Node.js 24 or newer
- Codex CLI for the example MCP registration below
This is an early, version-specific project. Live CAD and slicer operations depend on the installed applications and are not covered by mock tests alone. Check the [acceptance matrix](docs/acceptance-matrix.md) before relying on a specific operation.
## Install and run
```sh
git clone https://github.com/Mesteriis/plasticity-mcp.git
cd plasticity-mcp
npm install
npm run start:plasticity
```
In another terminal, register the stdio MCP server with Codex:
```sh
codex mcp add plasticity -- npm --prefix "$PWD" start
```
Then restart or refresh Codex's MCP connections. Ask the agent to call `plasticity_list_windows`, then connect to an explicitly selected window with `plasticity_connect`.
The launcher does not terminate an existing Plasticity process to add MCP access. If it reports that a restart is needed, save your documents, close Plasticity yourself, then rerun the command. CDP listens on loopback only.
### Optional Workbench
The Workbench is not required for chat-based use. Start it on the local machine with:
```sh
npm run start:workbench
```
To make it reachable by a tablet on the same private network, run `npm run start:workbench -- --lan`; the server prints its local address. Do not expose it to the public internet. Follow the [Workbench guide](docs/workbench-operations.md) for registration, sharing, backup, and recovery.
## Development
```sh
npm test
npm run typecheck
npm --prefix workbench test
npm --prefix workbench run typecheck
npm --prefix workbench run build
```
Live acceptance checks use a real Plasticity session and can mutate a document. Read the corresponding acceptance guide and explicitly select a disposable test document before running them; they are not part of the default test suite.
## Safety and scope
- Mutations are serialized and checked against the current document revision; stale references are rejected.
- After a timeout or lost connection during a mutation, inspect/reconcile the scene before issuing another change.
- Workbench dimensional inputs are validated in the browser and again on the server.
- Print submission and starting a print are separate actions; starting requires explicit user confirmation.
- This project does not replace Plasticity, provide certified engineering analysis, or guarantee printability or part strength. Strength tools are screening calculations whose assumptions and limitations must be reviewed.
## Contributing and support
Read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. Report security issues using the private reporting process in [SECURITY.md](SECURITY.md). See [SUPPORT.md](SUPPORT.md) for bug reports, feature requests, and usage questions. Contributions are released under the [MIT License](LICENSE), with copyright attributed to Aleksand Meshchriakov.
TDQS
Scored across 371 tools
There is massive functional overlap across the set: near-identical importers (plasticity_list_step_imports vs plasticity_list_cad_reference_imports), multiple fastener-group tools (inspect/check_layout/verify_load/verify_plate_bearing/distribute), and parallel DCB/ENF/MMB energy registries with read/list/match/record/import variants that are hard to distinguish in use. Individual descriptions are enormous but that verbosity does not resolve which of several similar tools to pick, and several pairs appear to do the same thing.
Almost all tools use a consistent snake_case verb_noun convention under a uniform plasticity_ prefix (create_*, list_*, measure_*, verify_*, analyze_*). Minor deviations and a few near-duplicate names (list_step_imports vs list_cad_reference_imports) slightly weaken predictability, but the pattern is largely readable and consistent.
371 tools is an extreme mismatch for any practical server scope, far beyond the 3-15 sweet spot. The surface is so large that it overwhelms selection, and much of the count is duplicated capability rather than distinct operations.
Inferred domain is CAD modeling plus FEA/strength verification plus print-process evidence, and the surface covers creation, editing, measurement, export, analysis, and immutable evidence registries very thoroughly with few obvious gaps. Coverage is arguably complete to the point of redundancy rather than deficient.