BF

bonninr/freecad_mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

228 stars 35 forks 品質 55 トレンド 18MIT

bonninr/freecad_mcpは、https://github.com/bonninr/freecad_mcp.からインポートされたMCPサーバー候補です。

概要

bonninr/freecad_mcpは、https://github.com/bonninr/freecad_mcp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

概要

FreeCAD MCP(モデル制御プロトコル)は、サーバークライアントアーキテクチャを通じてFreeCADとやり取りするための簡易インターフェースを提供します。これにより、ユーザーはコマンドを実行し、現在のFreeCADドキュメントやシーンに関する情報を取得することができます。

https://github.com/user-attachments/assets/5acafa17-4b5b-4fef-9f6c-617e85357d44

構成

MCPサーバーの設定には、JSON形式を使ってサーバー設定を指定することができます。以下はその構成例です:

構成詳細

  • command:FreeCAD MCPサーバーを実行するPython実行ファイルへのパス。これはOSによって異なる場合があります:

  • Windows: 通常、C:\\ProgramData\\anaconda3\\python.exeやC:\\Python39\\python.exeのように見えることがあります。

  • Linux:/usr/bin/python3か、Pythonインストールへのパスかもしれません。

  • macOS: 通常は/usr/local/bin/python3またはPythonインストールへのパスです。

  • args:Pythonコマンドに渡す引数の配列。最初の引数はMCPサーバーロジックを処理するfreecad_bridge.pyスクリプトへのパスであるべきです。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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.exe or C:\\Python39\\python.exe.
    • Linux: It could be /usr/bin/python3 or the path to your Python installation.
    • macOS: Usually, it would be /usr/local/bin/python3 or the path to your Python installation.
  • args: An array of arguments to pass to the Python command. The first argument should be the path to the freecad_bridge.py script, 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

GitHub で README 全文を見る

インストール

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" ] } } }