Repository avatar
Other Tools
v0.2.0
active

splat-lens-mcp

io.github.Nils19/splat-lens-mcp

3D Gaussian Splatting (.ply) geometry, multi-view renders, MuJoCo checks & WebGL viewer.

Documentation

Splat Lens MCP

PyPI License: MIT Python 3.10+

A local-first, uvx-compatible FastMCP server giving coding agents dual-channel spatial perception over 3D Gaussian Splatting (.ply) scenes, point clouds (.npz/.npy), and MuJoCo rigid-body states — plus an inline interactive WebGL radial-Gaussian viewer (ui://splat-lens/viewer.html) built on the MCP Apps extension. Screenshot_20261130_174532

Screenshot_20261130_174718

10-Second Demo (No .ply Needed)

Try the bundled tabletop 3DGS scene (a seated cyan mug + a floating amber block) right from your terminal:

uvx splat-lens-mcp --demo

Or connect the MCP server and paste this prompt into Claude Code, Cursor, Claude Desktop, or Antigravity:

"Inspect demo with inspect_scene_geometry and render_multiview_grid, point out any floating object, open it in open_interactive_viewer, and verify the corrected placement in MuJoCo (scene_xml_path="demo", body_name="floating_block")."

Tools

ToolWhat it does
inspect_scene_geometryParses Gaussian centers, normals, opacities, scales, and RGB/SH DC colors (LRU-cached by (path, mtime_ns, up_axis)), estimates the floor plane and elevated support surfaces (tables/shelves), and computes per-cluster AABBs, plan-view OBBs, PCA tilts, support heights, and pairwise 3D clearances.
render_multiview_gridPure-CPU headless 2×3 (or 2×2) multi-view PNG contact-sheet renderer (zero EGL/CUDA dependencies) with world axes, metric scale bars, Okabe-Ito GT/predicted 3D wireframes, 2-sigma uncertainty ellipsoids, and cluster highlighting. Returns both JSON metadata and the PNG directly in vision context.
check_mujoco_plausibilityPlaces a rigid body at a candidate 7-DoF pose [x, y, z, qw, qx, qy, qz] in MuJoCo, checks initial contact penetration (mjData.contact), rolls physics forward sim_steps, compares resting translation/yaw error against an observed .ply, and returns numeric metrics + a Before/After PNG contact sheet.
open_interactive_viewerStreams packed Float32 positions, Uint8 RGB colors, Gaussian radii, and optional Int32 cluster IDs to an inline WebGL radial-Gaussian (exp(-3.4 * r^2)) MCP App (ui://splat-lens/viewer.html), with click-to-pick 3D coordinates sent back to the agent via ui/update-model-context / ui/message, plus a standalone HTML fallback file.

All 4 tools accept "demo" as a shorthand for the bundled tabletop sample scene (demo_tabletop.ply, demo_clusters.npy, demo_scene.xml).

MCP Client Setup

Core dependencies (fastmcp, numpy, plyfile, Pillow, matplotlib, scipy) install from pre-built wheels with zero C++/CUDA compilation. Add [mujoco] for physics rollouts.

Antigravity / Cursor / Windsurf (mcp_config.json / .cursor/mcp.json)

{
  "mcpServers": {
    "splat-lens": {
      "command": "uvx",
      "args": ["splat-lens-mcp"]
    }
  }
}

With optional MuJoCo plausibility engine:

{
  "mcpServers": {
    "splat-lens": {
      "command": "uvx",
      "args": ["--from", "splat-lens-mcp[mujoco]", "splat-lens-mcp"]
    }
  }
}

Claude Code

claude mcp add splat-lens -- uvx splat-lens-mcp
# Or with MuJoCo:
claude mcp add splat-lens -- uvx --from "splat-lens-mcp[mujoco]" splat-lens-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "splat-lens": {
      "command": "uvx",
      "args": ["splat-lens-mcp"]
    }
  }
}

Gemini CLI Extension

gemini extensions install https://github.com/Nils19/splat-lens-mcp

Coordinate Convention

All tools operate in a right-handed Z-up frame by default (up_axis="z"). Pass up_axis="y" for Y-up meshes/splats or up_axis="cv" for OpenCV camera-frame .ply exports (diag(1, -1, -1) conversion to Z-up).

Local Development

git clone https://github.com/Nils19/splat-lens-mcp.git
cd splat-lens-mcp
uv sync --extra dev --extra mujoco
uv run pytest -v

License

MIT

PYPI
splat-lens-mcp
Install Command
pip install splat-lens-mcp