freecad-mcp
MCP ServerFreeFreeCAD MCP(Model Context Protocol) server
Capabilities12 decomposed
mcp-to-freecad protocol bridging with xml-rpc tunneling
Medium confidenceImplements a three-tier architecture that translates Model Context Protocol (MCP) tool calls from AI clients into XML-RPC method invocations against a FreeCAD addon server running on localhost:9875. The FastMCP framework exposes FreeCAD operations as standardized MCP tools, while a singleton FreeCADConnection class manages the XML-RPC client connection with automatic reconnection and error handling. This decouples AI frameworks (Claude Desktop, LangChain, Google ADK) from FreeCAD's GUI thread, enabling safe asynchronous control.
Uses FastMCP framework with a dedicated FreeCADConnection singleton to abstract XML-RPC complexity, enabling multiple AI frameworks to control FreeCAD through standardized MCP protocol without modifying FreeCAD's core codebase — the addon runs as a separate workbench with thread-safe QTimer-based task queuing
Unlike direct FreeCAD Python API calls or REST wrappers, this approach maintains FreeCAD's GUI responsiveness by queuing operations through the Qt event loop while supporting multiple concurrent AI clients via MCP's standardized interface
parametric cad object creation with multi-workbench type support
Medium confidenceExposes a create_object MCP tool that instantiates FreeCAD objects across multiple workbenches (Part, PartDesign, Draft, Sketcher, Assembly, etc.) by accepting a type string and property dictionary. The RPC server's object creation logic maps type names to FreeCAD class constructors, sets properties via setattr, and returns serialized object metadata including UUID, label, and computed properties. Supports complex objects like PartDesign::Body with nested features and Draft objects with geometric constraints.
Abstracts FreeCAD's multi-workbench object model through a unified create_object interface that handles type-specific initialization, property serialization, and computed property calculation — enabling AI agents to reason about CAD objects without deep FreeCAD API knowledge
More flexible than FreeCAD's native Python API for AI use because it returns serialized object state immediately and handles workbench-specific initialization transparently, whereas direct API calls require knowledge of each workbench's object hierarchy
automatic freecad connection management with singleton pattern and reconnection logic
Medium confidenceImplements a FreeCADConnection singleton class that manages the XML-RPC client connection to the FreeCAD addon server. The singleton maintains a persistent connection, automatically reconnects on failure with exponential backoff, and provides a unified interface for all RPC calls. Connection state is cached to avoid repeated connection attempts. The MCP server instantiates this singleton once and reuses it for all tool invocations, ensuring connection pooling and efficient resource usage.
Uses a singleton pattern with automatic reconnection logic to abstract away XML-RPC connection complexity, allowing MCP tools to invoke FreeCAD operations without managing connection state — the connection is transparent to tool implementations
More resilient than naive RPC clients because it implements exponential backoff and automatic reconnection; more efficient than creating new connections per request because it reuses a single persistent connection
object serialization with computed property calculation and type-aware json encoding
Medium confidenceImplements object serialization logic in the RPC server that converts FreeCAD objects to JSON-compatible dictionaries. The serializer traverses object attributes, computes derived properties (e.g., bounding box, volume, mass), handles special types (lists, nested objects, geometry data), and encodes them as JSON. Computed properties are calculated on-demand and cached per object. The serializer handles type coercion for non-JSON types (e.g., converting vectors to tuples, colors to hex strings). Enables AI agents to reason about object state without understanding FreeCAD's internal object model.
Automatically calculates and includes computed properties (volume, mass, bounding box) in serialized objects, providing AI agents with derived metrics without requiring separate analysis steps — the RPC server handles all geometry calculations transparently
More informative than raw property dumps because it includes computed metrics; more efficient than requiring separate analysis calls because properties are calculated once during serialization
live cad viewport screenshot capture with viewpoint control
Medium confidenceImplements a get_view MCP tool that captures PNG screenshots of the FreeCAD 3D viewport from specified viewpoints (Isometric, Front, Top, Bottom, Left, Right, etc.) by invoking FreeCAD's camera positioning API and rendering the scene. Screenshots are base64-encoded and returned in the MCP response, enabling AI agents to receive visual feedback on model state without opening the FreeCAD GUI. The RPC server handles viewport rendering synchronously within the Qt event loop.
Bridges FreeCAD's native viewport rendering with MCP's JSON protocol by capturing and base64-encoding screenshots, allowing vision-capable AI models to inspect CAD geometry without requiring separate image file I/O or display server access
Unlike file-based screenshot approaches, this returns images directly in MCP responses, enabling stateless AI workflows without filesystem dependencies; unlike headless rendering, it leverages FreeCAD's native GPU-accelerated viewport
arbitrary python code execution within freecad's runtime context
Medium confidenceExposes an execute_code MCP tool that accepts arbitrary Python code strings and executes them within FreeCAD's Python interpreter, with access to the FreeCAD API (App, Gui modules) and the current document. Code execution happens synchronously in the RPC server's thread, with stdout/stderr captured and returned in the response. This enables AI agents to perform complex operations not exposed by dedicated MCP tools, such as custom geometry calculations, macro-like workflows, or debugging.
Provides direct Python code execution within FreeCAD's runtime via MCP, allowing AI agents to leverage FreeCAD's full Python API without being constrained to predefined tool schemas — trades safety for flexibility and expressiveness
More powerful than tool-based approaches because it enables one-shot execution of complex workflows, but less safe than sandboxed execution environments; positioned for trusted, internal AI automation rather than public-facing services
document and object state inspection with hierarchical querying
Medium confidenceImplements get_objects and get_object MCP tools that query FreeCAD document structure and return serialized object metadata including properties, computed values, and hierarchical relationships. The RPC server traverses the document's object tree, serializes each object's attributes to JSON, and handles special cases like sketches with geometry data and assemblies with part references. Enables AI agents to understand current CAD state without visual inspection.
Serializes FreeCAD's internal object graph to JSON with computed properties included, enabling AI agents to reason about CAD state without parsing binary FreeCAD files or maintaining separate state tracking — the RPC server handles all serialization complexity
More accessible than direct FreeCAD Python API introspection because it returns structured JSON; more complete than file-based approaches because it includes computed/derived properties and real-time state
object property mutation with type-aware validation
Medium confidenceExposes an edit_object MCP tool that modifies properties of existing FreeCAD objects by accepting an object ID and property dictionary, then using Python's setattr to apply changes. The RPC server validates property types against the object's class definition and returns updated object metadata. Supports both simple properties (dimensions, colors) and complex properties (lists, nested objects). Changes are immediately reflected in the FreeCAD document.
Provides direct property mutation through MCP without requiring knowledge of FreeCAD's property editor UI or Python API details — the RPC server handles type coercion and attribute setting transparently
Simpler than FreeCAD's native Python API for AI use because it accepts flat JSON property dictionaries; more flexible than GUI-based editing because it enables programmatic batch updates
object deletion with cascading dependency handling
Medium confidenceImplements a delete_object MCP tool that removes objects from the FreeCAD document by ID. The RPC server invokes FreeCAD's object removal API, which handles cascading deletion of dependent features (e.g., removing a sketch deletes constraints and geometry). Returns success/failure status and updated document state. Enables AI agents to clean up intermediate objects or reset design iterations.
Abstracts FreeCAD's cascading deletion logic through a simple MCP tool, handling dependency resolution transparently so AI agents can safely remove objects without understanding FreeCAD's internal object graph
Safer than direct Python API deletion because the RPC server validates object existence before deletion; simpler than GUI-based deletion because it's programmatic and doesn't require user interaction
multi-document lifecycle management with creation and enumeration
Medium confidenceExposes create_document and list_documents MCP tools that manage FreeCAD document lifecycle. create_document instantiates a new FreeCAD document with optional name and returns its ID; list_documents enumerates all open documents with metadata. The RPC server maintains document references and handles FreeCAD's document manager API. Enables AI agents to organize work across multiple design files.
Provides document-level abstraction through MCP, allowing AI agents to manage multiple design contexts without understanding FreeCAD's document manager internals or file I/O
Simpler than file-based document management because documents are created in-memory; more flexible than single-document workflows because it enables parallel design exploration
pre-built parts library insertion with metadata discovery
Medium confidenceImplements insert_part_from_library and get_parts_list MCP tools that provide access to FreeCAD's parts library (or custom libraries). get_parts_list enumerates available parts with metadata (name, category, description, thumbnail); insert_part_from_library instantiates a part into the current document by name or ID. The RPC server queries the library index and handles part instantiation, returning the created object's metadata. Enables AI agents to compose designs from pre-built components.
Bridges FreeCAD's parts library with MCP by providing discovery and insertion tools, enabling AI agents to reason about available components and compose designs without manual library browsing
More discoverable than file-based part management because it returns structured metadata; more efficient than creating parts from scratch because it reuses pre-validated designs
thread-safe gui operation queuing with qt event loop integration
Medium confidenceImplements a thread-safe request queue (rpc_request_queue) in the FreeCAD addon that serializes all RPC operations through FreeCAD's Qt event loop via QTimer callbacks. The RPC server runs in a separate thread from FreeCAD's GUI, so all operations that touch the document or viewport are queued and processed synchronously by the Qt main thread via process_gui_tasks() callback. This prevents race conditions and GUI crashes from concurrent access. The queue uses Python's thread-safe Queue class and processes tasks in FIFO order.
Uses Qt's QTimer-based task processing to serialize all FreeCAD operations through the GUI thread, eliminating race conditions without requiring explicit locking — a pattern specific to Qt applications that separates network I/O (RPC thread) from GUI updates (Qt main thread)
More robust than naive threading because it leverages Qt's event loop instead of manual locks; more responsive than blocking all RPC calls because it queues operations asynchronously rather than synchronously waiting for GUI updates
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with freecad-mcp, ranked by overlap. Discovered automatically through the match graph.
@mcp-ui/client
mcp-ui Client SDK
MCP-Bridge
** 🐍 an openAI middleware proxy to use mcp in any existing openAI compatible client
OpenMCP Client
** - An all-in-one vscode/trae/cursor plugin for MCP server debugging. [Document](https://kirigaya.cn/openmcp/) & [OpenMCP SDK](https://kirigaya.cn/openmcp/sdk-tutorial/).
@modelcontextprotocol/sdk
Model Context Protocol implementation for TypeScript
@maz-ui/mcp
Maz-UI ModelContextProtocol Client
KiCAD-MCP-Server
KiCAD MCP is a Model Context Protocol (MCP) implementation that enables Large Language Models (LLMs) like Claude to directly interact with KiCAD for printed circuit board design.
Best For
- ✓AI/ML engineers building autonomous design agents
- ✓Teams integrating FreeCAD into LLM-powered CAD workflows
- ✓Developers extending Claude Desktop with CAD capabilities
- ✓Generative design systems using AI to explore design spaces
- ✓Automated part library generators
- ✓AI-assisted CAD for non-expert users
- ✓Long-running AI workflows that issue many sequential FreeCAD commands
- ✓Resilient systems that must tolerate FreeCAD restarts or temporary unavailability
Known Limitations
- ⚠XML-RPC communication adds ~50-200ms latency per tool call depending on network conditions
- ⚠Single-threaded RPC server in FreeCAD addon processes requests sequentially via QTimer callback queue
- ⚠No built-in authentication or encryption for localhost RPC channel
- ⚠Requires FreeCAD addon to be manually installed and running before MCP server starts
- ⚠Limited to object types explicitly supported in the RPC server's type registry — custom workbench objects require code modification
- ⚠Property validation happens post-creation; invalid parameters may create malformed objects
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
Repository Details
Last commit: Apr 12, 2026
About
FreeCAD MCP(Model Context Protocol) server
Categories
Alternatives to freecad-mcp
Are you the builder of freecad-mcp?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →