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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。