threecrate-mcp
v0.2.2Clean, align, measure and repair 3D scans and meshes; make scans printable as STL.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
inspect_point_cloud
Summarize a point cloud file: point count, bounds, centroid, median point spacing, and suggested voxel sizes and radii for the other tools. Call this first on any new cloud.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
inspect_mesh
Check a mesh's health and measure it: holes, separate pieces, non-manifold or flipped faces, watertight, size, surface area, volume, and whether it can be 3D printed as is (with the reasons if not).
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
convert
Convert a point cloud (PLY, PCD, XYZ, CSV) or mesh (PLY, OBJ) to another format.
| Parameter | Type | Description |
|---|---|---|
output * | string | Output path; its extension picks the format |
path * | string | File path, relative to the workspace folder |
kind | string | What the file holds |
overwrite | boolean | Replace the output file if it already exists |
downsample
Reduce point density with a voxel grid. Good before registration or reconstruction. 2x the median spacing is a light pass, 5x a strong one.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
voxel_size * | number | Voxel edge length in the cloud's units; each voxel keeps the centroid of its points |
output | Where to write the result. Default: a new file next to the input | |
overwrite | boolean | Replace the output file if it already exists |
remove_outliers
Remove stray points (sensor noise, reflections) from a point cloud.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
k_neighbors | integer | Neighbours checked (statistical) |
method | string | statistical: far from neighbours on average; radius: too few neighbours nearby |
min_neighbors | integer | Minimum neighbours within radius (radius method) |
output | Where to write the result. Default: a new file next to the input | |
overwrite | boolean | Replace the output file if it already exists |
radius | Search radius (radius method, required) | |
std_ratio | number | Lower removes more (statistical) |
estimate_normals
Estimate a surface normal for every point and save them in a PLY file. Not needed before register or reconstruct; those estimate normals themselves.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
k_neighbors | integer | Neighbours used for each normal |
normal_orientation | string | consistent: normals agree all around, outward on closed objects (default). viewpoint: face a point above the cloud; better for one-sided scans of walls or facades |
output | Output .ply path (stores normals as nx ny nz) | |
overwrite | boolean | Replace the output file if it already exists |
register
Align a source point cloud to a target. Returns the 4x4 rigid transform (source to target), fit error (mse, rmse) and convergence.
| Parameter | Type | Description |
|---|---|---|
source * | string | Cloud to move |
target * | string | Cloud to align to |
aligned_output | Also save the source cloud moved into the target's frame here | |
initial_transform | Starting 4x4 transform (not for method='global') | |
max_correspondence_distance | number | Ignore matches farther than this (gicp only) |
max_iterations | integer | |
method | string | icp: fast, needs a rough initial alignment. point_to_plane: better on smooth surfaces. gicp: most robust local method. global: no initial alignment needed (feature matching + ICP), slower |
overwrite | boolean | Replace the output file if it already exists |
voxel_size | Downsample both clouds first for speed; the result still applies to the full clouds |
transform
Apply a 4x4 rigid transform to every point of a cloud.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
transform * | array | 4x4 rigid transform, e.g. from register |
output | Where to write the result. Default: a new file next to the input | |
overwrite | boolean | Replace the output file if it already exists |
segment_plane
Find the dominant plane (floor, wall, table) with RANSAC. Returns its equation and how many points lie on it; can split the cloud in two.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
distance_threshold | number | Max distance from the plane for a point to count |
inliers_output | Save the plane's points here | |
max_iterations | integer | RANSAC iterations |
outliers_output | Save everything else here (e.g. objects on a floor) | |
overwrite | boolean | Replace the output file if it already exists |
extract_clusters
Split a cloud into separate objects by distance (Euclidean clustering). Often run after segment_plane removes the floor.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
tolerance * | number | Max gap between points of one cluster |
max_cluster_size | integer | |
max_files | integer | Save at most this many clusters, largest first |
min_cluster_size | integer | |
output_dir | Folder to save each cluster as its own PLY | |
overwrite | boolean | Replace the output file if it already exists |
reconstruct
Build a triangle mesh from a point cloud. Clean and downsample first for better results. Poisson always closes the surface; set trim_distance for scans that only see one side.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
alpha | Alpha (alpha_shape) | |
depth | integer | Poisson detail: grid of 2^depth cells per side. 7 takes about 1 s; 8 is finer but 10-20 s |
method | string | auto: picks a method. poisson: smooth watertight surfaces. ball_pivoting: keeps detail, may leave holes. alpha_shape: rough hulls. delaunay: near-flat clouds |
normal_orientation | string | consistent: normals agree all around, outward on closed objects (default). viewpoint: face a point above the cloud; better for one-sided scans of walls or facades |
normals_k | integer | Neighbours for the normals Poisson needs |
output | Output mesh path (.ply or .obj) | |
overwrite | boolean | Replace the output file if it already exists |
radius | Ball radius (ball_pivoting; default 2x spacing) | |
trim_distance | Poisson: drop surface farther than this from any point. Use on open scans (e.g. 2x spacing) |
simplify_mesh
Reduce a mesh's triangle count while keeping its shape (quadric decimation).
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
output | Where to write the result. Default: a new file next to the input | |
overwrite | boolean | Replace the output file if it already exists |
preserve_boundary | boolean | Keep holes and open borders fixed. Set false if the call fails because the mesh is mostly holes |
reduction_ratio | number | Share of faces to remove (0.5 removes about half) |
smooth_mesh
Smooth a noisy or bumpy mesh, for example after reconstruct. Taubin keeps the overall size; Laplacian smooths harder but shrinks the mesh.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
iterations | integer | |
method | string | taubin keeps volume best; laplacian is strongest but shrinks the mesh |
output | Where to write the result. Default: a new file next to the input | |
overwrite | boolean | Replace the output file if it already exists |
render
Draw point clouds or meshes and return the picture, so you can check a result yourself: holes or flipped faces show as orange, a missing base shows in the bottom view. Pass two files to compare before and after.
| Parameter | Type | Description |
|---|---|---|
paths * | array | Files to draw, one row each (point clouds or meshes); e.g. [before, after] |
output | Also save the PNG here | |
overwrite | boolean | Replace the output file if it already exists |
size | integer | Pixels per view |
up | string | Which axis points up in the data (phone scans are often y) |
views | Columns of the image. Default: angled, front, right, top, bottom |
repair_for_print
Make a scan or mesh 3D-printable: removes stray points and loose bits, optionally the floor, closes holes (including a missing base), fixes face direction, reduces the size and converts to millimetres. Writes an STL and returns what it did, the health before and after, and a before/after picture to check.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path, relative to the workspace folder |
depth | integer | Detail when the surface is rebuilt; 7 takes about a second |
output | Output mesh (.stl by default, or .ply/.obj) | |
overwrite | boolean | Replace the output file if it already exists |
remove_floor | boolean | Remove a floor or turntable under the object (point clouds only). Check render first |
target_faces | Reduce to about this many triangles (default: keep up to 250,000) | |
units | string | Units of the input; the result is always in mm. auto reads under 2 units long as metres |
up | string | Which axis points up, for the picture |