Getting started
This tutorial gets you from a clean checkout to an LLM client that can call CAD tools. Ten minutes, two paths: local stdio or a deployed HTTP endpoint.
Prerequisites
Section titled “Prerequisites”- uv installed
- A checkout of the mcdrafter repository
- An MCP client — the examples use the
claudeCLI
FreeCAD is not required for this tutorial. The six DXF analysis tools run on pure Python dependencies, which uv resolves automatically.
Path A: local stdio
Section titled “Path A: local stdio”The stdio transport is the simplest way to wire the server into Claude Code. The client spawns the server as a subprocess and talks JSON-RPC over stdin/stdout.
claude mcp add mcdrafter -- \ uv run --directory /path/to/mcp-drafter cad-mcp-server --transport stdioThat’s it. uv run resolves the environment from pyproject.toml on first launch, and the cad-mcp-server console script starts the FastMCP app.
Verify the connection:
claude mcp listThen, in a Claude session, ask something that forces a tool call:
Use mcdrafter’s list_supported_formats tool and summarize what this server can do.
You should get back the import/export format tables and the capability list.
Path B: a deployed HTTP endpoint
Section titled “Path B: a deployed HTTP endpoint”If the server is running somewhere (see Run with Docker), point your client at its HTTP transport. FastMCP serves the MCP endpoint at /mcp:
claude mcp add --transport http mcdrafter https://cad.example.com/mcpThe server runs HTTP with json_response=True and stateless_http=True, which matters more than it sounds: remote clients behind TLS-terminating reverse proxies get plain JSON responses with no SSE accept-header or session-ID requirements. If you’ve fought an MCP server that works locally but breaks behind Caddy or nginx, this is the fix.
Running the HTTP server directly for a quick test:
uv run cad-mcp-server --transport http --host 0.0.0.0 --port 8000First real call
Section titled “First real call”With either path connected, try a file. Any DXF will do — if you don’t have one handy, ask the agent to create one first with create_2d_geometry (FreeCAD tier) or grab any sample DXF:
Survey the layers in /path/to/site-plan.dxf and tell me which ones carry the most linework.
The agent should call survey_dxf_layers and come back with a busiest-first layer inventory. From there, the Investigate an unknown DXF tutorial walks the full reconnaissance workflow.
Where to next
Section titled “Where to next”- Investigate an unknown DXF — the survey → annotate → measure → render workflow
- Run with Docker — dev/prod containers, and enabling the FreeCAD tier
- Tool reference — all 19 tools with parameters and return shapes