An MCP server for JupyterCAD that allows you to control it using LLMs/natural language. Suggestions and contributions are very welcome. The default transport mechanism is stdio. To start the server with stdio, use the following command: To use the streamable-http transport, use this command instead: An example using the OpenAI Agents SDK is available at examples/openaiagentsclient.py. To run it, f
Add this skill
npx mdskills install asmith26/jupytercad-mcpComprehensive CAD control MCP server with clear setup docs and rich tool set for 3D modeling operations
1# jupytercad-mcp23An MCP server for [JupyterCAD](https://github.com/jupytercad/JupyterCAD) that allows you to control it using LLMs/natural language.45https://github.com/user-attachments/assets/7edb31b2-2c80-4096-9d9c-048ae27c54e767Suggestions and contributions are very welcome.89## Usage1011The default transport mechanism is [`stdio`](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#stdio). To start the server with `stdio`, use the following command:1213```bash14uvx --with jupytercad-mcp jupytercad-mcp15```1617To use the [`streamable-http`](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport, use this command instead:1819```bash20uvx --with jupytercad-mcp jupytercad-mcp streamable-http21```2223### Example2425An example using the [OpenAI Agents SDK](https://github.com/openai/openai-agents-python) is available at [examples/openai_agents_client.py](examples/openai_agents_client.py). To run it, follow these steps:26271. Clone the repository and navigate into the directory:28 ```bash29 git clone git@github.com:asmith26/jupytercad-mcp.git30 cd jupytercad-mcp31 ```32332. Install the OpenAI Agents SDK. A Makefile target is provided for convenience:34 ```bash35 make setup-examples-env36 ```37383. In [examples/openai_agents_client.py](examples/openai_agents_client.py#L13), update line 13 to configure a `MODEL` (see [supported models](https://openai.github.io/openai-agents-python/models/)).39404. Run JupyterLab from the project's root directory:41 ```bash42 make jupyter-lab43 ```44455. In JupyterLab, create a new "CAD file" and rename it to **my_cad_design.jcad**. This file path matches the default [`JCAD_PATH`](examples/openai_agents_client.py#L16) in the example, allowing you to visualise the changes made by the JupyterCAD MCP server.46476. (Optional) The OpenAI Agents SDK supports [tracing](https://openai.github.io/openai-agents-python/tracing/) to record events like LLM generations and tool calls. To enable it, set [`USE_MLFLOW_TRACING=True`](examples/openai_agents_client.py#L15) and run the MLflow UI:48 ```bash49 make mlflow-ui50 ```51527. Run the example with the default instruction, "Add a box with width/height/depth 1":53 ```bash54 make example-openai-agents-client55 ```5657#### Interactive Chat Interface5859The example includes an interactive chat interface using the OpenAI Agents SDK's60[REPL utility](https://openai.github.io/openai-agents-python/repl/). To enable it, set [`USE_REPL=True`](examples/openai_agents_client.py#L14).6162#### `streamable-http`6364To use the `streamable-http` transport, first start the MCP server:65```bash66uvx --with jupytercad-mcp jupytercad-mcp streamable-http67```6869Then, run the example with the `TRANSPORT` variable set to `"streamable-http"` in the [client example](examples/openai_agents_client.py#L12).7071## Tools7273The following tools are available:7475- **get_current_cad_design**: Reads the current content of the JCAD document.76- **remove**: Remove an object from the document.77- **rename**: Rename an object in the document.78- **add_annotation**: Add an annotation to the document.79- **remove_annotation**: Remove an annotation from the document.80- **add_occ_shape**: Add an OpenCascade TopoDS shape to the document.81- **add_box**: Add a box to the document.82- **add_cone**: Add a cone to the document.83- **add_cylinder**: Add a cylinder to the document.84- **add_sphere**: Add a sphere to the document.85- **add_torus**: Add a torus to the document.86- **cut**: Apply a cut boolean operation between two objects.87- **fuse**: Apply a union boolean operation between two objects.88- **intersect**: Apply an intersection boolean operation between two objects.89- **chamfer**: Apply a chamfer operation on an object.90- **fillet**: Apply a fillet operation on an object.91- **set_visible**: Sets the visibility of an object.92- **set_color**: Sets the color of an object.93
Full transparency — inspect the skill content before installing.