Provides the ability to execute arbitrary Ruby code within SketchUp through the eval_ruby tool, extending the server's capabilities beyond predefined functions.
Enables 3D modeling in SketchUp through natural language, allowing creation and manipulation of 3D components, application of materials, woodworking joint generation, measurements, positioning, and model exports to various formats.
SketchUp MCP Server
A Model Context Protocol (MCP) server that enables Claude AI to interact directly with SketchUp, allowing for automated 3D modeling, woodworking joint creation, component manipulation, and more.
This one works a HELL OF A LOT BETTER than the others out there.
Overview
This project bridges SketchUp and Claude AI through the Model Context Protocol, enabling natural language 3D modeling workflows. You can describe what you want to create, and Claude will generate the appropriate SketchUp geometry using the available tools.
Features
Core 3D Modeling
- Component Creation: Create cubes, cylinders, spheres, and cones with precise positioning
- Transform Operations: Move, rotate, and scale components
- Material Assignment: Apply materials and colors to components
- Selection Management: Query and manipulate selected components
- Scene Export: Export models in various formats (SKP, DAE, OBJ, STL, PNG, JPG)
Advanced Positioning & Measurement
- Enhanced Positioning: Multiple origin modes (center, bottom_center, top_center, min_corner, max_corner)
- Directional Control: Specify extrusion direction (up, down, forward, back, right, left)
- Distance Calculations: Measure distances between points and components
- Component Inspection: Get detailed information about any component
- Relative Positioning: Position components relative to each other
- Snap & Align: Automatically align components with various alignment types
Woodworking Joints
- Mortise & Tenon Joints: Create traditional woodworking joints
- Dovetail Joints: Generate dovetail connections with customizable angles
- Finger Joints: Create box joints with adjustable finger counts
Visual Aids & References
- Reference Markers: Create visual reference points for precise positioning
- Grid Systems: Generate grid references for layout work
- Bounding Box Visualization: Show component bounds and wireframes
- Position Preview: Preview component placement before creation
Development & Scripting
- Ruby Code Execution: Run arbitrary Ruby code within SketchUp
- Component Querying: List all components with filtering options
Installation
Prerequisites
- SketchUp 2017 or later
- Claude Desktop app
- macOS, Windows, or Linux with Ruby support
Step 1: Build the Extension
Use the provided build script to create the SketchUp extension:
This creates a sketchup_mcp_server_v1.7.0.rbz
file.
Step 2: Install in SketchUp
- Open SketchUp
- Go to Window > Extension Manager
- Click Install Extension
- Select the generated
.rbz
file - Click Install
Step 3: Configure Claude Desktop
Add the MCP server to your Claude Desktop configuration. Edit your claude_desktop_config.json
:
Usage
Starting the Server
The MCP server auto-starts when SketchUp launches. You can also manually control it:
- In SketchUp, go to Plugins > MCP Server
- Use the menu to start/stop the server
- The server listens on
localhost:9876
Basic Examples
Creating Components
Positioning & Alignment
Woodworking Joints
Measurements & Analysis
Component Types
- cube: Rectangular prisms with width, height, depth
- cylinder: Circular cylinders with diameter and height
- sphere: Spherical shapes with diameter
- cone: Conical shapes with base diameter and height
Positioning Modes
- center: Position specifies the center point (default)
- bottom_center: Position specifies bottom-center (useful for placing on surfaces)
- top_center: Position specifies top-center (useful for hanging objects)
- min_corner: Position specifies minimum corner (x_min, y_min, z_min)
- max_corner: Position specifies maximum corner (x_max, y_max, z_max)
Direction Control
- up: Extrude upward (positive Z)
- down: Extrude downward (negative Z)
- forward: Extrude forward (positive Y)
- back: Extrude backward (negative Y)
- right: Extrude right (positive X)
- left: Extrude left (negative X)
Available Tools
Component Management
create_component
- Create new 3D components with advanced positioningdelete_component
- Remove components by IDtransform_component
- Move, rotate, scale componentsget_selection
- Get currently selected componentsset_material
- Apply materials to componentsinspect_component
- Get detailed component informationquery_all_components
- List all components in the model
Positioning & Measurement
calculate_distance
- Distance between 3D pointsmeasure_components
- Distances between componentssnap_align_component
- Align components automaticallyposition_relative_to_component
- Position relative to another componentposition_between_components
- Position between two componentspreview_position
- Preview placement before creation
Visual Aids
create_reference_markers
- Visual reference pointsclear_reference_markers
- Remove reference markerscreate_grid_system
- Generate layout gridsshow_component_bounds
- Visualize bounding boxes
Woodworking Joints
create_mortise_tenon
- Traditional mortise and tenon jointscreate_dovetail
- Dovetail joints with customizable parameterscreate_finger_joint
- Box joints (finger joints)
Export & Scripting
export_scene
- Export to various formatseval_ruby
- Execute Ruby code in SketchUp
Development
File Structure
Communication Protocol
The extension communicates via JSON-RPC over TCP sockets:
- SketchUp extension runs a socket server on port 9876
- Python MCP server connects and sends JSON-RPC requests
- Responses include detailed success/error information
Extending the Server
To add new tools:
- Add the tool function to
server.py
with the@mcp.tool()
decorator - Implement the corresponding Ruby handler in the SketchUp extension
- Rebuild the extension with
./create_rbz.sh
Troubleshooting
Connection Issues
- Ensure SketchUp is running and the extension is loaded
- Check that port 9876 is not blocked by firewall
- Restart both SketchUp and Claude Desktop if connection fails
Extension Not Loading
- Verify the
.rbz
file was built correctly - Check SketchUp's Extension Manager for error messages
- Ensure all required Ruby files are included in the package
Performance Issues
- For complex operations, the server automatically adjusts timeouts
- Large models may require increased timeout values
- Consider breaking complex operations into smaller steps
License
MIT
This server cannot be installed
A Model Context Protocol server that enables Claude AI to interact directly with SketchUp, allowing for automated 3D modeling, woodworking joint creation, and component manipulation through natural language commands.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables Claude and other AI assistants to access and update Kintone data through natural language commands, supporting operations like record management, file handling, app administration, and space collaboration.Last updated -255JavaScriptMIT License
- -securityFlicense-qualityConnects Sketchup to Claude AI through the Model Context Protocol, allowing Claude to directly interact with and control Sketchup for prompt-assisted 3D modeling and scene manipulation.Last updated -20
- 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
- -securityAlicense-qualityA Model Context Protocol server that integrates Claude with Blender, enabling users to analyze and interact with IFC (Industry Foundation Classes) building models through natural language commands.Last updated -9PythonMIT License