SketchupMCP - Sketchup モデルコンテキストプロトコルの統合
SketchupMCPは、Model Context Protocol(MCP)を介してSketchupをClaude AIに接続し、ClaudeがSketchupを直接操作できるようにします。この統合により、Sketchupでプロンプト支援による3Dモデリング、シーン作成、操作が可能になります。
インスピレーションと構造を提供してくれたBlender MCPに大感謝です。
特徴
- 双方向通信: TCPソケット接続を介してClaude AIをSketchupに接続します
- コンポーネント操作: Sketchup でコンポーネントを作成、変更、削除、変換します
- マテリアルコントロール: マテリアルと色を適用および変更します
- シーン検査: 現在の Sketchup シーンの詳細情報を取得します
- 選択処理: 選択されたコンポーネントを取得して操作する
- Ruby コードの評価: 高度な操作のために SketchUp で任意の Ruby コードを直接実行します
コンポーネント
このシステムは、次の 2 つの主要コンポーネントで構成されています。
- Sketchup 拡張機能: Sketchup 内に TCP サーバーを作成し、コマンドを受信して実行する Sketchup 拡張機能
- MCP サーバー (
sketchup_mcp/server.py
) : モデルコンテキストプロトコルを実装し、Sketchup 拡張機能に接続する Python サーバー
インストール
Python パッケージング
uv を使用するので、 brew install uv
実行する必要があります。
スケッチアップ拡張機能
- 最新の
.rbz
ファイルをダウンロードまたはビルドします - Sketchupで、「ウィンドウ」>「拡張機能マネージャ」に移動します。
- 「拡張機能をインストール」をクリックし、ダウンロードした
.rbz
ファイルを選択します。 - SketchUpを再起動する
使用法
接続の開始
- Sketchupで、拡張機能 > SketchupMCP > サーバーを起動に移動します。
- サーバーはデフォルトのポート(9876)で起動します。
- ターミナルでMCPサーバーが実行中であることを確認してください
クロードと一緒に使う
Claude 構成に以下を追加して、Claude が MCP サーバーを使用するよう構成します。
これはPyPIから最新のものを取得します
接続すると、Claude は次の機能を使用して Sketchup を操作できるようになります。
ツール
get_scene_info
- 現在のSketchupシーンに関する情報を取得しますget_selected_components
- 現在選択されているコンポーネントに関する情報を取得しますcreate_component
- 指定されたパラメータで新しいコンポーネントを作成するdelete_component
- シーンからコンポーネントを削除しますtransform_component
- コンポーネントを移動、回転、または拡大縮小するset_material
- コンポーネントにマテリアルを適用するexport_scene
- 現在のシーンをさまざまな形式でエクスポートしますeval_ruby
- SketchUp で任意の Ruby コードを実行して高度な操作を実行します
コマンド例
クロードに依頼できる作業の例をいくつか示します。
- 「屋根と窓のあるシンプルな家のモデルを作成する」
- 「すべてのコンポーネントを選択して情報を取得する」
- 「選択したコンポーネントを赤にする」
- 「選択したコンポーネントを10単位上に移動する」
- 「現在のシーンを3Dモデルとしてエクスポートする」
- 「Ruby コードを使用して複雑なアート クラフト キャビネットを作成する」
トラブルシューティング
- 接続の問題: Sketchup拡張機能サーバーとMCPサーバーの両方が実行中であることを確認してください
- コマンドの失敗: Sketchup の Ruby コンソールでエラー メッセージを確認してください
- タイムアウトエラー: リクエストを簡素化するか、小さなステップに分割してみてください
技術的な詳細
通信プロトコル
システムは TCP ソケット上でシンプルな JSON ベースのプロトコルを使用します。
- コマンドは、
type
とオプションのparams
を持つJSONオブジェクトとして送信されます。 - レスポンスは
status
とresult
またはmessage
を持つJSONオブジェクトです
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
ライセンス
マサチューセッツ工科大学
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
モデル コンテキスト プロトコルを介して Sketchup を Claude AI に接続し、Claude が Sketchup を直接操作して制御し、プロンプト支援による 3D モデリングとシーン操作を実行できるようにします。
Related Resources
Related MCP Servers
- -securityAlicense-qualityConnects 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 -11,716PythonMIT License
- -securityFlicense-qualityConnects Houdini to Claude AI through Model Context Protocol, enabling AI-assisted 3D modeling, scene creation, simulation setup, and rendering through natural language commands.Last updated -37
- -securityFlicense-qualityAllows interaction with Sketchfab's 3D model platform through Claude or Cursor, enabling users to search, view details, and download 3D models directly from the AI interface.Last updated -1314JavaScript
- AsecurityAlicenseAqualityIntegration that connects Sketchup to Claude AI through the Model Context Protocol, allowing Claude to directly interact with and control Sketchup for prompt-assisted 3D modeling, scene creation, and manipulation.Last updated -104MIT License