
bonninr/freecad_mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
bonninr/freecad_mcp — это кандидат-сервер MCP, импортированный из https://github.com/bonninr/freecad_mcp.
Обзор
bonninr/freecad_mcp — это кандидат-сервер MCP, импортированный из https://github.com/bonninr/freecad_mcp.
Обзор (машинный перевод)
Обзор
FreeCAD MCP (Model Control Protocol) предоставляет упрощённый интерфейс для взаимодействия с FreeCAD через архитектуру сервер-клиент. Это позволяет пользователям выполнять команды и получать информацию о текущем документе и сцене FreeCAD.
https://github.com/user-attachments/assets/5acafa17-4b5b-4fef-9f6c-617e85357d44
Конфигурация
Для настройки MCP-сервера можно использовать JSON-формат для указания настроек сервера. Ниже приведён пример конфигурации:
Детали конфигурации
-
command: путь к исполняемому файлу на Python, который будет запускать сервер FreeCAD MCP. Это может варьироваться в зависимости от вашей операционной системы:
-
Windows: Обычно это может выглядеть как
C:\\ProgramData\\anaconda3\\python.exeилиC:\\Python39\\python.exe. -
Linux: Это может быть
/usr/bin/python3или путь к вашей установке на Python. -
macOS: Обычно это будет
/usr/local/bin/python3или путь к вашей установке на Python. -
args: Массив аргументов для передачи команде Python. Первым аргументом должен быть путь к скрипту
freecad_bridge.py, который отвечает за обработку логики сервера MCP.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
FreeCAD MCP (Model Control Protocol)
Overview
The FreeCAD MCP (Model Control Protocol) provides a simplified interface for interacting with FreeCAD through a server-client architecture. This allows users to execute commands and retrieve information about the current FreeCAD document and scene.
https://github.com/user-attachments/assets/5acafa17-4b5b-4fef-9f6c-617e85357d44
Configuration
To configure the MCP server, you can use a JSON format to specify the server settings. Below is an example configuration:
{
"mcpServers": {
"freecad": {
"command": "C:\\ProgramData\\anaconda3\\python.exe",
"args": [
"C:\\Users\\USER\\AppData\\Roaming\\FreeCAD\\Mod\\freecad_mcp\\src\\freecad_bridge.py"
]
}
}
}
Configuration Details
-
command: The path to the Python executable that will run the FreeCAD MCP server. This can vary based on your operating system:
- Windows: Typically, it might look like
C:\\ProgramData\\anaconda3\\python.exeorC:\\Python39\\python.exe. - Linux: It could be
/usr/bin/python3or the path to your Python installation. - macOS: Usually, it would be
/usr/local/bin/python3or the path to your Python installation.
- Windows: Typically, it might look like
-
args: An array of arguments to pass to the Python command. The first argument should be the path to the
freecad_bridge.pyscript, which is responsible for handling the MCP server logic. Make sure to adjust the path according to your installation.
Example for Different Operating Systems
Windows
{
"mcpServers": {
"freecad": {
"command": "C:\\ProgramData\\anaconda3\\python.exe",
"args": [
"C:\\Users\\USER\\AppData\\Roaming\\FreeCAD\\Mod\\freecad_mcp\\src\\freecad_bridge.py"
]
}
}
}
Linux
{
"mcpServers": {
"freecad": {
"command": "/usr/bin/python3",
"args": [
"/home/USER/.FreeCAD/Mod/freecad_mcp/src/freecad_bridge.py"
]
}
}
}
macOS
{
"mcpServers": {
"freecad": {
"command": "/usr/local/bin/python3",
"args": [
"/Users/USER/Library/Preferences/FreeCAD/Mod/freecad_mcp/src/freecad_bridge.py"
]
}
}
}
Features
The FreeCAD MCP currently supports the following functionalities:
1. get_scene_info
- Description: Retrieves comprehensive information about the current FreeCAD document, including:
- Document properties (name, label, filename, object count)
- Detailed object information (type, position, rotation, shape properties)
- Sketch data (geometry, constraints)
- View information (camera position, direction, etc.)
2. run_script
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"freecad": {
"command": "C:\\ProgramData\\anaconda3\\python.exe",
"args": [
"C:\\Users\\USER\\AppData\\Roaming\\FreeCAD\\Mod\\freecad_mcp\\src\\freecad_bridge.py"
]
}
}
}