Screenshot_20260909_223623.png
How to let your AI draw in FreeCAD for you, with OpenCode
Turns out, even technical drawing is doable the lazy way.
Here is a straightforward way to get your FreeCAD automated via AI. Everything you hated about doing stuff manually in FreeCAD is minutes away from becoming a fading memory — all thanks to a new FreeCAD workbench and MCP.
Requisites
- You have OpenCode installed and working.
- You have it configured with a relatively smart model (for 2026) that is vision-capable.
- You can use local models via Ollama (I do this), or paid commercial ones.
- Your computer has Git and FreeCAD installed.
- This tutorial focuses on the Flatpak version of FreeCAD (version 1.1), to be specific.
- Python on your system has the
venvmodule.- This is the default in at least Python 3.14 and above.
- You are not afraid of the command line.
Be advised that these instructions will almost certainly work only on Linux. Don't follow these instructions as root!
Steps
Make sure your OpenCode model has vision enabled. In the opencode.json configuration, check for:
# ...
"models": {
"qwen3.8:27b-mtp-q8_0": {
"name": "qwen3.8:27b-mtp-q8_0",
"modalities": {
"input": ["text", "image"]
}
# ...
You may also want to check that vision actually works. You can figure it out, I am sure.
Get the FreeCAD MCP code. Clone the https://github.com/neka-nat/freecad-mcp repository:
cd ~/Projects # assuming you have a Projects folder in your home directory.
git clone https://github.com/neka-nat/freecad-mcp
cd freecad-mcp
Install the FreeCAD workbench for MCP. You'll create a symbolic link to let FreeCAD read the MCP addon files:
mkdir -p ~/.var/app/org.freecad.FreeCAD/data/FreeCAD/v1-1/Mod/
ln -sf "$PWD"FreeCADMCP/ ~/.var/app/org.freecad.FreeCAD/data/FreeCAD/v1-1/Mod/
Install the FreeCAD Python client. This will leave you with a new folder that contains the installation
cd ..
python3 -m venv venv
venv/bin/pip3 install .
# ls -la venv/bin/freecad-mcp should show you an executable
Configure OpenCode to use the MCP. This enables the AI to connect to FreeCAD. To your OpenCode opencode.json file, add this to the top level:
"mcp": {
"freecad": {
"enabled": true,
"type": "local",
"command": ["/home/user/Projects/freecad-mcp/venv/bin/freecad-mcp"]
}
}
That tells OpenCode that, to connect to the freecad MCP, it has to go through the command freecad-mcp in that directory where you installed the package with pip install. Please do keep in mind to properly format your JSON — hopefully your favorite text editor will help with that.
Stop any running OpenCode (via the Web or on a terminal, your call).
Now launch FreeCAD, switch to the MCP workbench, and click Start RPC server on the toolbar that appears below the workbenches dropdown (which should say MCP Addon now). FreeCAD is ready to rock!

Launch OpenCode, then open a new session (probably pick an empty folder) and type the following:
Create a new FreeCAD document, then add a box 10cm by 10cm by 10cm in size.
Watch the magic happen, and thank me later!