Metadata-Version: 2.4
Name: shapecraft
Version: 0.1.2a1
Summary: Craft real CAD with Claude. MCP server for Onshape.
Project-URL: Homepage, https://github.com/newTurn2017/shapecraft
Project-URL: Repository, https://github.com/newTurn2017/shapecraft
Project-URL: Issues, https://github.com/newTurn2017/shapecraft/issues
Author: newTurn2017
License: MIT License
        
        Copyright (c) 2026 newTurn2017
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: anthropic,cad,claude,mcp,onshape
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: mcp>=1.0.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=7.4.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Description-Content-Type: text/markdown

# shapecraft

> Craft real CAD with Claude. Any shape. Any tool.

**Status: v0.1.2-alpha** — auth + reads working, writes under active repair. Live integration testing against Onshape revealed that the feature-write path silently produced solver errors in v0.1.0 / v0.1.1 (HTTP 200 but `featureStatus=ERROR`). v0.1.2a1 makes `add_feature` raise on solver rejection so failures surface immediately. Systematic feature-payload fixes land in v0.1.3. See [CHANGELOG.md](CHANGELOG.md) for the full list of known-broken tools.

**shapecraft** gives Claude first-class tools to drive professional parametric CAD. The MCP surface covers document/workspace management, sketch primitives + splines + constraints, every core feature (extrude/revolve/loft/fillet/chamfer/pattern/boolean/thicken), offset planes, variable tables, FeatureScript evaluation, exports to STL/STEP/GLTF, and assembly operations with 4 mate types — but most feature-write tools are currently producing solver-rejected payloads and will raise `OnshapeError` until v0.1.3 lands.

## Install

```bash
uvx shapecraft   # or: pip install shapecraft
```

## Register with Claude Code

```bash
claude mcp add shapecraft \
  -s user \
  -e ONSHAPE_ACCESS_KEY=<your_key> \
  -e ONSHAPE_SECRET_KEY=<your_secret> \
  -- uvx shapecraft
```

Get your keys at [dev-portal.onshape.com](https://dev-portal.onshape.com).

## Tools (MCP surface covers ~48 operations, many currently failing at the solver — see CHANGELOG)

- `shapecraft_list_documents`
- `shapecraft_create_document`
- `shapecraft_create_part_studio`
- `shapecraft_sketch_rectangle`
- `shapecraft_sketch_spline` *(NEW vs hedless)*
- `shapecraft_offset_plane` *(NEW)*
- `shapecraft_extrude` with symmetric + reverse flags *(upgraded)*
- `shapecraft_loft` *(NEW)*

Plus `build_coincident_constraint` helper (sketch constraint builder — first of 7 coming in T1).

See the [design spec](docs/superpowers/specs/2026-04-18-shapecraft-design.md) for the full T1 → T3 roadmap.

## Development

```bash
python3 -m venv venv
./venv/bin/pip install -e ".[dev]"
./venv/bin/pytest tests/unit -v
```

Integration tests (`tests/integration/`) hit live Onshape and require `ONSHAPE_ACCESS_KEY`/`ONSHAPE_SECRET_KEY` env vars.

## Releasing

1. Bump version in `pyproject.toml`
2. Update `CHANGELOG.md`
3. `git tag v0.1.0 && git push --tags`
4. `release.yml` publishes to PyPI via trusted publishing (configure once at pypi.org)

## License

MIT. See [LICENSE](LICENSE).

## Credits

Inspired by [hedless/onshape-mcp](https://github.com/hedless/onshape-mcp) (MIT per its README) — shapecraft is an independent reimplementation that covers a broader slice of the Onshape REST and FeatureScript API.
