Skip to main content
Glama
PyNet Bridge

PyNet Bridge

by RAEN-DT

🐍 PyNet Platform Bridge (MCP)

PyNet Platform Bridge (MCP) は、AIモデルがAutodeskツールをリアルタイムで制御できるようにする実行レイヤーです。

自然言語 → Python → Autodeskデスクトップツール(Navisworks、Revit、AutoCAD)を接続し、AIがBIMワークフローを自律的に生成、実行、改善できるようにします。

Navisworks Manage、Revit、AutoCADとの統合が可能です。

このブリッジは、AIロジックとAutodeskデスクトップAPI間の結合組織として機能し、自然言語を使用した動的なUI作成、スクリプト実行、BIMプロセスの自動化を実現します。

🔄 仕組み

  1. ユーザーが自然言語でタスクを記述します。

  2. AIがPythonスクリプトを生成します。

  3. PyNet Bridgeがスクリプトを検証し、送信します。

  4. PyNetプラグインがAutodesk内でそれを実行します。

  5. 結果がAIに返されます。

これにより、AIは単なるチャットボットから、BIMのための実行エンジンへと進化します。


Related MCP server: A2A MCP Server

🚀 PyNet Bridgeの強力な機能

  • AI → アクション: AIが生成したコードをNavisworks/Revit内の実際のアクションに変換

  • リアルタイム実行: BIM環境を離れることなくスクリプトを即座に実行

  • 動的なUI作成: AIがツール、ボタン、ワークフローをその場で作成可能

  • 信頼性の高い通信: 高速で安定したローカルIPC

  • モデル認識型自動化: ライブBIMモデル上で直接動作


🛠️ インストール

✅ オプションA — 自動インストーラー(推奨)

PowerShellを開き、以下を実行します:

irm https://raw.githubusercontent.com/rafa2403nunez-droid/PyNetBridge/main/install.ps1 | iex

これにより、自動的に以下の処理が行われます:

  1. Python 3.10+がインストールされているか確認

  2. PyPIから pynet-mcp-bridge をインストール(uv または pip 経由)

  3. インストールされているすべてのAIクライアントを自動検出して設定:

    • Claude Desktop (標準版およびMicrosoft Store版)

    • Claude Code (VS Code拡張機能 / CLI)

    • Cline (VS Code拡張機能)

    • Roo Code (VS Code拡張機能)

pynet-mcp-bridge パッケージには以下が含まれます:

パッケージ

目的

pynet-mcp-bridge

AIモデルとAutodesk NavisworksをPyNET経由で接続するMCPサーバー

mcp[cli]

Model Context Protocol SDKおよびCLIツール

fastmcp

高レベルMCPサーバーフレームワーク

psutil

システムプロセス検出(実行中のAutodeskインスタンスを検索)

インストール後、変更を適用するためにAIクライアントを再起動してください。

📦 Pythonライブラリスターターパック(オプション)

PyNETを使用したNavisworks/Revitスクリプト作成用に、推奨されるPythonライブラリをインストールします:

irm https://raw.githubusercontent.com/rafa2403nunez-droid/PyNetBridge/main/install-libraries.ps1 | iex

以下がインストールされます:

ライブラリ

目的

pandas

データ分析および操作

plotly

インタラクティブなチャートと可視化

matplotlib

静的なプロットとグラフ

dash

PythonによるWebダッシュボード

これらは 許可されたPythonインポート にリストされているサードパーティライブラリです。標準ライブラリモジュール(json、sys、reなど)はPythonに既に含まれています。

前提条件

  • Navisworks/Revitに PyNet Platform プラグインがインストールされていること。

  • Python 3.10以上 → python.org

    ⚠️ Python 3.14はまだサポートされていません。 pythonnet ランタイムは現在Python 3.7から3.13までをサポートしています。サポートされていないABIバージョンに関する System.NotSupportedException が発生した場合は、Python 3.12または3.13をインストールし、PyNetがそれを使用するように設定してください。

  • uv → docs.astral.sh/uv

  • Git → git-scm.com — VS Code拡張機能(Claude Code、Cline、Roo Code)が正しく機能するために必要です。

  • Cline / Roo Codeの場合: VS Code → code.visualstudio.com


🔧 オプションB — 手動インストール

1. パッケージのインストール:

uv tool install pynet-mcp-bridge

またはpipを使用:

pip install pynet-mcp-bridge

2. Claude Desktopの設定:

claude_desktop_config.json に以下を追加します:

  • 標準: %APPDATA%\Claude\claude_desktop_config.json

  • Microsoft Store: %LOCALAPPDATA%\Packages\Claude_*\LocalCache\Roaming\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "pynet-bridge": {
      "command": "pynet-bridge",
      "args": []
    }
  }
}

