Enables interaction with FreeCAD CAD software through a standardized interface, offering tools for 3D model creation, manipulation, measurement, and export. Includes specialized smithery tools for blacksmithing designs, primitive shape generation, boolean operations, and model transformation capabilities.
🛠️ MCP-FreeCAD Integration
Status: Active Development - Clean, organized codebase with multiple connection methods and comprehensive tool providers.
This project provides a robust integration between AI assistants and FreeCAD CAD software using the Model Context Protocol (MCP). It allows external applications to interact with FreeCAD through a standardized interface, offering multiple connection methods and specialized tools.
🤖 AI Provider Models (2025)
The MCP-FreeCAD integration supports multiple AI providers with the latest 2025 models. Choose the right model for your specific use case:
OpenAI Models
Production Models:
- gpt-4o - Default multimodal model (text, image, audio)
- Context: 128K tokens
- Pricing: ~$5 per 1M input tokens
- Best for: General CAD tasks, multimodal interactions
- gpt-4.1 - Next-generation with 1M token context
- Features: Text, Image, Audio, Video support
- Pricing: ~$2.5 per 1M input tokens
- Best for: Complex CAD projects, large document analysis
- gpt-4-turbo - Fast, cost-effective
- Context: 128K tokens
- Best for: High-volume operations, batch processing
Reasoning Models:
- o3 - Advanced reasoning for complex CAD logic
- Pricing: ~$10 per 1M input tokens
- Best for: Complex geometry calculations, design optimization
- o4-mini / o4-mini-high - Cost-effective reasoning
- Pricing: ~$0.15 per 1M input tokens
- Best for: Simple calculations, quick iterations
Anthropic Claude Models
Claude 4 Series (2025):
- claude-opus-4 - Most advanced model
- Max Context: 200K tokens
- Pricing: $15/$75 per million tokens (input/output)
- Features: Extended thinking, tool use, memory handling
- Best for: Complex CAD workflows, autonomous design tasks
- claude-sonnet-4 - Balanced efficiency
- Max Context: 200K tokens
- Pricing: $3/$15 per million tokens
- Features: Superior coding, hybrid reasoning
- Best for: General CAD operations, scripting assistance
- claude-haiku-3.5 - Fast, lightweight
- Best for: Quick queries, simple operations
Google AI Models
Gemini 2.5 Series (Latest):
- gemini-2.5-pro-preview-05-06 - Most advanced
- Context: 1M tokens
- Features: Enhanced reasoning, thinking mode
- Best for: Complex CAD analysis, large assemblies
- gemini-2.5-flash-preview-04-17 - Performance optimized
- Features: Adaptive thinking, cost-effective
- Best for: Balanced performance and cost
Gemini 2.0 Series (Stable):
- gemini-2.0-flash-001 - Production ready
- Features: 2x faster than Gemini 1.5 Pro
- Best for: Real-time CAD assistance
- gemini-2.0-flash-lite - Cost-optimized
- Best for: High-volume, simple operations
OpenRouter (Unified Access)
OpenRouter provides access to all models through a single API:
Model Format: provider/model-name
Popular Models:
anthropic/claude-sonnet-4
- Recommended general useopenai/gpt-4o
- OpenAI's flagshipgoogle/gemini-2.5-pro-preview
- Google's latest
Free Models (50-1000 requests/day):
deepseek/deepseek-r1
- Advanced reasoningdeepseek/deepseek-v3
- General purposegoogle/gemini-2.5-flash-preview
- Google free tier
Model Selection Guide
Use Case | Recommended Model | Alternative |
---|---|---|
General CAD Work | claude-sonnet-4 | gpt-4o , gemini-2.0-flash-001 |
Complex Reasoning | claude-opus-4 | o3 , gemini-2.5-pro-preview-05-06 |
Multimodal Tasks | gpt-4o | gpt-4.1 , claude-opus-4 |
Cost-Effective | o4-mini | claude-haiku-3.5 , gemini-2.0-flash-lite |
High Volume | gpt-4-turbo | claude-sonnet-4 , gemini-2.0-flash-001 |
Free Usage | deepseek/deepseek-r1 | google/gemini-2.5-flash-preview |
Configuration Example
API Usage Examples
🚀 Quick Start
Option 1: FreeCAD Addon (Recommended for Users)
For the best user experience with GUI integration:
📦 FreeCAD MCP Integration Addon
- 🧠 Claude 4 with Thinking Mode - Advanced AI reasoning
- 🤖 Multi-Provider Support - Claude, Gemini, OpenRouter with 13+ models
- 🎨 Modern GUI - Professional tabbed interface
- 🔗 Universal Connections - All MCP connection methods
- 📊 Performance Monitoring - Real-time diagnostics
Option 2: MCP Server (For Developers/Integration)
🏗️ Architecture Overview
Core Components
Connection Methods
The system supports multiple ways to connect to FreeCAD:
- 🚀 Launcher (Recommended) - Uses AppImage with AppRun
- 🔌 Server - Socket-based connection to FreeCAD server
- 🌉 Bridge - CLI-based connection using FreeCAD executable
- 📡 RPC - XML-RPC connection to FreeCAD
- 📦 Wrapper - Subprocess wrapper connection
- 🎭 Mock - For testing without FreeCAD
🛠️ Available Tools
Primitive Creation
create_box
- Create box primitivescreate_cylinder
- Create cylinderscreate_sphere
- Create spherescreate_cone
- Create cones
Model Manipulation
transform
- Move, rotate objectsboolean_operation
- Union, difference, intersectionfillet_edge
- Round edgeschamfer_edge
- Chamfer edgesmirror
- Mirror objects across planesscale
- Scale objects uniformly or non-uniformly
Document Management
create_document
- Create new documentslist_documents
- List open documentslist_objects
- List objects in documents
Export/Import
export_stl
- Export to STL format- Additional formats coming soon
📋 Usage Examples
Python API
Tool Provider Usage
MCP Server Integration
⚙️ Configuration
Basic Configuration (config.json
)
Connection Method Configuration
🔧 Development
Project Structure
src/mcp_freecad/
- Main packagefreecad-ai/
- FreeCAD GUI addontests/
- Test suitedocs/
- Documentationscripts/
- Setup and utility scripts
Adding New Tools
- Create a new tool provider in
src/mcp_freecad/tools/
- Inherit from
ToolProvider
base class - Implement required methods (
tool_schema
,execute_tool
) - Register in
TOOL_PROVIDERS
in__init__.py
Testing
🐳 Docker Support
📚 Documentation
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- FreeCAD development team for the excellent CAD software
- Anthropic for the Model Context Protocol (MCP) framework
- Contributors and community members
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
This project provides a robust integration between AI assistants and FreeCAD CAD software using the Model Context Protocol (MCP). It allows external applications to interact with FreeCAD through a standardized interface, offering multiple connection methods and specialized tools.
- Quick Start (Recommended: AppImage + Launcher)
- Docker Support
- 🔄 MCP Flow Chart
- 🔄 Core Components
- 1. FreeCAD MCP Server (freecad_mcp_server.py)
- 2. FreeCAD Connection (src/mcp_freecad/freecad_connection_manager.py)
- 3. FreeCAD Launcher (freecad_connection_launcher.py)
- 4. FreeCAD Wrapper (freecad_connection_wrapper.py) & Subprocess (freecad_subprocess.py)
- 5. FreeCAD Server (freecad_socket_server.py)
- 6. FreeCAD Bridge (freecad_connection_bridge.py)
- 7. FreeCAD Client (freecad_client.py)
- 🔄 Project Structure
- ⚙️ Installation & Setup Details
- 🚀 Using the MCP Server
- 🛠️ Available MCP Tools
- 📝 Example MCP Interactions
- 🔍 Troubleshooting
- 📄 License
- 🖥️ Cursor Integration
- 📋 Available Options and Use Cases
- Features
- Prerequisites
- Available Tools
- Testing
- Documentation
- Contributing
- Acknowledgments
Related MCP Servers
- AsecurityAlicenseAqualityConnects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender for AI-assisted 3D modeling, scene manipulation, and rendering.Last updated -1713,041MIT License
- -securityAlicense-qualityA FreeCAD addon that implements the Model Context Protocol (MCP) to enable communication between FreeCAD and Claude AI through Claude Desktop.Last updated -89MIT License
- AsecurityAlicenseAqualityAllows AI to interact with Autodesk Revit via the MCP protocol, enabling retrieval of project data and automation of tasks like creating, modifying, and deleting elements.Last updated -13109MIT License
- AsecurityAlicenseAqualityAllows AI assistants to interact with Autodesk Revit through the MCP protocol, enabling the AI to create, modify, and delete elements in Revit projects.Last updated -15321MIT License