Sweet Home 3D MCP Serverのロゴ

Sweet Home 3D MCP Server

コミュニティ
grimashevich

Sweet Home 3D plugin that embeds an MCP server — lets Claude control Sweet Home 3D over HTTP

公開者grimashevich
リポジトリsweethome3d-mcp-server
言語Java
フォーク
14
スター
49
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスGPL-2.0
リンク
  • ツールをAIワークフローに接続

    Sweet Home 3D MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには49件のスターと14件のフォークがあります。

Sweet Home 3D MCP Plugin

License: GPL v2 Java 11+ Sweet Home 3D 6.0+

A plugin for Sweet Home 3D that embeds an MCP (Model Context Protocol) server directly inside the application. Lets Claude and other AI assistants control Sweet Home 3D over HTTP — create walls, place furniture, render photos, and more — without any external proxy or separate server process.

Claude Desktop / Claude Code
         │  HTTP (JSON-RPC 2.0)
         ▼
┌─────────────────────────────────────┐
│  Sweet Home 3D  +  MCP Plugin       │
│  Built-in HTTP server on port 9877  │
│  http://127.0.0.1:9877/mcp         │
└─────────────────────────────────────┘

Screenshots

3D scene created via MCP

MCP Server Settings dialog

Requirements

RequirementVersion
Sweet Home 3D6.0 or newer
Java (bundled with SH3D or system)11 or newer

Note: Sweet Home 3D ships with a bundled JRE. Make sure it is Java 11+. Very old SH3D builds (32-bit Windows installer with JRE 1.8) will silently fail to load the plugin due to UnsupportedClassVersionError.

Installation

Step 1. Download the latest .sh3p file from Releases.

Step 2. Copy it to your Sweet Home 3D plugins folder:

OSPlugins folder
Windows%APPDATA%\eTeks\Sweet Home 3D\plugins\
macOS~/Library/Application Support/eTeks/Sweet Home 3D/plugins/
Linux~/.sweethome3d/plugins/

Step 3. (Re)start Sweet Home 3D. The MCP server starts automatically on port 9877.

You can verify it is running: Tools → MCP Server... shows the server status.

Troubleshooting

macOS: the MCP server won't start (cannot open port)

The Mac App Store build of Sweet Home 3D is sandboxed and ships without the com.apple.security.network.server entitlement, so it is not allowed to open a listening socket. Because the plugin listens on port 9877, the MCP server cannot start under that build.

Fix: use a non-sandboxed build of Sweet Home 3D — the standalone "Java version" / installer from sweethome3d.com instead of the Mac App Store version.

Claude Configuration

Add to your Claude Desktop claude_desktop_config.json:

json
{
  "mcpServers": {
    "sweethome3d": {
      "type": "http",
      "url": "http://localhost:9877/mcp"
    }
  }
}

For Claude Code, create .mcp.json in your project directory:

json
{
  "mcpServers": {
    "sweethome3d": {
      "type": "http",
      "url": "http://localhost:9877/mcp"
    }
  }
}

The plugin also has a built-in "Auto-configure Claude Desktop" button in Tools → MCP Server... that writes this config automatically.

Available Commands

42 commands across 12 categories.

Scene

CommandDescription
get_stateFull scene state: walls, furniture, rooms, camera, labels, levels
clear_sceneRemove all objects from the scene

Walls

CommandDescription
create_wallSingle wall between two points
create_wallsRectangular room (4 connected walls)
modify_wallChange height, thickness, color, arc, coordinates
delete_wallDelete wall by ID
connect_wallsConnect two walls for correct corner rendering

Rooms

CommandDescription
create_room_polygonRoom from an array of polygon points
modify_roomChange name, floor/ceiling color, visibility
delete_roomDelete room by ID

Furniture

CommandDescription
list_categoriesAll furniture catalog categories with item counts
list_furniture_catalogBrowse catalog; filter by name, category, or type
place_furniturePlace a catalog item in the scene
modify_furnitureMove, rotate, resize, recolor furniture by ID
delete_furnitureDelete furniture by ID
duplicate_objectsDuplicate one or more objects by ID
group_furnitureGroup multiple pieces into one object
ungroup_furnitureSplit a group back into individual pieces

Doors & Windows

CommandDescription
place_door_or_windowPlace from catalog into a wall (auto-computes position and angle)

Textures & Appearance

CommandDescription
list_textures_catalogBrowse texture catalog; filter by name or category
apply_textureApply catalog texture to wall side or room surface
set_environmentGround/sky colors, lighting, wall transparency, drawing mode

3D Shapes

CommandDescription
generate_shapeCreate custom 3D geometry: primitives (box, sphere, cylinder, cone, wedge, arch, stairs, torus, hemisphere, pipe), extrude, mesh, and CSG boolean operations (union, subtract, intersect)

Annotations

CommandDescription
add_labelText annotation on the 2D floor plan
add_dimension_lineMeasurement line with auto-offset

