{"_id":"@bmbrick/photo-to-lego-mosaic-skill","_rev":"3-8e116663e0e7a5639d3df628ce6b265c","name":"@bmbrick/photo-to-lego-mosaic-skill","dist-tags":{"latest":"2.0.2"},"versions":{"2.0.0":{"name":"@bmbrick/photo-to-lego-mosaic-skill","version":"2.0.0","keywords":["lego","mosaic","photo-to-lego","lego-mosaic","mcp","mcp-server","model-context-protocol","agent-skill","bmbrick","pixel-art","image-processing","bricks","lego-art"],"author":{"name":"BMBrick"},"license":"SEE LICENSE IN LICENSE","_id":"@bmbrick/photo-to-lego-mosaic-skill@2.0.0","maintainers":[{"name":"ripable","email":"A659120996@gmail.com"}],"homepage":"https://github.com/Able-rip/agent-mosaic-skill#readme","bugs":{"url":"https://github.com/Able-rip/agent-mosaic-skill/issues"},"bin":{"photo-to-lego-mosaic-skill":"dist/mcp-server.js"},"dist":{"shasum":"039d0b2a735c0548f6df17057c57d433be1ab1ab","tarball":"https://registry.npmjs.org/@bmbrick/photo-to-lego-mosaic-skill/-/photo-to-lego-mosaic-skill-2.0.0.tgz","fileCount":12,"integrity":"sha512-S9YbuzK1gzzeQCFa7UHky0/dH+RdQ5b5f9LZYZUBWNKcZLS6CtmlYz0gYAX8FtJuicO5fi9Z7SjrURcHxhNzFQ==","signatures":[{"sig":"MEUCIBExPp/dQuAN8NboWp6VibZSSpi7mJQvQxMbrqBAJa7aAiEA5QpTxoJyrC7SOuYmGznUdjgj7TBwlbBcuBuHJ7jHX8I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6321173},"main":"./dist/index.js","type":"module","exports":{".":"./dist/index.js","./mcp":"./dist/mcp-server.js"},"gitHead":"2d8684f025615f0224c502223cdc7189a422f4ef","mcpName":"io.github.Able-rip/photo-to-lego-mosaic-skill","scripts":{"test":"npm run build && node --test test/*.test.mjs","build":"node scripts/build.js","smoke":"node test/smoke.mjs","prepack":"npm test","sync:core":"node scripts/sync-core.js"},"_npmUser":{"name":"ripable","email":"A659120996@gmail.com"},"repository":{"url":"git+https://github.com/Able-rip/agent-mosaic-skill.git","type":"git"},"_npmVersion":"11.9.0","description":"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.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"sharp":"^0.34.5","canvas":"^3.2.3","javascript-obfuscator":"^5.4.2","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/photo-to-lego-mosaic-skill_2.0.0_1779612489699_0.495863250459482","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"name":"@bmbrick/photo-to-lego-mosaic-skill","version":"2.0.1","keywords":["lego","mosaic","photo-to-lego","lego-mosaic","mcp","mcp-server","model-context-protocol","agent-skill","bmbrick","pixel-art","image-processing","bricks","lego-art"],"author":{"name":"BMBrick"},"license":"SEE LICENSE IN LICENSE","_id":"@bmbrick/photo-to-lego-mosaic-skill@2.0.1","maintainers":[{"name":"ripable","email":"A659120996@gmail.com"}],"homepage":"https://github.com/Able-rip/agent-mosaic-skill#readme","bugs":{"url":"https://github.com/Able-rip/agent-mosaic-skill/issues"},"bin":{"photo-to-lego-mosaic-skill":"dist/mcp-server.js"},"dist":{"shasum":"1a6328905481b6fdd3317a4b35b7ae627e0d52c1","tarball":"https://registry.npmjs.org/@bmbrick/photo-to-lego-mosaic-skill/-/photo-to-lego-mosaic-skill-2.0.1.tgz","fileCount":12,"integrity":"sha512-cpwV2/wSCWQjexyBf2nEKHadz0xwDiGjxNW4mgIeMmYjaVnz3Yjpe3Ez9vrLLUfcEvsMtYRd/Dk6ac7TbaPasA==","signatures":[{"sig":"MEQCIFMgIUIyir/y5mkCoteLCnlFNYyFCgVuogwPWcEwZY+NAiBTWgqiqDpYPisBMZazqDL+1QiTDKpKo4WX3N0tirt7pg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":384789},"main":"./dist/index.js","type":"module","exports":{".":"./dist/index.js","./mcp":"./dist/mcp-server.js"},"gitHead":"ea28dc123ac80dcb7154542f5e6841a8e0df01a2","mcpName":"io.github.Able-rip/photo-to-lego-mosaic-skill","scripts":{"smoke":"node test/smoke.mjs"},"_npmUser":{"name":"ripable","email":"A659120996@gmail.com"},"repository":{"url":"git+https://github.com/Able-rip/agent-mosaic-skill.git","type":"git"},"_npmVersion":"11.9.0","description":"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.","directories":{},"_nodeVersion":"24.14.0","dependencies":{"sharp":"^0.34.5","canvas":"^3.2.3","javascript-obfuscator":"^5.4.2","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/photo-to-lego-mosaic-skill_2.0.1_1779641699313_0.763573802278539","host":"s3://npm-registry-packages-npm-production"}},"2.0.2":{"name":"@bmbrick/photo-to-lego-mosaic-skill","mcpName":"io.github.Able-rip/photo-to-lego-mosaic-skill","version":"2.0.2","description":"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.","repository":{"type":"git","url":"git+https://github.com/Able-rip/agent-mosaic-skill.git"},"main":"./dist/index.js","exports":{".":"./dist/index.js","./mcp":"./dist/mcp-server.js"},"bin":{"photo-to-lego-mosaic-skill":"dist/mcp-server.js"},"scripts":{"smoke":"node test/smoke.mjs"},"publishConfig":{"access":"public"},"keywords":["lego","mosaic","photo-to-lego","lego-mosaic","mcp","mcp-server","model-context-protocol","agent-skill","bmbrick","pixel-art","image-processing","bricks","lego-art"],"author":{"name":"BMBrick"},"license":"SEE LICENSE IN LICENSE","type":"module","dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","canvas":"^3.2.3","javascript-obfuscator":"^5.4.2","sharp":"^0.34.5"},"gitHead":"090d04aaa8309cb45232868095710c1b520504e4","_id":"@bmbrick/photo-to-lego-mosaic-skill@2.0.2","bugs":{"url":"https://github.com/Able-rip/agent-mosaic-skill/issues"},"homepage":"https://github.com/Able-rip/agent-mosaic-skill#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-oQVRsunpAZrlWG1xrmoQenPvU6lUEuY2BZn9+XY6EP6TQl7RGbCNsyAm7Pd0dGclQ4xOmrWqZnQ57kkswbBQJg==","shasum":"5219ef01e1ec6850f8505b7e1d8574b05fc03615","tarball":"https://registry.npmjs.org/@bmbrick/photo-to-lego-mosaic-skill/-/photo-to-lego-mosaic-skill-2.0.2.tgz","fileCount":13,"unpackedSize":386976,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDZ9ibrDLshEmKPMFOzMHKJvxwbYSbSSbnvDCRueq1rLAiBoUh6rolOUdYpt2h6d/ttTkIx7uosPqgCWWOmy4BpsDw=="}]},"_npmUser":{"name":"ripable","email":"A659120996@gmail.com"},"directories":{},"maintainers":[{"name":"ripable","email":"A659120996@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/photo-to-lego-mosaic-skill_2.0.2_1779644591760_0.7746567815133745"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-24T08:48:09.542Z","modified":"2026-05-24T17:43:12.058Z","2.0.0":"2026-05-24T08:48:09.869Z","2.0.1":"2026-05-24T16:54:59.464Z","2.0.2":"2026-05-24T17:43:11.930Z"},"bugs":{"url":"https://github.com/Able-rip/agent-mosaic-skill/issues"},"author":{"name":"BMBrick"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/Able-rip/agent-mosaic-skill#readme","keywords":["lego","mosaic","photo-to-lego","lego-mosaic","mcp","mcp-server","model-context-protocol","agent-skill","bmbrick","pixel-art","image-processing","bricks","lego-art"],"repository":{"type":"git","url":"git+https://github.com/Able-rip/agent-mosaic-skill.git"},"description":"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.","maintainers":[{"name":"ripable","email":"A659120996@gmail.com"}],"readme":"# BMBrick Photo-to-LEGO-Mosaic Skill\n\n[![npm version](https://img.shields.io/npm/v/@bmbrick/photo-to-lego-mosaic-skill)](https://www.npmjs.com/package/@bmbrick/photo-to-lego-mosaic-skill)\n[![License](https://img.shields.io/badge/license-MIT%20%2B%20Restricted-blue)](#license)\n\nConvert any local photo into a LEGO-style brick mosaic preview — directly from your AI agent.\n\n`@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](https://bmbrick.com).\n\n> **Renamed from `@bmbrick/agent-mosaic-skill`** (the old name still works but is deprecated — please migrate to the new name for future updates).\n\n## Visual Previews\n\nGenerated with the `generate_lego_mosaic` tool (3D render mode):\n\n**Square Tiles (`square_1x1`)**\n\n| Original Photo | 48x48 Preview | 64x64 Preview |\n| :--- | :--- | :--- |\n| ![Original](https://raw.githubusercontent.com/Able-rip/agent-mosaic-skill/main/assets/cat_original_photo.png) | ![48x48](https://raw.githubusercontent.com/Able-rip/agent-mosaic-skill/main/assets/cat_mosaic_preview.png) | ![64x64](https://raw.githubusercontent.com/Able-rip/agent-mosaic-skill/main/assets/cat_mosaic_64x64.png) |\n\n**Round Tiles (`round_1x1`)**\n\n| Original Photo | 48x48 Preview | 64x64 Preview |\n| :--- | :--- | :--- |\n| ![Original](https://raw.githubusercontent.com/Able-rip/agent-mosaic-skill/main/assets/cat_original_photo.png) | ![48x48 Round](https://raw.githubusercontent.com/Able-rip/agent-mosaic-skill/main/assets/cat_mosaic_round_48x48.png) | ![64x64 Round](https://raw.githubusercontent.com/Able-rip/agent-mosaic-skill/main/assets/cat_mosaic_round_64x64.png) |\n\n## Quick Start\n\n```bash\nnpx -y @bmbrick/photo-to-lego-mosaic-skill\n```\n\n### MCP Client Configuration\n\n**Claude Desktop** (`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"lego-mosaic\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bmbrick/photo-to-lego-mosaic-skill\"]\n    }\n  }\n}\n```\n\n**Cursor** (`.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"lego-mosaic\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bmbrick/photo-to-lego-mosaic-skill\"]\n    }\n  }\n}\n```\n\n## Tool: `generate_lego_mosaic`\n\n| Parameter | Type | Required | Default | Description |\n|-----------|------|----------|---------|-------------|\n| `imagePath` | string | Yes | — | Absolute path to a local image |\n| `columns` | number | No | 48 | Preview width in studs (max 64) |\n| `rows` | number | No | 48 | Preview height in studs (max 64) |\n| `materialMode` | string | No | `square_1x1` | `square_1x1` or `round_1x1` |\n| `renderMode` | string | No | `3D` | Render style |\n| `removeBackground` | boolean | No | false | Clean up white/transparent backgrounds |\n\nReturns: a local watermarked PNG preview + a link to unlock the full project at [bmbrick.com](https://bmbrick.com).\n\n## Unlock Full Project\n\nThe 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](https://bmbrick.com).\n\n## Features\n\n- **Same Engine as bmbrick.com** — canonical color science, quantization, and 3D rendering pipeline\n- **Local & Private** — all processing happens on your machine via Node.js\n- **Agent-Ready** — ships with a `SKILL.md` for seamless agent workflow integration\n- **3D Render Mode** — InstancedMesh PBR rendering with realistic brick studs\n\n## Engineering Docs\n\nDeep technical reference for the color quantization pipeline that powers this skill and [bmbrick.com](https://www.bmbrick.com):\n\n- **Color quantization pipeline: principles, history, and lessons** — current architecture, architectural decisions, verified principles, failed experiments from 25+ versions of iteration, and parameter sensitivity reference.\n  - 🇬🇧 [English](./docs/color-pipeline.md)\n  - 🇨🇳 [中文](./docs/color-pipeline.zh-CN.md)\n\n## Migrating from `@bmbrick/agent-mosaic-skill`\n\nIf you were using the old name, the migration is one search/replace:\n\n1. **Package name:** `@bmbrick/agent-mosaic-skill` → `@bmbrick/photo-to-lego-mosaic-skill`\n2. **MCP tool name** (in your agent's tool list): `generate_bmbrick_mosaic` → `generate_lego_mosaic`\n3. **Binary name** (rare): `agent-mosaic-skill` → `photo-to-lego-mosaic-skill`\n\nThe tool parameters (imagePath, columns, rows, etc.) and return shape are unchanged.\n\n## Development\n\n## License\n\nDual-licensed:\n\n- **MIT** — MCP wrapper, `skill/` directory, agent integration surface\n- **Restricted** — `dist/` engine files: free to use and distribute as-is, but no de-obfuscation, reverse engineering, or redistribution of modified versions\n\nSee [LICENSE](LICENSE) for full terms.\n","readmeFilename":"README.md"}