
mcp
com.layergrab/mcp
Split flat PNG/JPG images into up to 16 named transparent layers over an inpainted background.
Documentation
LayerGrab plugins & MCP server
Source code of the LayerGrab plugins for Figma, Sketch and Chrome, the official Model Context Protocol (MCP) server (layergrab-mcp), and the shared client library they use: a Figma plugin that splits an image into editable layers, a Sketch plugin that does the same in Sketch, a Chrome extension that splits any image on the web into layers in a side panel, and an MCP server for Claude Desktop, Cursor and Windsurf.
LayerGrab is an AI image layer separation tool that splits an image into editable layers: up to 16 separate transparent layers, one per element, each named, with the background behind them filled in, or just the single object you name.
- Web app & sample playground: layergrab.com
- Verified facts, benchmarks & limits: layergrab.com/ai-info · layergrab.com/compare
- Adobe Photoshop: Adobe Creative Cloud Marketplace · layergrab.com/plugin-for-photoshop
- Figma: Figma Community · layergrab.com/figma-plugin
- Chrome: Chrome Web Store · layergrab.com/chrome-extension
- Sketch: layergrab.com/sketch-plugin
- Remote Streamable HTTP MCP:
https://layergrab.com/api/mcp(com.layergrab/mcp· npm:layergrab-mcp)
Published so that reviewers and users can read what the plugins and MCP server do. Issues and pull requests are welcome; the UXP plugin for Adobe Photoshop is distributed via the Adobe Creative Cloud Marketplace.
What is here
packages/core/ Shared CommonJS client: sign-in (device flow), account, split, unlock, result mapping
packages/mcp/ Official layergrab-mcp stdio server for Claude Desktop, Cursor and Windsurf
plugins/figma/ Figma plugin: src/code.js (main thread), ui.html (panel), manifest.json
plugins/sketch/ Sketch plugin (skpm): src/split.js (command), account/panel/profile, manifest.json
plugins/chrome/ Chrome extension (Manifest V3): side panel, context menu, background worker
scripts/ Syncs packages/core/hub.js into plugins/chrome/lib and packages/mcp/lib
packages/core/hub.js talks to api.layergrab.com. It is plain CommonJS with no design-tool APIs, so the same file runs in Figma's plugin sandbox, in Sketch's CocoaScript runtime, in a Chrome extension, in Photoshop's UXP runtime and under Node for the MCP server and tests. The app key in it is a public identifier, not a secret; a user's own key is only ever issued to that user after they approve the connection in their browser.
How sign-in works
The plugins and MCP server never see a password. Each client asks LayerGrab for a short one-time code, opens layergrab.com/account/connect?code=… in the browser, and polls until the user has signed in with Google there and clicked Approve. The key it receives is stored locally (figma.clientStorage, Sketch's Settings, chrome.storage.local, or ~/.config/layergrab/mcp-credentials.json) and can be revoked from the account page at any time.
Build and run
Requires Node 20+ and pnpm.
pnpm install:all # packages/core, plugins/figma and plugins/sketch
pnpm test # core + MCP unit tests against a scripted fake of the API
pnpm build # syncs core and bundles the Figma and Sketch plugins
- Figma: in the desktop app,
Plugins › Development › Import plugin from manifest…and pickplugins/figma/manifest.json, then run it from the Development menu. - Sketch:
pnpm -C plugins/sketch buildwritesplugins/sketch/layergrab.sketchplugin; double-click it to install, then runPlugins › LayerGrab. Updates come from the appcast in its manifest. - Chrome: open
chrome://extensions, turn on Developer mode, Load unpacked, chooseplugins/chrome. - MCP (
packages/mcp): runnpx -y layergrab-mcp(seepackages/mcp/README.mdfor localstdioconfiguration), or connect directly to the stateless Streamable HTTP endpointhttps://layergrab.com/api/mcp.
All clients share one LayerGrab account and credit balance. Every account's first One layer split in the plugins or the Chrome extension is free (one named element on its own transparent layer, with the gap behind it filled in); after that, splits are charged per layer returned, and any result your balance cannot cover is previewed locked at $0 until unlocked.
Licence
MIT, see LICENSE. Vendored decoders in packages/core/vendor keep their own licences (jpeg-js, pako, UPNG).
layergrab-mcpnpm install layergrab-mcp