jupytercad-mcp


Namejupytercad-mcp JSON
Version 0.1.0a0 PyPI version JSON
download
home_pageNone
SummaryAn MCP server for JupyterCAD that allows you to control it using natural language.
upload_time2025-08-03 23:02:49
maintainerNone
docs_urlNone
authorasmith26
requires_python>=3.10
licenseNone
keywords jupytercad jupyterlab mcp computer-aided design cad
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # jupytercad-mcp

An MCP server for JupyterCAD that allows you to control it using natural language.

Suggestions and contributions are very welcome.

## Usage

> NOTE: the `jupytercad` dependency currently requires [this PR](https://github.com/jupytercad/JupyterCAD/pull/772) from JupyterCAD.

The 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:

```bash
uvx --with jupytercad-mcp jupytercad-mcp
```

To use the [`streamable-http`](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport, use this command instead:

```bash
uvx --with jupytercad-mcp jupytercad-mcp streamable-http
```

### Example

An 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:

1.  Clone the repository and navigate into the directory:
    ```bash
    git clone git@github.com:asmith26/jupytercad-mcp.git
    cd jupytercad-mcp
    ```

2.  Install the OpenAI Agents SDK. A Makefile target is provided for convenience:
    ```bash
    make setup-examples-env
    ```

3.  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/)).

4.  Run JupyterLab from the project's root directory:
    ```bash
    make jupyter-lab
    ```

5.  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.

