npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bmbrick/photo-to-lego-mosaic-skill

v2.0.2

Published

Convert any local photo into a LEGO-style brick mosaic preview. MCP server + Node API powered by the BMBrick color quantization engine. Renamed from @bmbrick/agent-mosaic-skill.

Downloads

74

Readme

BMBrick Photo-to-LEGO-Mosaic Skill

npm version License

Convert any local photo into a LEGO-style brick mosaic preview — directly from your AI agent.

@bmbrick/photo-to-lego-mosaic-skill is an MCP server that lets Claude, Cursor, Windsurf, and other AI agents transform local images into high-fidelity 3D brick mosaics using the same canonical engine as bmbrick.com.

Renamed from @bmbrick/agent-mosaic-skill (the old name still works but is deprecated — please migrate to the new name for future updates).

Visual Previews

Generated with the generate_lego_mosaic tool (3D render mode):

Square Tiles (square_1x1)

| Original Photo | 48x48 Preview | 64x64 Preview | | :--- | :--- | :--- | | Original | 48x48 | 64x64 |

Round Tiles (round_1x1)

| Original Photo | 48x48 Preview | 64x64 Preview | | :--- | :--- | :--- | | Original | 48x48 Round | 64x64 Round |

Quick Start

npx -y @bmbrick/photo-to-lego-mosaic-skill

MCP Client Configuration

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "lego-mosaic": {
      "command": "npx",
      "args": ["-y", "@bmbrick/photo-to-lego-mosaic-skill"]
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "lego-mosaic": {
      "command": "npx",
      "args": ["-y", "@bmbrick/photo-to-lego-mosaic-skill"]
    }
  }
}

Tool: generate_lego_mosaic

| Parameter | Type | Required | Default | Description | |-----------|------|----------|---------|-------------| | imagePath | string | Yes | — | Absolute path to a local image | | columns | number | No | 48 | Preview width in studs (max 64) | | rows | number | No | 48 | Preview height in studs (max 64) | | materialMode | string | No | square_1x1 | square_1x1 or round_1x1 | | renderMode | string | No | 3D | Render style | | removeBackground | boolean | No | false | Clean up white/transparent backgrounds |

Returns: a local watermarked PNG preview + a link to unlock the full project at bmbrick.com.

Unlock Full Project

The preview is watermarked and intended for creative exploration. To get the complete deliverables — HD unwatermarked mosaic, brick-by-brick PDF instructions, parts list with ordering links, and CSV/XML placement matrices — visit bmbrick.com.

Features

  • Same Engine as bmbrick.com — canonical color science, quantization, and 3D rendering pipeline
  • Local & Private — all processing happens on your machine via Node.js
  • Agent-Ready — ships with a SKILL.md for seamless agent workflow integration
  • 3D Render Mode — InstancedMesh PBR rendering with realistic brick studs

Engineering Docs

Deep technical reference for the color quantization pipeline that powers this skill and bmbrick.com:

  • Color quantization pipeline: principles, history, and lessons — current architecture, architectural decisions, verified principles, failed experiments from 25+ versions of iteration, and parameter sensitivity reference.

Migrating from @bmbrick/agent-mosaic-skill

If you were using the old name, the migration is one search/replace:

  1. Package name: @bmbrick/agent-mosaic-skill@bmbrick/photo-to-lego-mosaic-skill
  2. MCP tool name (in your agent's tool list): generate_bmbrick_mosaicgenerate_lego_mosaic
  3. Binary name (rare): agent-mosaic-skillphoto-to-lego-mosaic-skill

The tool parameters (imagePath, columns, rows, etc.) and return shape are unchanged.

Development

License

Dual-licensed:

  • MIT — MCP wrapper, skill/ directory, agent integration surface
  • Restricteddist/ engine files: free to use and distribute as-is, but no de-obfuscation, reverse engineering, or redistribution of modified versions

See LICENSE for full terms.