An MCP plugin for creating 3D models with Claude AI using CadQuery
Project description
Claude CAD
A Model Context Protocol (MCP) plugin for creating 3D models with Claude AI using CadQuery.
Overview
Claude CAD is an MCP plugin that allows Claude AI to create 3D models based on text prompts. It leverages the powerful parametric modeling capabilities of CadQuery, a Python-based CAD scripting library, to generate complex 3D models that can be exported in various formats (STEP, STL, etc.).
Features
- Generate 3D models from natural language descriptions
- Parametric modeling using CadQuery's Python API
- Support for primitives, boolean operations, extrusions, and more
- Export models in various formats (STEP, STL, etc.)
- Full integration with Claude AI via MCP
Installation
Prerequisites
- Python 3.9+
- CadQuery
- Model Context Protocol SDK
- uv (Modern Python package installer)
Install using uv
# Install uv if not already installed
pip install uv
# Create a virtual environment
uv venv
# Activate the virtual environment
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install from PyPI
uv pip install claude-cad
# Or install from source
git clone https://github.com/bronson/claude_cad.git
cd claude_cad
uv pip install -e .
For detailed installation instructions, see INSTALL.md.
Configuration
To use Claude CAD with Claude Desktop, you need to update your Claude configuration file:
Option 1: Using Python directly
{
"mcpServers": {
"claude_cad": {
"command": "python",
"args": ["-m", "claude_cad.server"],
"env": {}
}
}
}
Option 2: Using uvx (Recommended)
For improved dependency management, you can use uvx (part of the uv toolkit):
{
"mcpServers": {
"claude_cad": {
"command": "uvx",
"args": ["-m", "claude_cad.server"],
"env": {}
}
}
}
Locate your Claude Desktop configuration file at:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
After updating the configuration, restart Claude Desktop for the changes to take effect.
Usage
Once installed and configured, you can ask Claude to create 3D models using natural language:
Please create a 3D model of a small gear with 10 teeth and a 20mm diameter.
Claude will use the Claude CAD MCP plugin to generate the model and provide a download link or preview.
Examples
See the examples directory for sample models and prompts:
simple_box.py: Creates a basic box primitivelego_brick.py: Creates a LEGO-compatible bricktext_to_model.py: Demonstrates text-to-3D-model generation
Development
To set up a development environment:
# Clone the repository
git clone https://github.com/bronson/claude_cad.git
cd claude_cad
# Create a virtual environment
uv venv
# Install dependencies
uv pip install -r requirements.txt
# Install in development mode
uv pip install -e .
# Run tests
python -m unittest discover tests
License
Apache 2.0
Credits
- CadQuery: https://github.com/CadQuery/cadquery
- Model Context Protocol: Anthropic's Claude integration API
- uv: https://github.com/astral-sh/uv
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_cad-0.1.3.tar.gz.
File metadata
- Download URL: claude_cad-0.1.3.tar.gz
- Upload date:
- Size: 24.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
958879879c895c10d30e62a61b423c8c1b33a1f478c0b4c5a41e59be419a9dd6
|
|
| MD5 |
4788b9d5df58e07669590f331e587732
|
|
| BLAKE2b-256 |
482936925201c5525c3a029aada11f623e6a9f7cbe4c4d1d27ef3a86048054dc
|
File details
Details for the file claude_cad-0.1.3-py3-none-any.whl.
File metadata
- Download URL: claude_cad-0.1.3-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20541603db39be52df8ca60ba0d796f4d0f0007332ba975bb28508652ce8f7b8
|
|
| MD5 |
361940ed4380521e92a8a45b8b36df69
|
|
| BLAKE2b-256 |
9e31a85c798063bfc7348b474e80238cd0c0f8f44fcdbc30f9e3a2193d5aa565
|