SketchUp MCP Server
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.
README
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:
chmod +x create_rbz.sh
./create_rbz.sh
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
.rbzfile - Click Install
Step 3: Configure Claude Desktop
Add the MCP server to your Claude Desktop configuration. Edit your claude_desktop_config.json:
{
"mcpServers": {
"sketchup": {
"command": "python",
"args": ["/path/to/your/src/sketchup_mcp/server.py"]
}
}
}
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
"Create a 10x5x2 cube at position [50, 25, 10]"
"Make a cylinder with diameter 8 and height 15, positioned at the origin with bottom-center alignment"
Positioning & Alignment
"Position the new component to the right of the existing cube"
"Align these two components center-to-center"
"Create a grid system with 10-unit spacing"
Woodworking Joints
"Create a mortise and tenon joint between these two boards"
"Make a dovetail joint with 6 tails and 15-degree angle"
Measurements & Analysis
"Measure the distance between these two components"
"Show me the bounding boxes of all selected components"
"Inspect this component and tell me its dimensions"
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
├── create_rbz.sh # Build script for the extension
├── src/sketchup_mcp/
│ └── server.py # MCP server implementation
├── su_mcp.rb # SketchUp extension entry point
└── su_mcp/
├── main.rb # Main extension logic
├── server.rb # Socket server for MCP communication
├── helpers/ # Helper modules
└── tools/ # Tool implementations
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.pywith 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
.rbzfile 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.