3. Claude Code (VS Code拡張機能) の設定:

%USERPROFILE%\.claude.json に追加:

{
  "mcpServers": {
    "pynet-bridge": {
      "type": "stdio",
      "command": "pynet-bridge",
      "args": []
    }
  }
}

4. Clineの設定:

%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json に追加:

{
  "mcpServers": {
    "pynet-bridge": {
      "type": "stdio",
      "command": "pynet-bridge",
      "args": []
    }
  }
}

5. Roo Codeの設定:

%APPDATA%\Code\User\globalStorage\rooveterinaryinc.roo-cline\settings\mcp_settings.json に追加:

{
  "mcpServers": {
    "pynet-bridge": {
      "type": "stdio",
      "command": "pynet-bridge",
      "args": []
    }
  }
}

🛠️ 利用可能なMCPツール

これらのツールにより、AIはUI作成からスクリプト実行、システム監視まで、PyNet環境を完全に制御できます。 接続されると、AIはPyNetツールの全スイートにアクセスできるようになります:

🧠 AIに公開されるコア機能

🔍 システムと接続

  • list_active_instances: アクティブなPyNet接続を持つ実行中のAutodeskプロセスをシステムスキャンします。

  • check_plugin_status: プラグインリスナーが応答可能かを確認するハンドシェイクping。

🏗️ モジュール(タブ)管理

  • get_pynet_ui_layout: 完全なUI構造(ButtonsModulesおよびScriptButtons)を取得します。

  • create_pynet_module: リボン内に新しいカスタムタブ(ButtonsModule)を作成します。

  • delete_pynet_module: モジュールとそのすべてのコンテンツを完全に削除します。

🔘 ボタン管理

  • get_buttons_data: 特定のモジュールIDのすべてのスクリプトボタンをリストします。

  • deploy_script_button: 新しいScriptButtonを特定のモジュールにインストールします(名前、スクリプト、アイコン、ツールチップ)。

  • update_script_button: 既存のScriptButtonのメタデータを更新するか、別のモジュールに移動します。

  • delete_script_button: IDを使用してモジュールからScriptButtonを完全に削除します。

💻 実行とコンソール制御

  • send_command: PyNetエンジンでの直接スクリプト実行(ターゲットPID、スクリプト名、コンテンツ)。

  • get_output_window_status: 出力ウィンドウが現在利用可能/表示されているかを確認します。

  • configure_output_window: PyNetログ/出力ウィンドウの表示を切り替えます。


🛡️ 安全なAI実行

PyNet Bridgeには、AIが生成したすべてのスクリプトが実行前に安全かつ制御されていることを保証する検証レイヤーが組み込まれています。

✔ 安全でない操作を防止 ✔ 許可されていないシステムアクセスをブロック ✔ BIMモデルとの制御された対話を保証

AIの強力さは維持しつつ、安全な境界内で動作します。

v1.1.1以降、MCPサーバーには、Autodeskホストに到達する前にすべてのスクリプトを検証する静的アナライザーが組み込まれています。すべてのスクリプトはブリッジレベルで解析および検査され、拒否されたスクリプトはMCPサーバーから外に出ることはありません。

許可されたCLRアセンブリ

clr.AddReference を介して許可されるのは以下の.NET参照のみです:

  • 共通: System, System.Windows.Forms, System.Drawing, System.Collections.Generic

  • Navisworks: Autodesk.Navisworks.Api, .ComApi, .Interop.ComApi, .Clash

  • Revit: RevitAPI, RevitAPIUI

  • AutoCAD / Civil 3D: AcMgd, AcCoreMgd, AcDbMgd, AecBaseMgd, AecPropDataMgd, AeccDbMgd

  • PyNetプラグイン: Raen.Core.Pynet.*, Raen.{Product}.Pynet.* (任意のバージョン — 例: Raen.Core.Pynet.Resources, Raen.Navisworks.Pynet.2024, Raen.Civil3D.Pynet.2026)

許可されたPythonインポート

clr, sys, json, re, time, datetime, pathlib, typing, threading, collections, xml, pandas, plotly, matplotlib, dash, webbrowser, psutil, functools

許可されたPythonサブモジュール

一部のモジュールはサブモジュールレベルでのみ許可されており、危険な関連モジュールへのアクセスを防いでいます:

許可

ブロック

理由

http.server

http.client, http.cookiejar

ローカルHTTPサーバーを許可し、アウトバウンドリクエストをブロック

ブロックされたPythonインポート

