Skip to main content
Glama

MCP Server for CAD - LLM-driven 3D Geometry Manipulation

A local-first, open-source MVP of an MCP (Model Context Protocol) type server that uses a cloud LLM (via Groq's free API running Llama 3.3) to translate natural language user commands into structured geometric operations for a simulated CAD engine.

Prerequisites

  1. Python 3.9+

  2. A free Groq API key — get one at https://console.groq.com/keys

Related MCP server: Fusion MCP

Setup

  1. Install the project dependencies:

    cd mcp-cad-server
    pip3 install -r requirements.txt
  2. Start the FastAPI backend server with your Groq key:

    export GROQ_API_KEY='your-groq-api-key-here'
    python3 -m uvicorn app.main:app --reload

    The server runs by default on http://localhost:8000.

Architecture

  • Groq Cloud API: Free LLM inference using Llama 3.3 70B.

  • FastAPI / MCP Server: Orchestrates receiving user prompts, formatting them for the LLM, securely parsing the JSON output, and delegating instructions.

  • Mock CAD Engine: Simulated geometry state handling dimensions and volumetric output based on structured commands.

Testing via CLI

You can easily interact with the running CAD Server through test_cli.py:

python3 test_cli.py "Increase hole diameter by 5mm"

Expected JSON response:

{
  "status": "success",
  "message": "Successfully modified hole to 5.0mm.",
  "data": {
    "feature": "hole",
    "new_value": 5.0,
    "unit": "mm"
  }
}

More examples:

python3 test_cli.py "Create a sphere"
python3 test_cli.py "Extrude the top face by 50mm"
python3 test_cli.py "What is the volume?"

Supported Mock CAD Functions

  • create_shape (shape_type, dimensions) — Generates box, sphere, cylinder, cone, or torus

  • modify_dimension (feature, value, unit)

  • extrude (face, distance, unit)

  • get_volume (unit)

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables Cline to translate natural language prompts into Fusion 360 CAD operations by mapping commands to Fusion's API and generating executable Python scripts.
    82
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to control CAD software like AutoCAD, GstarCAD, and ZWCAD through natural language instructions via the Model Context Protocol. It supports automated drawing of shapes, layer management, and saving designs to DWG files without manual interface interaction.
    2
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI (e.g., Claude) to control SolidWorks via natural language, automating part creation, sketching, and feature operations through the Model Context Protocol.
    1
    MIT

Appeared in Searches