GT

gNucleus Text-To-CAD

Created 5 months ago

Generative AI platform that transforms text and images into editable CAD models.

development location documentation public CAD AI

What is gNucleus Text-To-CAD?

Generate CAD parts and assemblies from text using gNucleus AI models.

Documentation

gNucleus Text To CAD MCP server

Prerequisites

  • Python 3.7+
  • gNucleus Developer Accounts with:
  • gNucleus API key

Setup

  1. Clone this repository
  2. Create and activate a virtual environment (recommended):
    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Create a .env file in the root directory with the following variables: Individual User
    GNUCLEUS_HOST="genai.gnucleus.ai"
    GNUCLEUS_API_KEY=
    
    Enterprise User
    GNUCLEUS_HOST="genai.gnucleus.ai"
    GNUCLEUS_API_KEY=
    GNUCLEUS_ORG_ID=
    

Obtaining gNucleus API KEY

  1. gNucleus Account: sign-up on https://gnucleus.ai/
  2. API KEY: Create a personal access token in gNucleus:
  • Go to User Profile (click your user icon in the top right)
  • Go to "Account"
  • Click "Generate New API Key" to generate a new API KEY
  • Each account starts with 200 free API credits

Running the Server

Start the MCP server:

python main.py

You can test the MCP server using the inspector by running:

npx @modelcontextprotocol/inspector python3 main.py

Available MCP Tools

  • text_to_cad(input: str) - Generate CAD from input

Example Prompt with LLMs

When used with LLMs that support the MCP protocol, this server enables natural language interaction with gNucleus:\n\n### 1. Text to CAD

  • "draw a block in CAD"
  • "draw a block with length=80mm, width=40mm, height=20mm in CAD"
  • "draw a spur gear shaft in CAD"
  • "draw an elbow flange with number_bolt_holes=4 in CAD"

2. Text to Assembly

  • "generate a tapered roller bearing using text-to-cad tool"

3. Result CAD Display

The generated result includes the design spec with Key Parameter, Description and a shared URL with 3D display viewer. The shared URL will expire in 24 hrs.

Claude Desktop Setup# 1. Add or update the Claude Desktop configuration file(claude_desktop_config.json):\n\n### virtual python environment

If you use virtual python environment, use this config:

{
  "mcpServers": {
    "gnucleus": {
      "command": "/ABSOLUTE/PATH/TO/YOUR/text-to-cad-mcp/.venv/bin/python",
      "args": [
        "/ABSOLUTE/PATH/TO/YOUR/text-to-cad-mcp/main.py"
      ],
      "workingDirectory": "/ABSOLUTE/PATH/TO/YOUR/text-to-cad-mcp",
      "env": {
        "GNUCLEUS_HOST": "genai.gnucleus.ai",
        "GNUCLEUS_API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}
```\n\n### 2. Save the file and restart Claude Desktop
You should see the gNucleus Text-To-CAD tools in Claude.

## Troubleshooting# CAD Model
If the CAD model looks incorrect or only partially generated, try logging in at https://gnucleus.ai, enter the same prompt, and download the CAD file (e.g., FreeCAD format). Then open it in your CAD software (e.g., FreeCAD). This issue is often caused by incomplete generation of CAD features within the part. You can also report a bug or contact us with the model link and prompt at https://gnucleus.ai/contact.

## Security Considerations
- Secure your `.env` file and never commit it to github
- Run this server in a secure environment

Server Config

{
  "mcpServers": {
    "gnucleus-text-to-cad-server": {
      "command": "npx",
      "args": [
        "gnucleus-text-to-cad"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: No
Global: Yes
Official: Yes

Project Info

Hosted Featured
Created At: Jul 02, 2025
Updated At: Aug 07, 2025
Author: gNucleus Team
Category: official
License: MIT
Tags:
development location documentation