os, subprocess, shutil, socket, ctypes, pickle, importlib, urllib, signal, multiprocessing, tempfile, glob, inspect, code, codeop

ブロックされた呼び出し

eval, exec, compile, __import__, getattr, setattr, delattr, globals, locals, vars, breakpoint, open

ブロックされた属性アクセス

__builtins__, __subclasses__, __globals__, __code__

これらのルールに違反するスクリプトは、プラグインに送信されることなく、説明的なエラーメッセージと共に即座に拒否されます。


📂 プロジェクト構造

  • pynet_mcp/: コアMCPサーバーロジック (FastMCP)。

  • pyproject.toml: パッケージ構成および依存関係管理。


📥 はじめに

自律的なBIMワークフローの構築を数分で開始しましょう。

ブリッジをインストールし、AIクライアントを接続して、自然言語をモデル内の実際のアクションに変換してください。


❓ よくある質問 (FAQs)

インストール、設定、使用方法について質問がありますか?完全なFAQページを確認してください:

👉 PyNet FAQs


🔗 このMCPのエコシステムにおける位置付け

このMCPは、Autodeskツール全体でAI主導のBIM自動化を実現するために設計されたモジュール式システムの一部です。

このリポジトリは以下と連携するように設計されています:

  • PyNet Platform → Python.NETを介してNavisworks、Revit、Civil 3D内でスクリプトを実行します。

  • PyNet Library → PythonスクリプトライブラリでAIにコンテキストを提供します。

これらのコンポーネントを組み合わせることで、以下が可能になります:

自然言語 → AI → Pythonスクリプト → PyNet → Autodesk → BIMアクション

コンポーネント

リポジトリ

目的

PyNet Platform

rafa2403nunez-droid/PyNet

Navisworks, Revit & Civil 3Dプラグイン — Python.NETエンジンをホスト

PyNet Bridge (MCP)

このリポジトリ

MCPサーバー - 安全なスクリプト検証を含め、AIモデルをPyNETに接続

PyNet Library

rafa2403nunez-droid/PyNetLibrary

スクリプト参照ライブラリおよびAIコンテキスト

📄 ライセンス

このプロジェクトはMITライセンスの下でライセンスされています。


Available Tools

24 tools
check_plugin_statusB
Read-only

Handshake ping to verify the plugin listener is responsive.

Inputs: pid (required). Returns: result

configure_output_windowC
Destructive

Toggles the visibility of the PyNet log/output window.

Inputs: pid (required), is_available (required). Returns: result

create_pynet_moduleC
Destructive

Creates a new custom Tab (ButtonsModule) in the Ribbon.

Inputs: pid (required), name (required). Returns: result

delete_pynet_moduleC
Destructive

Permanently deletes a module and all its contents.

Inputs: pid (required), module_id (required). Returns: result

delete_script_buttonB
Destructive

Permanently removes a ScriptButton from a module by Id.

Inputs: pid (required), button_id (required), module_id (required). Returns: result

deploy_script_buttonB
Destructive

Installs a new ScriptButton into a specific module (Name, Script, Icon, Tooltip).

Inputs: pid (required), name (required), module_id (required), script_Path (required), +2 more. Returns: result

get_buttons_dataA
Read-only

Lists all script buttons for a specific module ID.

Inputs: pid (required), module_id (required). Returns: result

get_output_window_statusB
Read-only

Checks if the output window is currently available/visible.

Inputs: pid (required). Returns: result

get_pynet_ui_layoutC
Read-only

Fetches the full UI structure (ButtonsModules and ScriptButtons).

Inputs: pid (required). Returns: result

list_active_instancesA
Read-only

Scans the system for running host processes (Autodesk, Rhino, AVEVA UE, PyNET for Tekla/Presto) with an active PyNet IPC pipe.

Inputs: no named parameters. Returns: result

send_commandB
Destructive

Direct script execution in the PyNet engine (Target PID, Script Name, Content).

Inputs: pid (required), content (required), timeout (required), script_name (required). Returns: result

send_command_by_pathA
Destructive

Executes a script file directly by path in the PyNet engine, without sending content inline.

Inputs: pid (required), timeout (required), file_path (required), script_name (required). Returns: result

update_script_buttonB
Destructive

Updates metadata for an existing ScriptButton or moves it to another module.

Inputs: pid (required), name (required), tooltip (required), button_id (required), +4 more. Returns: result

viewer_clearA
Read-only

Clears highlights and ghosting in the open viewer.

Inputs: no named parameters. Returns: result

viewer_fitA
Read-only

Fits the camera to all models in the open viewer.

Inputs: no named parameters. Returns: result