6.  (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:
    ```bash
    make mlflow-ui
    ```

7.  Run the example with the default instruction, "Add a box with width/height/depth 1":
    ```bash
    make example-openai-agents-client
    ```

#### Interactive Chat Interface

The example includes an interactive chat interface using the OpenAI Agents SDK's 
[REPL utility](https://openai.github.io/openai-agents-python/repl/). To enable it, set [`USE_REPL = True`](examples/openai_agents_client.py#L14).

#### `streamable-http`

To use the `streamable-http` transport, first start the MCP server:
```bash
uvx --with jupytercad-mcp jupytercad-mcp streamable-http
```

Then, run the example with the `TRANSPORT` variable set to `"streamable-http"` in the [client example](examples/openai_agents_client.py#L12).

## Tools

The following tools are available:

- **get_current_cad_design**: Reads the current content of the JCAD document.
- **remove**: Remove an object from the document.
- **rename**: Rename an object in the document.
- **add_annotation**: Add an annotation to the document.
- **remove_annotation**: Remove an annotation from the document.
- **add_occ_shape**: Add an OpenCascade TopoDS shape to the document.
- **add_box**: Add a box to the document.
- **add_cone**: Add a cone to the document.
- **add_cylinder**: Add a cylinder to the document.
- **add_sphere**: Add a sphere to the document.
- **add_torus**: Add a torus to the document.
- **cut**: Apply a cut boolean operation between two objects.
- **fuse**: Apply a union boolean operation between two objects.
- **intersect**: Apply an intersection boolean operation between two objects.
- **chamfer**: Apply a chamfer operation on an object.
- **fillet**: Apply a fillet operation on an object.
- **set_visible**: Sets the visibility of an object.
- **set_color**: Sets the color of an object.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jupytercad-mcp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "jupytercad, jupyterlab, mcp, computer-aided design, cad",
    "author": "asmith26",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/41/df/a8ae9dc65ceae2040e9175e0d80beda8b370df922b687acc33ddbe9cec6c/jupytercad_mcp-0.1.0a0.tar.gz",
    "platform": null,
    "description": "# jupytercad-mcp\n\nAn MCP server for JupyterCAD that allows you to control it using natural language.\n\nSuggestions and contributions are very welcome.\n\n## Usage\n\n> NOTE: the `jupytercad` dependency currently requires [this PR](https://github.com/jupytercad/JupyterCAD/pull/772) from JupyterCAD.\n\nThe 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:\n\n```bash\nuvx --with jupytercad-mcp jupytercad-mcp\n```\n\nTo use the [`streamable-http`](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#streamable-http) transport, use this command instead:\n\n```bash\nuvx --with jupytercad-mcp jupytercad-mcp streamable-http\n```\n\n### Example\n\nAn 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:\n\n1.  Clone the repository and navigate into the directory:\n    ```bash\n    git clone git@github.com:asmith26/jupytercad-mcp.git\n    cd jupytercad-mcp\n    ```\n\n2.  Install the OpenAI Agents SDK. A Makefile target is provided for convenience:\n    ```bash\n    make setup-examples-env\n    ```\n\n3.  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/)).\n\n4.  Run JupyterLab from the project's root directory:\n    ```bash\n    make jupyter-lab\n    ```\n\n5.  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.\n\n6.  (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:\n    ```bash\n    make mlflow-ui\n    ```\n\n7.  Run the example with the default instruction, \"Add a box with width/height/depth 1\":\n    ```bash\n    make example-openai-agents-client\n    ```\n\n#### Interactive Chat Interface\n\nThe example includes an interactive chat interface using the OpenAI Agents SDK's \n[REPL utility](https://openai.github.io/openai-agents-python/repl/). To enable it, set [`USE_REPL = True`](examples/openai_agents_client.py#L14).\n\n#### `streamable-http`\n\nTo use the `streamable-http` transport, first start the MCP server:\n```bash\nuvx --with jupytercad-mcp jupytercad-mcp streamable-http\n```\n\nThen, run the example with the `TRANSPORT` variable set to `\"streamable-http\"` in the [client example](examples/openai_agents_client.py#L12).\n\n## Tools\n\nThe following tools are available:\n\n- **get_current_cad_design**: Reads the current content of the JCAD document.\n- **remove**: Remove an object from the document.\n- **rename**: Rename an object in the document.\n- **add_annotation**: Add an annotation to the document.\n- **remove_annotation**: Remove an annotation from the document.\n- **add_occ_shape**: Add an OpenCascade TopoDS shape to the document.\n- **add_box**: Add a box to the document.\n- **add_cone**: Add a cone to the document.\n- **add_cylinder**: Add a cylinder to the document.\n- **add_sphere**: Add a sphere to the document.\n- **add_torus**: Add a torus to the document.\n- **cut**: Apply a cut boolean operation between two objects.\n- **fuse**: Apply a union boolean operation between two objects.\n- **intersect**: Apply an intersection boolean operation between two objects.\n- **chamfer**: Apply a chamfer operation on an object.\n- **fillet**: Apply a fillet operation on an object.\n- **set_visible**: Sets the visibility of an object.\n- **set_color**: Sets the color of an object.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An MCP server for JupyterCAD that allows you to control it using natural language.",
    "version": "0.1.0a0",
    "project_urls": {
        "Homepage": "https://github.com/asmith26/jupytercad-mcp"
    },
    "split_keywords": [
        "jupytercad",
        " jupyterlab",
        " mcp",
        " computer-aided design",
        " cad"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c3a2fa369ff2cb7d27f2e3b6688751b7827a11d632510da1359af6d853d46027",
                "md5": "957dfdd1182119d4886dcff4a3c28903",
                "sha256": "abd6d81c60ee2313ec66e6b5f9d7a304d926890122839b8f77def687717965ea"
            },
            "downloads": -1,
            "filename": "jupytercad_mcp-0.1.0a0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "957dfdd1182119d4886dcff4a3c28903",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 4656,
            "upload_time": "2025-08-03T23:02:47",
            "upload_time_iso_8601": "2025-08-03T23:02:47.819859Z",
            "url": "https://files.pythonhosted.org/packages/c3/a2/fa369ff2cb7d27f2e3b6688751b7827a11d632510da1359af6d853d46027/jupytercad_mcp-0.1.0a0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "41dfa8ae9dc65ceae2040e9175e0d80beda8b370df922b687acc33ddbe9cec6c",
                "md5": "e13e1832ee9da251b2229d6001f9d631",
                "sha256": "dcce1097f798e9bcd87825591ffcb1f28e355124cf18a3d92079a3407be21b42"
            },
            "downloads": -1,
            "filename": "jupytercad_mcp-0.1.0a0.tar.gz",
            "has_sig": false,
            "md5_digest": "e13e1832ee9da251b2229d6001f9d631",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 3595,
            "upload_time": "2025-08-03T23:02:49",
            "upload_time_iso_8601": "2025-08-03T23:02:49.137597Z",
            "url": "https://files.pythonhosted.org/packages/41/df/a8ae9dc65ceae2040e9175e0d80beda8b370df922b687acc33ddbe9cec6c/jupytercad_mcp-0.1.0a0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-03 23:02:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "asmith26",
    "github_project": "jupytercad-mcp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "jupytercad-mcp"
}
        
Elapsed time: 2.10795s