Skip to main content

Sketchup integration through Model Context Protocol

Project description

SketchupMCP - Sketchup Model Context Protocol Integration

SketchupMCP connects Sketchup to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Sketchup. This integration enables prompt-assisted 3D modeling, scene creation, and manipulation in Sketchup.

Big Shoutout to Blender MCP for the inspiration and structure.

Features

  • Two-way communication: Connect Claude AI to Sketchup through a TCP socket connection
  • Component manipulation: Create, modify, delete, and transform components in Sketchup
  • Material control: Apply and modify materials and colors
  • Scene inspection: Get detailed information about the current Sketchup scene
  • Selection handling: Get and manipulate selected components
  • Ruby code evaluation: Execute arbitrary Ruby code directly in SketchUp for advanced operations

Components

The system consists of two main components:

  1. Sketchup Extension: A Sketchup extension that creates a TCP server within Sketchup to receive and execute commands
  2. MCP Server (sketchup_mcp/server.py): A Python server that implements the Model Context Protocol and connects to the Sketchup extension

Installation

Python Packaging

We're using uv so you'll need to brew install uv

Sketchup Extension

  1. Download or build the latest .rbz file
  2. In Sketchup, go to Window > Extension Manager
  3. Click "Install Extension" and select the downloaded .rbz file
  4. Restart Sketchup

Usage

Starting the Connection

  1. In Sketchup, go to Extensions > SketchupMCP > Start Server
  2. The server will start on the default port (9876)
  3. Make sure the MCP server is running in your terminal

Using with Claude

Configure Claude to use the MCP server by adding the following to your Claude configuration:

    "mcpServers": {
        "sketchup": {
            "command": "uvx",
            "args": [
                "sketchup-mcp"
            ]
        }
    }

This will pull the latest from PyPI

Once connected, Claude can interact with Sketchup using the following capabilities:

Tools

  • get_scene_info - Gets information about the current Sketchup scene
  • get_selected_components - Gets information about currently selected components
  • create_component - Create a new component with specified parameters
  • delete_component - Remove a component from the scene
  • transform_component - Move, rotate, or scale a component
  • set_material - Apply materials to components
  • export_scene - Export the current scene to various formats
  • eval_ruby - Execute arbitrary Ruby code in SketchUp for advanced operations

Example Commands

Here are some examples of what you can ask Claude to do:

  • "Create a simple house model with a roof and windows"
  • "Select all components and get their information"
  • "Make the selected component red"
  • "Move the selected component 10 units up"
  • "Export the current scene as a 3D model"
  • "Create a complex arts and crafts cabinet using Ruby code"

Troubleshooting

  • Connection issues: Make sure both the Sketchup extension server and the MCP server are running
  • Command failures: Check the Ruby Console in Sketchup for error messages
  • Timeout errors: Try simplifying your requests or breaking them into smaller steps

Technical Details

Communication Protocol

The system uses a simple JSON-based protocol over TCP sockets:

  • Commands are sent as JSON objects with a type and optional params
  • Responses are JSON objects with a status and result or message

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_sketchup_mcp-0.1.17.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_sketchup_mcp-0.1.17-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file mseep_sketchup_mcp-0.1.17.tar.gz.

File metadata

  • Download URL: mseep_sketchup_mcp-0.1.17.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_sketchup_mcp-0.1.17.tar.gz
Algorithm Hash digest
SHA256 4cc812f4b2102ca1a51ba903964be4b8a9d602dbc9fcc8558710a4baa24b6050
MD5 5bc9565d392ab5221cc2cbb28e9ace31
BLAKE2b-256 130715fada7c9e457920e367d3dae2fa9f632155b97de1efe49b6af851c3ae3b

See more details on using hashes here.

File details

Details for the file mseep_sketchup_mcp-0.1.17-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_sketchup_mcp-0.1.17-py3-none-any.whl
Algorithm Hash digest
SHA256 702ab6036f36e4d07c585205a70f34972c645e18cd131fbf1a0cfbcb8c074de1
MD5 cbb15eec9e521848d8b0a58f8a225d5b
BLAKE2b-256 3a5d2ad6ad2ffd74e10f5f73384e3f2ba833de4da64c30b71bcb0d3135989aa3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page