# Loupe — Code-CAD & PCB Review Pipeline

> Loupe — Code-CAD & PCB Review Pipeline is an open-source MCP server for 3d printing. Code-CAD and PCB review scripts that check 3D models and boards before printing or fabbing. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, macOS, Linux, Windows
- **Website:** https://charlesbine.com/projects/loupe/
- **Repository:** https://github.com/charlesbine/loupe
- **MCP Registry name:** io.github.charlesbine/loupe
- **Categories:** [3d printing](https://ai-powered.com/categories/3d-printing)
- **Listing updated:** 2026-11-23

## About

Loupe turns parametric CAD and KiCad board scripts into something that can be verified before any filament or fab order is spent. Models are written in Python with build123d or CadQuery, and deterministic checks look for collisions, thin walls, watertightness and drift from a dimension record.

Rendering is part of the review loop: labeled contact sheets with cross-sections and red-painted interference regions, plus a self-contained browser viewer with clip planes and exploded views. Each step is a standalone uv script with inline dependencies, so there is no environment to manage.

The PCB side declares parts, nets and routes in code, runs headless KiCad 10 design-rule checks, and produces Gerber, BOM and position files for JLCPCB. A seven-tool MCP server lets AI coding agents run the same checks and receive rendered images inline.

## Features

- **Geometry assertions:** Exact boolean overlap, clearance, wall-thickness and watertightness checks that exit nonzero when a fact fails.
- **Dimension draft records:** YAML files record named dimensions and their sources, and flag exported meshes that drift from the plan.
- **Labeled contact sheets:** Multi-view renders with captioned camera positions and automatic highlighting of part-to-part overlaps.
- **Browser viewer:** Single-file HTML viewer with orbit, exploded view, millimetre grid and solid section caps.
- **KiCad board checks:** Headless DRC gate covering violations, unrouted nets and unconnected pads, plus a fab profile for JLCPCB.
- **Fabrication output:** Exports Gerber and drill files, BOM and position data, STEP, and an STL that matches the enclosure.

## Good for

- Catch interference between printed enclosure parts before printing
- Verify a model still matches its drafted dimensions after edits
- Give an AI coding agent rendered views it can inspect in the same turn
- Run design-rule checks on a KiCad board before ordering from a fab
- Prepare Gerber and assembly files for JLCPCB from scripted boards

## Install

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

```sh
claude mcp add loupe -- uvx loupe-cad
```

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": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "loupe": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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 loupe -- uvx loupe-cad
```

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

```toml
[mcp_servers.loupe]
command = "uvx"
args = ["loupe-cad"]
```

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

```json
{
  "mcpServers": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user loupe uvx -- loupe-cad

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

```json
{
  "mcpServers": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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

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

```json
{
  "mcpServers": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

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": {
    "loupe": {
      "command": "uvx",
      "args": [
        "loupe-cad"
      ]
    }
  }
}
```

## Tools

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

- `draft_check` (name suggests: reads): Assert a draft dimension record and optionally an exported STL against it.
- `draft_sheet`: Render a dimensioned drawing and dimension table from a draft, returned inline as PNG.
- `check` (name suggests: reads): Run geometry assertions on STL files, including interference, clearance and wall thickness.
- `sheet`: Render a labeled contact sheet of meshes with slices and interference highlighting, returned inline as PNG.
- `slice`: Run a headless Bambu Studio slice to report print time, filament use and cost.
- `project_status` (name suggests: reads): Report the state of a loupe.json project's build, check and review stages.
- `project_run` (name suggests: changes): Run a stage of a loupe.json project workflow.

## FAQ

### How is Loupe installed?

It runs as single-file uv scripts with inline dependencies, so there is no pip install or virtualenv. The MCP server can be added with claude mcp add loupe -- uvx loupe-cad.

### Does Loupe — Code-CAD & PCB Review Pipeline generate CAD models from text prompts?

No. Models are written as parametric Python code using build123d or CadQuery, and Loupe checks and renders the result.

### Does the PCB side include autorouting?

No. Routing is defined explicitly as polylines in code, and an experimental bridge to Freerouting exists only for two-layer rectangular boards.

### Which licence does Loupe — Code-CAD & PCB Review Pipeline use?

The repository is licensed under Apache-2.0.

### Is Loupe — Code-CAD & PCB Review Pipeline free?

Yes. Loupe — Code-CAD & PCB Review Pipeline is open source, so you can use and self-host it for free.

### How do I add Loupe — Code-CAD & PCB Review Pipeline to Claude Code?

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

### What are the best alternatives to Loupe — Code-CAD & PCB Review Pipeline?

The closest alternatives to Loupe — Code-CAD & PCB Review Pipeline are cadloop OpenSCAD and cadloop Slicer.

## Where this comes from

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

## Alternatives

- [cadloop OpenSCAD](https://ai-powered.com/mcp/cadloop-openscad): cadloop OpenSCAD is an open-source MCP server for 3d printing.
- [cadloop Slicer](https://ai-powered.com/mcp/cadloop-slicer): cadloop Slicer is an open-source MCP server for 3d printing.

---
Source: https://ai-powered.com/mcp/loupe-code-cad-and-pcb-review-pipeline