Camera

CommandDescription
set_cameraSwitch to top/observer mode; set position, lookAt point, or target object
store_cameraSave the current viewpoint as a named bookmark
get_camerasList all saved camera viewpoints

Multi-level

CommandDescription
add_levelAdd a new level (floor/storey)
list_levelsList all levels; shows which is currently selected
set_selected_levelSwitch the active level
delete_levelDelete a level and all its objects

Rendering & Export

CommandDescription
render_photoRay-traced 3D render (Sunflow); standard or overhead bird's-eye view; inline JPEG or saved PNG
export_plan_image2D floor plan as PNG
export_svg2D floor plan as SVG
export_to_obj3D scene as Wavefront OBJ (ZIP: OBJ + MTL + textures)

Save / Load

CommandDescription
save_homeSave the scene to a .sh3d file
load_homeLoad a .sh3d file, replacing the current scene

Checkpoints (undo timeline)

CommandDescription
checkpointSave an in-memory snapshot (optional description)
restore_checkpointRestore from a snapshot (supports force mode)
list_checkpointsList all snapshots with the current undo cursor position

Batch

CommandDescription
batch_commandsExecute multiple commands in one request

Coordinate System

  • Units: centimeters (500 = 5 meters)
  • X axis: right, Y axis: down (screen coordinates)
  • All object IDs are stable UUIDs — safe to use across multiple calls

Building from Source

Prerequisites: Java 11+, Maven 3.6+ (or use the included mvnw wrapper).

bash
# 1. Clone
git clone https://github.com/grimashevich/sweethome3d-mcp-server.git
cd sweethome3d-mcp-server

# 2. Obtain SweetHome3D.jar (copies from your SH3D installation or downloads it)
./scripts/setup-dev.sh        # macOS / Linux / Git Bash on Windows
# scripts\setup-dev.bat       # Windows Command Prompt

# 3. Build
./mvnw clean package

# 4. Run tests
./mvnw test

# The plugin artifact is at:
# target/sh3d-mcp-plugin-1.0.0.sh3p

Why the setup script? SweetHome3D.jar is a 46 MB binary excluded from git. The script first checks your local Sweet Home 3D installation (fastest, works offline), then falls back to downloading from SourceForge. The three Java3D JARs (j3dcore, j3dutils, vecmath) are included in lib/ directly.

Architecture

The plugin is a single self-contained component with no external runtime dependencies:

  • plugin — Entry point (SH3DMcpPlugin), settings dialog
  • http — Streamable HTTP MCP server (JSON-RPC 2.0, port 9877)
  • command — 42 command handlers, auto-registered via CommandRegistry
  • bridge — Thread-safe Sweet Home 3D API wrapper (HomeAccessor via EDT, CheckpointManager, ObjectResolver)
  • protocol — Hand-written JSON parser (zero external dependencies)
  • config — Plugin settings, Claude Desktop auto-configurator

See ARCHITECTURE.md for the full design, ADR decisions, and sequence diagrams.

Adding a New Command

One class is all it takes — the registry picks it up automatically:

java
public class MyCommandHandler implements CommandHandler, CommandDescriptor {

    @Override
    public Response execute(Request request, HomeAccessor accessor) {
        // All Home mutations must run on the Event Dispatch Thread:
        Object result = accessor.runOnEDT(() -> {
            Home home = accessor.getHome();
            // ... do something
            return "done";
        });
        return Response.success(result);
    }

    @Override
    public String getDescription() { return "Does something useful."; }

    @Override
    public Map<String, Object> getSchema() {
        return SchemaBuilder.object()
            .prop("name", "string", "Object name")
            .required("name")
            .build();
    }
}

Then register it in SH3DMcpPlugin.createCommandRegistry():

java
registry.register("my_command", new MyCommandHandler());

See CONTRIBUTING.md for the full development guide.

License

GNU General Public License v2.0 — see LICENSE for details.

This plugin uses the Sweet Home 3D Plugin API (GPL v2) and Java3D (BSD / JOGL license).

Sweet Home 3D MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Sweet Home 3D MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Sweet Home 3D MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Sweet Home 3D MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "sweethome3d-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてSweet Home 3D MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Sweet Home 3D MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Sweet Home 3D MCP Serverを使ってこのタスクを手伝ってもらえますか?
Sweet Home 3D MCP Server
はい、読みました。
Sweet Home 3D MCP Serverで調べた結果をお伝えします。

よくある質問

Sweet Home 3D MCP Server MCPサーバーは何に使いますか?

Sweet Home 3D MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでSweet Home 3D MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでSweet Home 3D MCP Serverを利用できます。

TypingMindでSweet Home 3D MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Sweet Home 3D MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Sweet Home 3D MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Sweet Home 3D MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでSweet Home 3D MCP Server MCPのどのようなツールを利用できますか?

Sweet Home 3D MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Sweet Home 3D MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Sweet Home 3D MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