MeshMend

io.github.Keith-CY由 GitHub 帳號 Keith-CY 發布v0.1.0更新於 Oct 30, 2026

Check and repair STL and 3MF meshes on your own computer: holes, flipped faces, inside-out shells.

已驗證STDIO僅桌面檔案與儲存媒體與設計

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助手在你自己的電腦上檢查並修復 STL 與 3MF 網格,回報孔洞、翻轉面片與內外翻轉的殼體。

可以做什麼
  • 檢查網格檔案,回報尺寸、三角面與殼體數量、各類缺陷及數量,並給出自動修復是否有效的判斷
  • 修復網格:移除重複面與零面積面、統一面片繞向、把內外翻轉的殼體翻正,並可依需求封補平面孔洞
  • 把 3MF 檔案轉換為以公釐為單位的二進位 STL,套用建構變換與單位
  • 以可讀文字與結構化 JSON 回傳結果,並在原檔旁寫出修復或轉換後的副本而不覆蓋原檔
適用情境
適合處理 3D 列印檔案時使用:讓助手說明切片軟體為何拒絕某個模型、自動修復是否可能奏效,或從 STL、3MF 檔案產生清理後的 STL 副本。
執行需求
以本機 stdio 程序執行;需要 Node.js 18+(npx),從 GitHub 原始碼安裝時還需 git,或使用 Claude Desktop 的一鍵安裝包。不需要帳號、API 金鑰或網路存取。請向助手提供絕對檔案路徑。
安裝前請注意
它會讀寫你電腦上的檔案,只對打算處理的檔案使用;修復與轉換結果寫在輸入檔旁,僅在啟用覆寫時取代既有檔案。結果(含檔案路徑與計數)會作為工具輸出被你的 AI 助手看到,受該助手自身隱私條款約束。檔案上限為 30 MiB 與 25 萬個三角面,修復後也不保證模型可列印。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MeshMend,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[MeshMend]

MeshMend — MCP server

English · 中文

Check and repair 3D-printing meshes (STL and 3MF) from an AI assistant that can run tools on your computer: Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Codex CLI, Gemini CLI or any other MCP client that starts local servers.

Ask “is ~/prints/bracket.stl watertight?”, “why does my slicer say this model has holes?” or “把这个 3MF 转成 STL”: the assistant reads the file on your machine, tells you exactly what is wrong (holes, flipped faces, inside-out shells, non-manifold edges, duplicate triangles), says honestly whether an automatic repair will fix it, and writes a repaired copy next to the original.

Your files never leave your computer. The server runs locally, reads and writes only the files you name, makes no network requests and has no telemetry. The original file is never overwritten. It is the same mesh code as the free in-browser tool at mesh-mend.pages.dev.

sh
npx -y github:Keith-CY/meshmend-mcp

Status: version 0.1.0, on npm as meshmend-mcp: npx -y meshmend-mcp (needs Node.js 18+). npx -y github:Keith-CY/meshmend-mcp (also needs git) runs the same build, and Claude Desktop users can install the one-click bundle from Releases.

Tools

ToolInputWhat it does
check_meshpath, unit? (mm/cm/in, STL only), item? (3MF build item)Reports size in mm, triangles, shells and every problem with its count, plus a verdict from a trial repair in memory: ok, repairable, partly_repairable or needs_manual_review. Read-only.
repair_meshpath, fill_holes? (default false), max_hole_span_mm? (default 20), output_path?, unit?, item?, overwrite?Removes duplicate and zero-area faces, makes face winding consistent, turns inside-out shells outward and, if asked, caps flat holes. Writes a binary STL in millimetres and reports before and after.
convert_3mf_to_stlpath, item?, output_path?, overwrite?3MF to binary STL in millimetres, with build transforms and units applied and the geometry unchanged.

Every result comes as readable text and as structured JSON (structuredContent, with an outputSchema). check_mesh is marked read-only; the other two only create new files (destructiveHint: false).

Where results go: next to the input, as <name>.repaired.stl (or <name>.stl for a conversion), then -2, -3, … rather than replacing anything. With output_path, an existing file is replaced only with overwrite: true, and the input file can never be the output.

Connect it

Claude Desktop

One click: download meshmend-mcp-0.1.0.mcpb from Releases and open it (or Settings → Extensions → Advanced settings → Install extension…). Claude Desktop runs it with its built-in Node.js.

Or by hand: Settings → Developer → Edit config and add to claude_desktop_config.json:

json
{  "mcpServers": {    "meshmend": {      "command": "npx",      "args": ["-y", "github:Keith-CY/meshmend-mcp"]    }  }}

Claude Code

sh
claude mcp add meshmend -- npx -y github:Keith-CY/meshmend-mcp

Cursor

~/.cursor/mcp.json (or .cursor/mcp.json in a project):

json
{  "mcpServers": {    "meshmend": { "command": "npx", "args": ["-y", "github:Keith-CY/meshmend-mcp"] }  }}

