gNucleus Text To CAD MCP server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
gNucleus is a Generative AI platform that transforms text and images into editable CAD models.
This repository contains the gNucleus Text-To-CAD MCP server, which connects to the gNucleus API. It allows MCP clients to generate CAD parts or assemblies from text input using gNucleus’s GenAI models.
Prerequisites
- Python 3.7+
- gNucleus Developer Accounts with:
- gNucleus API key
Setup
1. Clone this repository
2. Create and activate a virtual environment (recommended):
3. Install dependencies:
4. Create a .env file in the root directory with the following variables:
**Invidisual User**
**Enterprise User**
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 start with 200 free API credit
Running the Server
Start the MCP server:
You can test the MCP server using the inspector by running
Available MCP Tools
The following MCP tools are available:
- **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:
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 a spur gear shaft with number_teeth=20 in CAD"
- "draw an elbow flange in CAD"
- "draw an elbow flange with number_bolt_holes=4 in CAD"
i18n support: You can use any language as the prompt, in general english works better than other languages, but it should work in general.
- Chinese: "在CAD中绘制一个大小为10mm的方块"
- Spanish: "Dibuja un bloque cuadrado de 10 mm en CAD"
2. Text to Assembly
- "generate a tapered roller bearing using text-to-cad tool"
- "draw a differential gear box in CAD"
3. Result CAD Display
The generated result include the design spec with **Key Parameter**, **Description** and a shared URL with 3D display viewer. The shared URL will be expired in 24 hrs.
Claude Desktop Setup
1. Add or update the Claude Desktop configuration file(claude_desktop_config.json):
virtual python environment
If you use virtual python enviroment, use this config:
global python environment
If you use global python enviroment and also installed the requirments.txt into your global python enviroment, use this config
2. Save the file and restart Claude Desktop
You should see the gNucleus Text-To-CAD tools in Claude
3. Chat with Claude to generate the CAD model
Chat with Claude and add "in CAD" in each prompt or tell Claude to use "text-to-cad tools"can help Claude to trigger the Text-To-CAD tool better.
The generated result include the design spec with **Key Parameter**, **Description** and a shared link with 3D display viewer. The shared URL will be expired in 24 hrs. If Claude didn't output the shared URL in the chat message, you can ask Claude to always output the shared URL.