# Mesh2cad

> Mesh2cad is an open-source MCP server for design and media. Turn simple STL, OBJ or PLY mechanical parts into editable STEP and CAD scripts. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/emirmrkaljevic/mesh2cad
- **GitHub stars:** 180
- **License:** MIT
- **MCP Registry name:** io.github.emirmrkaljevic/mesh2cad
- **Categories:** [design and media](https://ai-powered.com/categories/design-and-media), [manufacturing](https://ai-powered.com/categories/manufacturing)
- **Listing updated:** 2026-12-01

## About

mesh2cad fits planes, cylinders, spheres, cones and constant-radius rounds to a mesh, so a hole becomes one cylindrical face in the STEP file instead of a ring of triangles. It also writes CadQuery, OpenSCAD and FreeCAD scripts that share parameter names such as hole_1_d, which you can change and rebuild from the command line without touching the rest of the file.

It targets plates, brackets and boxes with holes, bolt circles, slots, bosses and fillets. Organic shapes, scans and free-form surfaces are out of scope. When a fit is poor the STEP output falls back to a valid faceted solid, and a script is refused (exit code 2) if its deviation exceeds max(4 times the tolerance, 0.1 mm) or volume error exceeds 1%. The fit runs locally and nothing is uploaded.

Install with pip, add the mcp extra, and start the server with mesh2cad mcp. An optional report gives Hausdorff and RMS deviation, volume error, face types and the fit method.

## Features

- **Exact STEP output:** Fitted faces stay selectable in CAD tools.
- **Script generation:** Writes CadQuery, OpenSCAD and FreeCAD files.
- **Named parameters:** Change a dimension and rebuild the part.
- **Fidelity report:** Reports deviation, volume error and fit method.
- **Local processing:** The mesh is never uploaded.
- **Refuses poor fits:** Won't write a script that misses its check.

## Good for

- Convert an STL bracket into a STEP file for CAD
- Change a hole diameter in a printed part and re-export
- Make a Thingiverse-style OpenSCAD customizer from a mesh
- Check how close a converted solid is to the original mesh

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add mesh2cad -- uvx mesh2cad
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mesh2cad -- uvx mesh2cad
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mesh2cad]
command = "uvx"
args = ["mesh2cad"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user mesh2cad uvx -- mesh2cad

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mesh2cad": {
      "command": "uvx",
      "args": [
        "mesh2cad"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 of 8 tools changes data; 5 names don't say. From the server's own tool labels and tool names; not verified by us.

- `convert`: Converts a mesh to CAD output.
- `analyze` (name suggests: reads): Analyzes a mesh.
- `report`: Produces a fidelity report.
- `to_cadquery`: Writes a CadQuery script.
- `to_openscad`: Writes an OpenSCAD script.
- `to_freecad`: Writes a FreeCAD macro.
- `list_params` (name suggests: reads): Lists named parameters in a script.
- `edit_params` (name suggests: changes): Edits parameters and rebuilds.

## FAQ

### Which mesh formats work?

STL, OBJ and PLY.

### What parts does Mesh2cad handle well?

Simple mechanical parts such as plates, brackets and boxes with holes, slots, bosses and fillets.

### What happens with a poor fit?

STEP falls back to a faceted solid and the report says so; scripts are refused with exit code 2.

### What licence is Mesh2cad under?

MIT.

### Is Mesh2cad free?

Yes. Mesh2cad is open source, so you can use and self-host it for free.

### How do I add Mesh2cad to Claude Code?

Run this command in your terminal: claude mcp add mesh2cad -- uvx mesh2cad

### What are the best alternatives to Mesh2cad?

The closest alternatives to Mesh2cad are HyperFrames by HeyGen, mcp-for-blender, AutoClip, ffmpeg-skill and next-ai-draw-io.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [HyperFrames by HeyGen](https://ai-powered.com/mcp/hyperframes-by-heygen): HyperFrames by HeyGen is a freemium MCP server for design and media.
- [mcp-for-blender](https://ai-powered.com/mcp/mcp-for-blender): mcp-for-blender is an open-source MCP server for design and media.
- [AutoClip](https://ai-powered.com/mcp/autoclip): AutoClip is an open-source MCP server for design and media.
- [ffmpeg-skill](https://ai-powered.com/mcp/ffmpeg-skill): ffmpeg-skill is an open-source MCP server for design and media.
- [next-ai-draw-io](https://ai-powered.com/mcp/next-ai-draw-io-2): next-ai-draw-io is an open-source MCP server for ai models and llm tooling.
- [Dembrandt](https://ai-powered.com/mcp/dembrandt): Dembrandt is an open-source MCP server for design and media.
- [cursor-talk-to-figma-mcp](https://ai-powered.com/mcp/cursor-talk-to-figma-mcp): cursor-talk-to-figma-mcp is an open-source MCP server for design and media.
- [Appllama](https://ai-powered.com/mcp/appllama): Appllama is a freemium MCP server for design and media.

---
Source: https://ai-powered.com/mcp/mesh2cad