VS Code (GitHub Copilot)

.vscode/mcp.json:

json
{  "servers": {    "meshmend": { "type": "stdio", "command": "npx", "args": ["-y", "github:Keith-CY/meshmend-mcp"] }  }}

Windsurf

~/.codeium/windsurf/mcp_config.json: the same mcpServers block as Cursor.

Codex CLI

~/.codex/config.toml:

toml
[mcp_servers.meshmend]command = "npx"args = ["-y", "github:Keith-CY/meshmend-mcp"]

Gemini CLI

~/.gemini/settings.json:

json
{ "mcpServers": { "meshmend": { "command": "npx", "args": ["-y", "github:Keith-CY/meshmend-mcp"] } } }

Any other client

Any MCP client that starts local (stdio) servers can run npx -y github:Keith-CY/meshmend-mcp, or node /path/to/meshmend-mcp/dist/meshmend-mcp.js from a checkout (the file has no dependencies). Ready-made files are in examples/clients/.

Give the assistant absolute paths (~ is expanded). Relative paths are resolved from the server’s working directory, which in desktop apps is often not your project folder.

Real files, before and after

From this repository’s tests and a local run (npm test repeats all but the bunny and the sphere):

FileWhat check_mesh foundVerdictAfter repair_mesh
MeshMend’s sample block, 30 × 24 × 24 mm, 19 triangles (missing-patch.stl)1 hole (4 open edges), 3 winding conflicts, 1 duplicate facerepairable (with fill_holes)Closed: duplicate removed, orientation fixed, the 10 × 8 mm hole capped with 2 triangles; 20 triangles
multibody.stl from trimesh, 32 triangles2 inside-out shells, 12 winding conflictsrepairableClosed and outward
The Utah teapot (teapot.stl), 894 triangles6 open boundaries (64 open edges), 1 non-manifold vertexneeds manual reviewUnchanged, and it says why: the holes are curved and the non-manifold vertex needs a decision
A CAD export (featuretype.STL), 3,476 triangles16 open seams (576 open edges)needs manual reviewUnchanged: surfaces whose vertices don’t match exactly, and MeshMend never welds nearby vertices
The Stanford bunny (bun_zipper.ply as STL, scaled to 156 mm; not included)5 open boundaries (223 open edges) in its base, 69,451 trianglesneeds manual reviewUnchanged even with a 200 mm span: the scan holes aren’t flat
A generated 100 mm sphere, 247,499 triangles, 3 holes and 249 flipped faces3 open boundaries (13 open edges), 744 winding conflictspartly repairableOrientation fixed and 1 flat hole capped; 2 curved holes left for review. About 10 s

What it fixes, and what it doesn’t

It fixes:

  • duplicate faces and zero-area (degenerate) faces;
  • inconsistent face winding (flipped normals) across ordinary shared edges;
  • closed shells that are inside out, when they don’t overlap other shells;
  • with fill_holes: true: simple flat holes (3–128 boundary vertices) whose bounding-box diagonal is within max_hole_span_mm.

It does not:

  • weld nearby vertices (only exactly equal coordinates are joined), so it can’t close seams between surfaces;
  • split non-manifold edges or vertices, remesh, or rebuild a solid;
  • repair self-intersections, union overlapping parts, or check wall thickness, overhangs or supports;
  • cap curved holes, nested openings or holes wider than the span;
  • guarantee that a model prints. Open the result in your slicer.

Because some openings are intentional, hole filling is off unless asked for. check_mesh runs the repair in memory first, so its verdict says whether repair_mesh will actually help before anything is written.

Limits: 30 MiB per file and 250,000 triangles (the same as the website). 3MF: the primary build, components, transforms, production-extension part references and units; ZIP64, unsupported required extensions, mixed units across parts and G-code-only packages are refused with an explanation. Colours, materials and print settings are not carried into STL.

Privacy

MeshMend’s MCP server works only on your computer. It reads the files you or your assistant name and writes new STL files; it sends nothing anywhere, has no analytics or telemetry, and keeps no logs. Your AI assistant sees the tool results (counts, sizes, file paths and messages) like any other tool output, under that assistant’s own privacy terms.

Development

sh
npm installnpm test            # builds dist/ and runs the core, file and end-to-end tests (needs Bun)npm run pack:mcpb   # builds the Claude Desktop bundle into build/node scripts/call.mjs check_mesh '{"path":"tests/fixtures/missing-patch.stl"}'

src/core/ is MeshMend’s mesh code, copied unchanged from the website so both give the same answers. dist/meshmend-mcp.js is a single bundled file (committed, so npx github: needs no build step); NOTICE lists the bundled packages and their licences.

Licence

MIT. The three trimesh test files are MIT-licensed by their authors (details).

The in-browser version, with a 3D preview and before/after comparison: mesh-mend.pages.dev.

來源:README.md,提交 c0df49a

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Oct 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分