loading…
Search for a command to run...
loading…
Connects SketchUp to Claude AI through the Model Context Protocol, enabling prompt-assisted 3D modeling, scene manipulation, and woodworking joinery operations.
Connects SketchUp to Claude AI through the Model Context Protocol, enabling prompt-assisted 3D modeling, scene manipulation, and woodworking joinery operations.
Originally forked from mhyrr/sketchup-mcp. Diverged at v0.0.1 with a new wire protocol (4-byte length-prefix framing), modular handler architecture, expanded introspection / joinery / edge-op tools, and full unit-test coverage on both Ruby and Python sides. Published to PyPI as
sketchup-mcp2(the originalsketchup-mcppackage is the upstream).
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.
The system consists of two main components:
su_mcp/su_mcp/): a modular Ruby plugin that runs a TCP server inside SketchUp (core/, handlers/, helpers/).src/sketchup_mcp/): a modular Python package built on FastMCP — tools.py exposes MCP tools, connection.py owns the persistent TCP socket with 4-byte length-prefix framing, config.py reads SKETCHUP_MCP_* env vars, errors.py surfaces structured Ruby errors.We're using uv so you'll need to brew install uv
.rbz file.rbz fileConfigure Claude to use the MCP server by adding the following to your Claude configuration:
"mcpServers": {
"sketchup": {
"command": "uvx",
"args": [
"sketchup-mcp2"
]
}
}
This will pull the latest from PyPI
Once connected, Claude can interact with Sketchup using the following capabilities:
Geometry & transforms:
create_component — Create a cube/cylinder/cone/sphere with specified dimensions (mm)delete_component — Remove a component from the scenetransform_component — Move/rotate/scale a component (translation in mm)set_material — Apply named or hex (#rrggbb) colors to a componentexport_scene — Export to skp/obj/dae/stl/png/jpgBooleans & edge ops:
boolean_operation — Union/difference/intersection on two solidschamfer_edge — Chamfer all edges of a group/component (distance in mm)fillet_edge — Fillet (round) all edges (radius in mm, segments configurable)Joinery:
create_mortise_tenon, create_dovetail, create_finger_joint — Woodworking joints (dimensions in mm)Introspection:
get_model_info — Path, title, units, bbox of the active modellist_components — Tree of groups/components with bboxes (recursive, max_depth)get_component_info — Details about one entity by idfind_components — Search by name/type/layerlist_layers, create_layer — Layer/tag managementget_selection — IDs and metadata of currently selected entitiesundo — Roll back the last operationEscape hatch:
eval_ruby — Execute arbitrary Ruby code in SketchUp for anything not covered aboveHere are some examples of what you can ask Claude to do:
The system uses a simple JSON-based protocol over TCP sockets:
type and optional paramsstatus and result or messageContributions are welcome! Please feel free to submit a Pull Request.
MIT
Add to your .mcp.json (Claude Code) or equivalent client config:
{
"mcpServers": {
"sketchup": {
"command": "uvx",
"args": ["sketchup-mcp2"],
"env": {
"SKETCHUP_MCP_HOST": "127.0.0.1",
"SKETCHUP_MCP_PORT": "9876",
"SKETCHUP_MCP_TIMEOUT": "60",
"SKETCHUP_MCP_LOG_LEVEL": "INFO"
}
}
}
}
Manual start (no MCP client):
uvx sketchup-mcp2
For working with full SketchUp models (walls, roofs, framing, joinery) via
eval_ruby, see the detailed Ruby snippets in
docs/sketchup-ruby-cookbook.md:
face.normal.z safe extrusion.Group#subtract reversed-semantics gotcha.SketchUp not running or extension not started: ...The Python MCP server tried to connect on port 9876 but found nothing listening. Either:
The server stays alive after this error; the next tool-call will retry the connect.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"sketchup-mcp2": {
"command": "npx",
"args": []
}
}
}