threecrate-mcp 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,50 @@
1
+ # Rust build artifacts
2
+ /target/
3
+ Cargo.lock
4
+
5
+ # Additional Rust build files
6
+ **/*.rs.bk
7
+ *.pdb
8
+ *.dll
9
+ *.so
10
+ *.dylib
11
+ *.exe
12
+ *.rlib
13
+ *.dSYM/
14
+
15
+ # Cargo publishing artifacts
16
+ **/target/
17
+ **/Cargo.lock
18
+
19
+ # Documentation build
20
+ /doc/
21
+
22
+ # IDE files
23
+ .vscode/
24
+ .idea/
25
+ *.swp
26
+ *.swo
27
+
28
+ # OS files
29
+ .DS_Store
30
+ Thumbs.db
31
+
32
+ # Logs
33
+ *.log
34
+
35
+ # Temporary files
36
+ *~
37
+
38
+ # Package files
39
+ *.orig
40
+ *.rej
41
+ *.patch
42
+
43
+ # Generated files
44
+ examples/output.ply
45
+
46
+ CLAUDE.md
47
+
48
+ # Python bytecode
49
+ __pycache__/
50
+ *.pyc
@@ -0,0 +1,120 @@
1
+ Metadata-Version: 2.5
2
+ Name: threecrate-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server that gives AI agents threecrate's 3D point cloud and mesh tools
5
+ Project-URL: Repository, https://github.com/rajgandhi1/threecrate
6
+ License: MIT OR Apache-2.0
7
+ Keywords: 3d,agents,lidar,mcp,mesh,point-cloud
8
+ Classifier: Intended Audience :: Science/Research
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Requires-Python: >=3.10
13
+ Requires-Dist: mcp<3,>=2
14
+ Requires-Dist: numpy>=1.20
15
+ Requires-Dist: threecrate>=0.10.0
16
+ Provides-Extra: test
17
+ Requires-Dist: pytest>=8; extra == 'test'
18
+ Description-Content-Type: text/markdown
19
+
20
+ # threecrate-mcp
21
+
22
+ An [MCP](https://modelcontextprotocol.io) server that lets AI agents work with 3D
23
+ point clouds and meshes using [threecrate](https://github.com/rajgandhi1/threecrate).
24
+ Ask your agent to "clean up scan.ply", "align these two scans" or "turn this cloud
25
+ into a mesh", and it calls these tools.
26
+
27
+ Works with any MCP client: Claude Code, Claude Desktop, Codex, OpenCode, Cursor,
28
+ Gemini CLI and others.
29
+
30
+ ## Setup
31
+
32
+ You need [uv](https://docs.astral.sh/uv/) (for `uvx`) or Python 3.10+.
33
+
34
+ **Claude Code** (from your project folder):
35
+
36
+ ```bash
37
+ claude mcp add threecrate -- uvx threecrate-mcp
38
+ ```
39
+
40
+ **Codex** (from your project folder):
41
+
42
+ ```bash
43
+ codex mcp add threecrate -- uvx threecrate-mcp
44
+ ```
45
+
46
+ **OpenCode** (`opencode.json` in your project):
47
+
48
+ ```json
49
+ {
50
+ "$schema": "https://opencode.ai/config.json",
51
+ "mcp": {
52
+ "threecrate": { "type": "local", "command": ["uvx", "threecrate-mcp"], "enabled": true }
53
+ }
54
+ }
55
+ ```
56
+
57
+ **Claude Desktop, Cursor and other apps** (their MCP JSON config). These apps
58
+ don't start servers in your project folder, so pass it with `--root`:
59
+
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "threecrate": {
64
+ "command": "uvx",
65
+ "args": ["threecrate-mcp", "--root", "/path/to/your/scans"]
66
+ }
67
+ }
68
+ }
69
+ ```
70
+
71
+ Without `uv`, install with `pip install threecrate-mcp` and use `threecrate-mcp`
72
+ as the command.
73
+
74
+ ## How it behaves
75
+
76
+ - **One workspace folder.** Tools only read and write inside it: the folder the
77
+ server starts in, or `--root` (also `THREECRATE_MCP_ROOT`). Paths are relative
78
+ to it.
79
+ - **New files, never overwrites.** Results go to a new file next to the input
80
+ (for example `scan.downsampled.ply`) unless you name one. Inputs are never
81
+ overwritten, and existing files only with `overwrite=true`.
82
+ - **Summaries, not points.** Tools return counts, bounds, transforms and errors.
83
+ Point data stays in files, so a big scan doesn't flood the agent's context.
84
+ - **Size limit.** Clouds above 50 million points are refused
85
+ (`--max-points` or `THREECRATE_MCP_MAX_POINTS` to change).
86
+
87
+ ## Tools
88
+
89
+ | Tool | What it does |
90
+ | --- | --- |
91
+ | `inspect_point_cloud` | Point count, bounds, spacing, and suggested voxel sizes and radii |
92
+ | `inspect_mesh` | Vertex and face counts, bounds |
93
+ | `convert` | Change format (PLY, PCD, XYZ, CSV; meshes PLY, OBJ) |
94
+ | `downsample` | Voxel grid downsampling |
95
+ | `remove_outliers` | Statistical or radius outlier removal |
96
+ | `estimate_normals` | Save per-point normals to a PLY |
97
+ | `register` | Align two clouds: ICP, point-to-plane, GICP, or global (no starting pose needed) |
98
+ | `transform` | Apply a 4x4 rigid transform |
99
+ | `segment_plane` | Find a floor, wall or table plane; split the cloud |
100
+ | `extract_clusters` | Split a cloud into separate objects |
101
+ | `reconstruct` | Point cloud to mesh: auto, Poisson, ball pivoting, alpha shape, Delaunay |
102
+ | `simplify_mesh` | Reduce triangle count |
103
+ | `smooth_mesh` | Taubin, Laplacian or HC smoothing |
104
+
105
+ Readable point cloud formats: PLY, PCD, XYZ, CSV (and others threecrate
106
+ supports). Writable: PLY, PCD, XYZ, CSV.
107
+
108
+ ## Agent Skill
109
+
110
+ If you would rather not run a server, the [threecrate skill](../skills/threecrate/SKILL.md)
111
+ teaches an agent to do the same work with short Python scripts. See
112
+ [INSTALL.md](../INSTALL.md) for Claude Code, Codex, Gemini CLI, OpenCode and
113
+ Cursor.
114
+
115
+ ## Development
116
+
117
+ ```bash
118
+ pip install -e ".[test]"
119
+ pytest
120
+ ```
@@ -0,0 +1,101 @@
1
+ # threecrate-mcp
2
+
3
+ An [MCP](https://modelcontextprotocol.io) server that lets AI agents work with 3D
4
+ point clouds and meshes using [threecrate](https://github.com/rajgandhi1/threecrate).
5
+ Ask your agent to "clean up scan.ply", "align these two scans" or "turn this cloud
6
+ into a mesh", and it calls these tools.
7
+
8
+ Works with any MCP client: Claude Code, Claude Desktop, Codex, OpenCode, Cursor,
9
+ Gemini CLI and others.
10
+
11
+ ## Setup
12
+
13
+ You need [uv](https://docs.astral.sh/uv/) (for `uvx`) or Python 3.10+.
14
+
15
+ **Claude Code** (from your project folder):
16
+
17
+ ```bash
18
+ claude mcp add threecrate -- uvx threecrate-mcp
19
+ ```
20
+
21
+ **Codex** (from your project folder):
22
+
23
+ ```bash
24
+ codex mcp add threecrate -- uvx threecrate-mcp
25
+ ```
26
+
27
+ **OpenCode** (`opencode.json` in your project):
28
+
29
+ ```json
30
+ {
31
+ "$schema": "https://opencode.ai/config.json",
32
+ "mcp": {
33
+ "threecrate": { "type": "local", "command": ["uvx", "threecrate-mcp"], "enabled": true }
34
+ }
35
+ }
36
+ ```
37
+
38
+ **Claude Desktop, Cursor and other apps** (their MCP JSON config). These apps
39
+ don't start servers in your project folder, so pass it with `--root`:
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "threecrate": {
45
+ "command": "uvx",
46
+ "args": ["threecrate-mcp", "--root", "/path/to/your/scans"]
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ Without `uv`, install with `pip install threecrate-mcp` and use `threecrate-mcp`
53
+ as the command.
54
+
55
+ ## How it behaves
56
+
57
+ - **One workspace folder.** Tools only read and write inside it: the folder the
58
+ server starts in, or `--root` (also `THREECRATE_MCP_ROOT`). Paths are relative
59
+ to it.
60
+ - **New files, never overwrites.** Results go to a new file next to the input
61
+ (for example `scan.downsampled.ply`) unless you name one. Inputs are never
62
+ overwritten, and existing files only with `overwrite=true`.
63
+ - **Summaries, not points.** Tools return counts, bounds, transforms and errors.
64
+ Point data stays in files, so a big scan doesn't flood the agent's context.
65
+ - **Size limit.** Clouds above 50 million points are refused
66
+ (`--max-points` or `THREECRATE_MCP_MAX_POINTS` to change).
67
+
68
+ ## Tools
69
+
70
+ | Tool | What it does |
71
+ | --- | --- |
72
+ | `inspect_point_cloud` | Point count, bounds, spacing, and suggested voxel sizes and radii |
73
+ | `inspect_mesh` | Vertex and face counts, bounds |
74
+ | `convert` | Change format (PLY, PCD, XYZ, CSV; meshes PLY, OBJ) |
75
+ | `downsample` | Voxel grid downsampling |
76
+ | `remove_outliers` | Statistical or radius outlier removal |
77
+ | `estimate_normals` | Save per-point normals to a PLY |
78
+ | `register` | Align two clouds: ICP, point-to-plane, GICP, or global (no starting pose needed) |
79
+ | `transform` | Apply a 4x4 rigid transform |
80
+ | `segment_plane` | Find a floor, wall or table plane; split the cloud |
81
+ | `extract_clusters` | Split a cloud into separate objects |
82
+ | `reconstruct` | Point cloud to mesh: auto, Poisson, ball pivoting, alpha shape, Delaunay |
83
+ | `simplify_mesh` | Reduce triangle count |
84
+ | `smooth_mesh` | Taubin, Laplacian or HC smoothing |
85
+
86
+ Readable point cloud formats: PLY, PCD, XYZ, CSV (and others threecrate
87
+ supports). Writable: PLY, PCD, XYZ, CSV.
88
+
89
+ ## Agent Skill
90
+
91
+ If you would rather not run a server, the [threecrate skill](../skills/threecrate/SKILL.md)
92
+ teaches an agent to do the same work with short Python scripts. See
93
+ [INSTALL.md](../INSTALL.md) for Claude Code, Codex, Gemini CLI, OpenCode and
94
+ Cursor.
95
+
96
+ ## Development
97
+
98
+ ```bash
99
+ pip install -e ".[test]"
100
+ pytest
101
+ ```
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.24"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "threecrate-mcp"
7
+ version = "0.1.0"
8
+ description = "MCP server that gives AI agents threecrate's 3D point cloud and mesh tools"
9
+ readme = "README.md"
10
+ license = { text = "MIT OR Apache-2.0" }
11
+ # The MCP Python SDK needs 3.10+ (threecrate itself supports 3.8+).
12
+ requires-python = ">=3.10"
13
+ dependencies = [
14
+ "threecrate>=0.10.0", # needs the Poisson, normals and crash fixes from 0.10.0
15
+ "mcp>=2,<3", # uses the 2.x MCPServer API
16
+ "numpy>=1.20",
17
+ ]
18
+ keywords = ["mcp", "point-cloud", "3d", "lidar", "mesh", "agents"]
19
+ classifiers = [
20
+ "Programming Language :: Python :: 3",
21
+ "Topic :: Scientific/Engineering",
22
+ "Topic :: Multimedia :: Graphics :: 3D Modeling",
23
+ "Intended Audience :: Science/Research",
24
+ ]
25
+
26
+ [project.urls]
27
+ Repository = "https://github.com/rajgandhi1/threecrate"
28
+
29
+ [project.scripts]
30
+ threecrate-mcp = "threecrate_mcp.server:main"
31
+
32
+ [project.optional-dependencies]
33
+ test = ["pytest>=8"]
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["src/threecrate_mcp"]
37
+
38
+ [tool.pytest.ini_options]
39
+ testpaths = ["tests"]
@@ -0,0 +1,3 @@
1
+ """MCP server that gives AI agents threecrate's point cloud and mesh tools."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,3 @@
1
+ from .server import main
2
+
3
+ main()