viewer_get_propertiesA
Read-only

Reads element properties (name, model, psets) from the loaded package's properties.json.

Pass one or more pnt_ids to get their full properties (including psets) directly.

Called with no pnt_ids, returns a paginated lightweight index (pnt_id, name, model) instead of every element — narrow it with model (exact model/discipline name, e.g. "Snowdon Towers Sample HVAC") and/or search (case-insensitive substring of the element name), and page through with limit/offset (default 200 per page, capped at 500). On a federated model the unfiltered index can have tens of thousands of entries — always pass model or search when you can, and use offset to page through the rest.

The data source is the .pnt's properties.json, NOT the viewer or IFC.

Inputs: limit, model, offset, search, +1 more. Returns: result

viewer_get_stateA
Read-only

Reads the viewer's last reported state: loaded models and the pnt_id of whatever the user currently has selected (click in the 3D view or the tree panel — null if nothing is selected). Use the returned pnt_id with viewer_get_properties for its details, or feed it into a clashes.json lookup to find what it clashes with.

Inputs: no named parameters. Returns: result

viewer_highlight_clashA
Destructive

Highlights a clash (element(s) A red, element(s) B green) and isolates the rest away.

Usually one pnt_id per side (a single clash pair), but either side accepts a list — e.g. one element (A) against every counterpart it clashes with (B), all shown at once.

Inputs: pnt_id_a, pnt_id_b. Returns: result

viewer_isolateA
Destructive

Isolates (hides everything except) the given pnt_ids in the open viewer.

Inputs: pnt_ids. Returns: result

viewer_isolate_modelsA
Destructive

Shows only the given model(s)/discipline(s) (by exact name, e.g. "Snowdon Towers Sample HVAC"), hiding every other loaded model. Cheaper than viewer_isolate for "just show me this discipline" requests — no need to resolve every element's pnt_id first. Get the exact model names from viewer_get_state's "models" list. Undo with viewer_clear.

Inputs: models. Returns: result

viewer_list_clashesA
Read-only

Reads the loaded package's clashes.json — the data source, NOT the viewer/IFC.

Returns each clash with the pnt_id identifiers needed to highlight it.

Inputs: no named parameters. Returns: result

viewer_load_packageB
Destructive

Loads a .pnt into the open viewer and returns a summary read from clashes.json.

Inputs: pnt_path (required). Returns: result

viewer_selectA
Destructive

Highlights a set of elements in the open viewer by pnt_id, in neutral colours (yellow / blue) with nothing else hidden — a plain "look at these" pointer.

Pass a list of pnt_ids in pnt_ids (group A). Optionally pass a second list in pnt_ids_b to highlight a second group in a distinct colour. Replaces any previous selection. Use viewer_list_clashes / viewer_get_properties to obtain pnt_ids. For a clash pair (red/green, with the rest of the model isolated away), use viewer_highlight_clash instead.

Inputs: pnt_ids, pnt_ids_b. Returns: result

viewer_statusA
Read-only

Reports whether a PyNet BIM Viewer is open in VS Code (port, package, data dir).

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 24 tools

    Disambiguation4/5

    The viewer tools have the most potential for confusion (select vs highlight_clash vs isolate vs isolate_models vs clear), but the descriptions explicitly cross-reference each other and state when to prefer one over another, which resolves most of it. A few boundaries remain soft — check_plugin_status vs list_active_instances vs viewer_status all report 'is something alive', and configure_output_window vs get_output_window_status are near-mirror pairs — but they are separable.

    Naming Consistency4/5

    Nearly everything follows verb_noun (get_, create_, delete_, update_, deploy_, list_, send_, configure_, check_), with a clean viewer_ namespace for the 3D side. Minor deviations: the ribbon/button noun is inconsistent ('buttons' in get_buttons_data vs 'script_button' in deploy/update/delete_script_button, and get_pynet_ui_layout is a noun-first outlier), and some tools carry a domain prefix while others do not.

    Tool Count3/5

    24 tools is on the heavy side, and the surface spans four separate concerns (viewer control, ribbon/module management, IPC process discovery, script execution). The count is defensible given the breadth of the PyNet bridge, but a few low-value entries (viewer_fit, get_output_window_status) could be folded into neighbours.

    Completeness4/5

    Script buttons have full CRUD (deploy/update/delete/get_buttons_data), the viewer has load/state/properties/select/isolate/highlight/clear/fit, and execution has both inline and by-path variants. The main gap is module lifecycle: create_pynet_module and delete_pynet_module exist but there is no update/rename/reorder module tool, and there is no way to unload a package or detach from a running instance.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers