Skip to content

sheares/sketchup-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sketchup-mcp

Bring Claude into Trimble SketchUp. A Model Context Protocol server (Python over stdio) plus a Ruby plugin (TCP bridge inside SketchUp) that together let Claude generate 3D geometry conversationally.

What it is

The MCP server exposes a small toolset (ping, create_box, create_cylinder, extrude_face, move_entity, set_material, list_entities, eval_ruby). Scope is generative ("Claude, build me X") rather than agentic operations on existing models. You ask, Claude writes geometry into your open SketchUp document.

Architecture

  • Ruby plugin (ruby_bridge/): runs a TCPServer on 127.0.0.1:9876 inside SketchUp. SketchUp's Ruby API requires the main thread, so the plugin queues incoming commands and drains them via UI.start_timer on the main loop.
  • MCP server (mcp_server/server.py): a stdio MCP server that registers the v0 toolset with Claude and forwards each tool call as a JSON message over TCP to the Ruby bridge.

Decoupled by design: any MCP-speaking client can drive the same Ruby bridge, and any TCP client can poke the bridge directly for testing.

Install (macOS, SketchUp Pro 2025)

git clone https://github.com/sheares/sketchup-mcp.git
cd sketchup-mcp
./install.sh

install.sh symlinks the Ruby plugin into SketchUp's Plugins folder. Restart SketchUp; you should see "MCP Bridge: Status" under the Plugins menu.

Python side:

cd mcp_server
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Register mcp_server/server.py with your MCP client (Claude Code or Claude Desktop) via the venv's Python.

Test the bridge without Claude

With SketchUp open and the plugin loaded:

echo '{"tool":"ping","args":{}}' | nc -w 5 127.0.0.1 9876
echo '{"tool":"create_box","args":{"size":[100,200,50],"units":"mm"}}' | nc -w 5 127.0.0.1 9876

v0 tools

Tool Purpose
ping Round-trip test
create_box Box primitive, unit-aware sizing
create_cylinder Cylinder primitive
extrude_face Pushpull on selected face
move_entity Translate by vector
set_material Colour or named material
list_entities Tree summary of the active model
eval_ruby Arbitrary Ruby on the main thread (escape hatch)

All sizing tools accept a units argument (mm, cm, m, in). Internally SketchUp speaks inches; the bridge handles conversion.

Status

Personal project. v0 toolset is working. Daily-driver entry point is Claude Desktop; dev iteration happens in Claude Code. Not packaged for distribution.

Notes

  • Built against SketchUp Pro 2025 on macOS, Ruby 3.2.2.
  • Ruby 3.2 parser rejects or raise '...' after multi-assignment or method-chain LHS; the bridge uses explicit raise '...' if x.nil? guards.

About

Bring Claude into Trimble SketchUp via MCP. Python (stdio) + Ruby (TCP bridge inside SketchUp) for generative 3D modelling.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors