Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3cf0fb2
fix(storage): guard destructive directory moves and deletion
JayceeB1 Oct 9, 2026
6481e15
fix(storage): copy safely into empty destination without EEXIST
JayceeB1 Oct 9, 2026
51b798a
feat(mesh-ops): add read-only inspect_mesh and suggest_fixes ops
lightningpixel Oct 19, 2026
456f888
Merge pull request #376 from lightningpixel/feat/296-inspect-mesh
lightningpixel Oct 19, 2026
7c273f9
feat(mesh-ops): add semantic transform ops and a one-call arrange end…
lightningpixel Oct 19, 2026
f502eb9
Merge pull request #377 from lightningpixel/feat/297-semantic-transforms
lightningpixel Oct 19, 2026
5acb3cf
feat(mesh-ops): add a diagnostic-driven repair_mesh composite op
lightningpixel Oct 19, 2026
95e9117
fix(deps): declare scipy and keep mesh ops off undeclared networkx
lightningpixel Oct 19, 2026
f29b445
Merge pull request #378 from lightningpixel/feat/298-repair-mesh
lightningpixel Oct 19, 2026
16e497b
feat(agent): stream chat responses as typed SSE events
lightningpixel Oct 20, 2026
a471509
Merge pull request #379 from lightningpixel/feat/300-agent-streaming
lightningpixel Oct 20, 2026
2180a12
feat(agent): stream chat responses as typed SSE events
lightningpixel Oct 20, 2026
407ef72
Merge pull request #380 from lightningpixel/fix/300-streaming-to-dev
lightningpixel Oct 20, 2026
dc87d3f
Merge pull request #381 from lightningpixel/main
lightningpixel Oct 20, 2026
6bae496
fix(llm): pick CUDA only when an NVIDIA GPU actually answers, add eng…
Lorchie Oct 26, 2026
cd16feb
test(mesh-ops): fix two tests failing on a clean dev checkout
Lorchie Oct 26, 2026
66c1d3f
Merge pull request #388 from lightningpixel/fix/llm-nvidia-detection
lightningpixel Oct 28, 2026
86a23dc
Keep TripoSG and the texture model loaded together
ahgsql Oct 30, 2026
7f13d13
modly-cli: start the API with the same setup as the desktop app
ahgsql Oct 30, 2026
4bf4795
fix(registry): unload stale models when leaving a resident pair, gate…
lightningpixel Oct 31, 2026
ca1b909
Merge pull request #390 from ahgsql/perf/keep-geometry-texture-models…
lightningpixel Oct 31, 2026
2fcc0fb
modly-cli: drop the caller's Python env and prefer the app venv, like…
lightningpixel Oct 31, 2026
c34655a
Merge pull request #391 from ahgsql/fix/cli-serve-api-desktop-env
lightningpixel Oct 31, 2026
421d56e
Merge branch 'dev' into fix/storage-destructive-operations
lightningpixel Nov 1, 2026
5ee7dea
fix(storage): stage moves, allow data-drive folders, surface guard er…
lightningpixel Nov 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions api/mcp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"""

import asyncio
import json
import mimetypes
import httpx
from mcp.server import Server
Expand Down Expand Up @@ -83,6 +84,86 @@ async def list_tools() -> list[Tool]:
"required": ["job_id"],
},
),
Tool(
name="modly_inspect_mesh",
description=(
"Diagnose a mesh without modifying it: watertight, manifold, holes, "
"self-intersections, parts, dimensions, volume, UVs/normals, printability."
),
inputSchema={
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Workspace-relative path to the mesh (e.g. 'Default/mesh.glb').",
},
},
"required": ["path"],
},
),
Tool(
name="modly_suggest_fixes",
description="Inspect a mesh and list the operations (with params) that would fix its problems.",
inputSchema={
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Workspace-relative path to the mesh (e.g. 'Default/mesh.glb').",
},
},
"required": ["path"],
},
),
Tool(
name="modly_repair_mesh",
description=(
"Repair a mesh automatically (holes, non-manifold edges, degenerate faces, "
"flipped normals) until it is closed and manifold. Writes a new, untextured mesh."
),
inputSchema={
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Workspace-relative path to the mesh (e.g. 'Default/mesh.glb').",
},
"fill_holes": {
"type": "boolean",
"description": "Close holes (default true).",
},
},
"required": ["path"],
},
),
Tool(
name="modly_arrange_mesh",
description=(
"Reposition a mesh in one call: auto_orient (lay flat), normalize_scale "
"(resize), recenter (centre on origin), drop_to_ground (rest on ground). "
"Steps always run in that order. Writes a new mesh file."
),
inputSchema={
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Workspace-relative path to the mesh (e.g. 'Default/mesh.glb').",
},
"steps": {
"type": "array",
"items": {
"type": "string",
"enum": ["auto_orient", "normalize_scale", "recenter", "drop_to_ground"],
},
},
"size": {"type": "number", "description": "normalize_scale: target size in `unit`."},
"unit": {"type": "string", "enum": ["m", "cm", "mm"]},
"dimension": {"type": "string", "enum": ["longest", "x", "y", "z"]},
},
"required": ["path", "steps"],
},
),
Tool(
name="modly_decimate_mesh",
description="Reduce the polygon count of a mesh using quadric edge collapse decimation.",
Expand Down Expand Up @@ -217,6 +298,34 @@ async def _dispatch(client: httpx.AsyncClient, name: str, args: dict) -> str:
parts.append(f"Error: {s['error']}")
return " | ".join(parts)

elif name in ("modly_inspect_mesh", "modly_suggest_fixes"):
op = name.removeprefix("modly_")
r = await client.post(f"{API_BASE}/optimize/op/{op}", json={"path": args["path"]})
r.raise_for_status()
return json.dumps(r.json(), indent=2)

elif name == "modly_repair_mesh":
params = {} if args.get("fill_holes") is None else {"fill_holes": bool(args["fill_holes"])}
r = await client.post(
f"{API_BASE}/optimize/op/repair_mesh",
json={"path": args["path"], "params": params},
)
r.raise_for_status()
return json.dumps(r.json(), indent=2)

elif name == "modly_arrange_mesh":
scale = {k: args[k] for k in ("size", "unit", "dimension") if args.get(k) is not None}
r = await client.post(
f"{API_BASE}/optimize/arrange",
json={
"path": args["path"],
"steps": args.get("steps") or [],
"params": {"normalize_scale": scale} if scale else {},
},
)
r.raise_for_status()
return json.dumps(r.json(), indent=2)

elif name == "modly_decimate_mesh":
r = await client.post(
f"{API_BASE}/optimize/mesh",
Expand Down
3 changes: 3 additions & 0 deletions api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ mcp>=1.0.0
# Mesh processing (optimize + export endpoints)
trimesh>=4.5.0
pymeshlab>=2023.12
# trimesh's graph engine: connected parts, hole loops and vertex merging in
# inspect_mesh / repair_mesh. Optional for trimesh, so never pulled in by it.
scipy>=1.10

# Model downloads (HuggingFace)
huggingface_hub>=0.27.0
Expand Down
Loading
Loading