{"_id":"@bilalba/fig-mcp","_rev":"5-9f68a700c5b6cb02f96c566a4c2c055d","name":"@bilalba/fig-mcp","dist-tags":{"latest":"1.1.5"},"versions":{"1.0.0":{"name":"@bilalba/fig-mcp","version":"1.0.0","keywords":["fig","mcp","model-context-protocol","kiwi"],"author":{"name":"bilal"},"license":"MIT","_id":"@bilalba/fig-mcp@1.0.0","maintainers":[{"name":"bilalba","email":"tringingly@gmail.com"}],"homepage":"https://github.com/bilalba/fig-mcp#readme","bugs":{"url":"https://github.com/bilalba/fig-mcp/issues"},"bin":{"fig-mcp":"dist/index.js"},"dist":{"shasum":"9e3615a7c7d0ffca6ec0ba985693c86b91f2cbbd","tarball":"https://registry.npmjs.org/@bilalba/fig-mcp/-/fig-mcp-1.0.0.tgz","fileCount":186,"integrity":"sha512-EOFbRKCDUFgGeALEYZTuw2/HelyJtW/Haj1E1pkOrzn5VKjCsYw/RAFf14tZlSFyyFvqxO3uh5R/XCpLYKqdZg==","signatures":[{"sig":"MEUCIQCwzhSm9Y+LWAGCfCnkSWkeRPsuavUT5KMLkfyGQFXuCgIgZmLu0e7MLgcqhyfONCC/r9rZPk+lbuHF3TYq3Ji6ulg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":816931},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"cb5c2f02c6158ccc84d61e3a89700d6112ca1901","scripts":{"dev":"tsx watch src/index.ts","test":"tsx src/test-parser.ts","build":"tsc","start":"node dist/index.js","viewer":"tsx src/web-viewer/build-client.ts && tsx src/web-viewer/server.ts","inspect":"tsx src/inspect-fig.ts","viewer:dev":"tsx src/web-viewer/build-client.ts --watch & tsx src/web-viewer/server.ts","render-node":"tsx scripts/render-node.ts","viewer:build":"tsx src/web-viewer/build-client.ts"},"_npmUser":{"name":"bilalba","email":"tringingly@gmail.com"},"repository":{"url":"git+https://github.com/bilalba/fig-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for parsing .fig files","directories":{"test":"tests"},"_nodeVersion":"24.12.0","dependencies":{"open":"^11.0.0","pako":"^2.1.0","fzstd":"^0.1.1","pdfkit":"^0.17.2","kiwi-schema":"^0.5.0","svg-to-pdfkit":"^0.1.8","@resvg/resvg-js":"^2.6.2","@modelcontextprotocol/sdk":"^1.25.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","esbuild":"^0.24.0","typescript":"^5.9.3","@types/node":"^25.0.3","@types/pako":"^2.0.4","@types/pdfkit":"^0.17.4","@types/svg-to-pdfkit":"^0.1.3"},"_npmOperationalInternal":{"tmp":"tmp/fig-mcp_1.0.0_1767515894167_0.12942883314114528","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bilalba/fig-mcp","version":"1.0.1","keywords":["fig","mcp","model-context-protocol","kiwi"],"author":{"name":"bilal"},"license":"MIT","_id":"@bilalba/fig-mcp@1.0.1","maintainers":[{"name":"bilalba","email":"tringingly@gmail.com"}],"homepage":"https://github.com/bilalba/fig-mcp#readme","bugs":{"url":"https://github.com/bilalba/fig-mcp/issues"},"bin":{"fig-mcp":"dist/index.js"},"dist":{"shasum":"7d69c86e769f6a13d194b9ccc76667643565f6bd","tarball":"https://registry.npmjs.org/@bilalba/fig-mcp/-/fig-mcp-1.0.1.tgz","fileCount":186,"integrity":"sha512-JVP2MxhlT0BqXFmUgwjhfJSW+Cs0Np7AlynAm3m1KDfZPgO0ORLRbLaPsUnDQxGy2+CZOkdUbO7z0jAfd706MA==","signatures":[{"sig":"MEUCIH4LKrCujHfoYrskAe3coV2SYzMWTtkWsC0bUttyifEwAiEAr+Bdo3rQGJQrNorptR+fJsYXtiYQ/2JUCdNzzmhoURA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":817188},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"cb5c2f02c6158ccc84d61e3a89700d6112ca1901","scripts":{"dev":"tsx watch src/index.ts","test":"tsx src/test-parser.ts","build":"tsc","start":"node dist/index.js","viewer":"tsx src/web-viewer/build-client.ts && tsx src/web-viewer/server.ts","inspect":"tsx src/inspect-fig.ts","viewer:dev":"tsx src/web-viewer/build-client.ts --watch & tsx src/web-viewer/server.ts","render-node":"tsx scripts/render-node.ts","viewer:build":"tsx src/web-viewer/build-client.ts"},"_npmUser":{"name":"bilalba","email":"tringingly@gmail.com"},"repository":{"url":"git+https://github.com/bilalba/fig-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"MCP server for parsing .fig files","directories":{"test":"tests"},"_nodeVersion":"24.12.0","dependencies":{"open":"^11.0.0","pako":"^2.1.0","fzstd":"^0.1.1","pdfkit":"^0.17.2","kiwi-schema":"^0.5.0","svg-to-pdfkit":"^0.1.8","@resvg/resvg-js":"^2.6.2","@modelcontextprotocol/sdk":"^1.25.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","esbuild":"^0.24.0","typescript":"^5.9.3","@types/node":"^25.0.3","@types/pako":"^2.0.4","@types/pdfkit":"^0.17.4","@types/svg-to-pdfkit":"^0.1.3"},"_npmOperationalInternal":{"tmp":"tmp/fig-mcp_1.0.1_1767517019193_0.5112986043123662","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@bilalba/fig-mcp","version":"1.1.2","keywords":["fig","mcp","model-context-protocol","kiwi"],"author":{"name":"bilal"},"license":"MIT","_id":"@bilalba/fig-mcp@1.1.2","maintainers":[{"name":"bilalba","email":"tringingly@gmail.com"}],"homepage":"https://github.com/bilalba/fig-mcp#readme","bugs":{"url":"https://github.com/bilalba/fig-mcp/issues"},"bin":{"fig-mcp":"dist/index.js"},"dist":{"shasum":"ebfaf09a5778eea89e4776461c20ae5107067fd1","tarball":"https://registry.npmjs.org/@bilalba/fig-mcp/-/fig-mcp-1.1.2.tgz","fileCount":127,"integrity":"sha512-hLxRxCHp8PrvKksgHRwHT33+ABIrl4VRK37qEqU+JQVXNUrN8uVtamlWPTwrnQ1090+crl4REtnKeovOICD2Tw==","signatures":[{"sig":"MEYCIQC3hWNGOPlGo3gJPQEunSQKm66yz6bSYMnct/jMerWt1gIhAK3Zwx2jUhokgZ446S+6UZTJzFtGtbksGu7bALOaNdNR","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bilalba%2ffig-mcp@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":626804},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"4640027f9d7fe2902f71f523ab09d0b240d2f480","scripts":{"dev":"tsx watch src/index.ts","test":"tsx src/test-parser.ts","build":"tsc","start":"node dist/index.js","viewer":"tsx src/web-viewer/build-client.ts && tsx src/web-viewer/server.ts","inspect":"tsx src/inspect-fig.ts","viewer:dev":"tsx src/web-viewer/build-client.ts --watch & tsx src/web-viewer/server.ts","render-node":"tsx scripts/render-node.ts","viewer:build":"tsx src/web-viewer/build-client.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fb83cb3f-4444-499a-90b2-806259a4ecc0"}},"repository":{"url":"git+https://github.com/bilalba/fig-mcp.git","type":"git"},"_npmVersion":"11.7.0","description":"MCP server for parsing .fig files","directories":{"test":"tests"},"_nodeVersion":"20.19.6","dependencies":{"open":"^11.0.0","pako":"^2.1.0","fzstd":"^0.1.1","pdfkit":"^0.17.2","kiwi-schema":"^0.5.0","svg-to-pdfkit":"^0.1.8","@resvg/resvg-js":"^2.6.2","@modelcontextprotocol/sdk":"^1.25.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","esbuild":"^0.24.0","typescript":"^5.9.3","@types/node":"^25.0.3","@types/pako":"^2.0.4","@types/pdfkit":"^0.17.4","@types/svg-to-pdfkit":"^0.1.3"},"_npmOperationalInternal":{"tmp":"tmp/fig-mcp_1.1.2_1767519445586_0.3131283519307886","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@bilalba/fig-mcp","version":"1.1.3","keywords":["fig","mcp","model-context-protocol","kiwi"],"author":{"name":"bilal"},"license":"MIT","_id":"@bilalba/fig-mcp@1.1.3","maintainers":[{"name":"bilalba","email":"tringingly@gmail.com"}],"homepage":"https://github.com/bilalba/fig-mcp#readme","bugs":{"url":"https://github.com/bilalba/fig-mcp/issues"},"bin":{"fig-mcp":"dist/index.js"},"dist":{"shasum":"b5657c0f73bfb21c90de7f157001747062278fd9","tarball":"https://registry.npmjs.org/@bilalba/fig-mcp/-/fig-mcp-1.1.3.tgz","fileCount":130,"integrity":"sha512-zHs5+H+FmRCpid/iLrnuJJ9n3p/TZuWcRL0gxg+vzjH/Ux7foxgOI+MuhTD6O7KBaoWbLY9AY9IT4X1Gp6GrtA==","signatures":[{"sig":"MEQCIFU5Tfd8PlQ+8by7mGiF5xNuziHPlFNG82HIxRZIP/kVAiAkcUUWg+i8PvDsI0gS6isUwZ7v5BQh4vO6xSxHVWkG4g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bilalba%2ffig-mcp@1.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":655498},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"d8baf2e231d3dbfe5aaaec02f186ac4d9eefd71b","scripts":{"dev":"tsx watch src/index.ts","test":"tsx src/test-parser.ts","build":"tsc && tsx src/web-viewer/build-client.ts","start":"node dist/index.js","viewer":"tsx src/web-viewer/build-client.ts && tsx src/web-viewer/server.ts","inspect":"tsx src/inspect-fig.ts","viewer:dev":"tsx src/web-viewer/build-client.ts --watch & tsx src/web-viewer/server.ts","render-node":"tsx scripts/render-node.ts","viewer:build":"tsx src/web-viewer/build-client.ts","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fb83cb3f-4444-499a-90b2-806259a4ecc0"}},"repository":{"url":"git+https://github.com/bilalba/fig-mcp.git","type":"git"},"_npmVersion":"11.7.0","description":"MCP server for parsing .fig files","directories":{"test":"tests"},"_nodeVersion":"20.19.6","dependencies":{"open":"^11.0.0","pako":"^2.1.0","fzstd":"^0.1.1","pdfkit":"^0.17.2","kiwi-schema":"^0.5.0","svg-to-pdfkit":"^0.1.8","@resvg/resvg-js":"^2.6.2","@modelcontextprotocol/sdk":"^1.25.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","esbuild":"^0.24.0","typescript":"^5.9.3","@types/node":"^25.0.3","@types/pako":"^2.0.4","@types/pdfkit":"^0.17.4","@types/svg-to-pdfkit":"^0.1.3"},"_npmOperationalInternal":{"tmp":"tmp/fig-mcp_1.1.3_1767642070535_0.9021685883695434","host":"s3://npm-registry-packages-npm-production"}},"1.1.5":{"name":"@bilalba/fig-mcp","version":"1.1.5","description":"MCP server for parsing .fig files","keywords":["fig","mcp","model-context-protocol","kiwi"],"homepage":"https://github.com/bilalba/fig-mcp#readme","bugs":{"url":"https://github.com/bilalba/fig-mcp/issues"},"repository":{"type":"git","url":"git+https://github.com/bilalba/fig-mcp.git"},"license":"MIT","author":{"name":"bilal"},"type":"module","main":"dist/index.js","types":"./dist/index.d.ts","bin":{"fig-mcp":"dist/index.js"},"engines":{"node":">=18"},"directories":{"test":"tests"},"scripts":{"build":"tsc && tsx src/web-viewer/build-client.ts","prepublishOnly":"npm run build","dev":"tsx watch src/index.ts","start":"node dist/index.js","test":"tsx src/test-parser.ts","inspect":"tsx src/inspect-fig.ts","render-node":"tsx scripts/render-node.ts","viewer":"tsx src/web-viewer/build-client.ts && tsx src/web-viewer/server.ts","viewer:build":"tsx src/web-viewer/build-client.ts","viewer:dev":"tsx src/web-viewer/build-client.ts --watch & tsx src/web-viewer/server.ts"},"dependencies":{"@modelcontextprotocol/sdk":"^1.25.1","@resvg/resvg-js":"^2.6.2","fzstd":"^0.1.1","kiwi-schema":"^0.5.0","open":"^11.0.0","pako":"^2.1.0","pdfkit":"^0.17.2","svg-to-pdfkit":"^0.1.8"},"devDependencies":{"@types/node":"^25.0.3","@types/pako":"^2.0.4","@types/pdfkit":"^0.17.4","@types/svg-to-pdfkit":"^0.1.3","esbuild":"^0.24.0","tsx":"^4.21.0","typescript":"^5.9.3"},"gitHead":"ed9ab259caa6588863a6de44c6a67561ddde148f","_id":"@bilalba/fig-mcp@1.1.5","_nodeVersion":"20.19.6","_npmVersion":"11.7.0","dist":{"integrity":"sha512-i8O1BZrlaIr2MJLGvu9qUiRRvV3DsE9bK0M1u+BFh797J4s8ombsMKKaGeuhH8NzituAfkqp/bLH6xEPPLdfzw==","shasum":"ec966d4f37ea2c3c62a78572f92fc21a90947505","tarball":"https://registry.npmjs.org/@bilalba/fig-mcp/-/fig-mcp-1.1.5.tgz","fileCount":134,"unpackedSize":718857,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bilalba%2ffig-mcp@1.1.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC2V2RK/iF0t4sDhuxpofEvqdNN6GS0mH3sKatXMmfeIAIgEgDVVgjnZ4qgI+UAgNSFjhol6m3e3kTMzmDZkTjSo0A="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fb83cb3f-4444-499a-90b2-806259a4ecc0"}},"maintainers":[{"name":"bilalba","email":"tringingly@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fig-mcp_1.1.5_1768078411548_0.7195038041380946"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-04T08:38:14.056Z","modified":"2026-01-10T20:53:32.086Z","1.0.0":"2026-01-04T08:38:14.349Z","1.0.1":"2026-01-04T08:56:59.434Z","1.1.2":"2026-01-04T09:37:25.736Z","1.1.3":"2026-01-05T19:41:10.691Z","1.1.5":"2026-01-10T20:53:31.719Z"},"bugs":{"url":"https://github.com/bilalba/fig-mcp/issues"},"author":{"name":"bilal"},"license":"MIT","homepage":"https://github.com/bilalba/fig-mcp#readme","keywords":["fig","mcp","model-context-protocol","kiwi"],"repository":{"type":"git","url":"git+https://github.com/bilalba/fig-mcp.git"},"description":"MCP server for parsing .fig files","maintainers":[{"name":"bilalba","email":"tringingly@gmail.com"}],"readme":"# @bilalba/fig-mcp\n\nMCP server for parsing `.fig` files. Enables AI assistants to understand and extract design information from the `.fig` file format for implementation guidance.\n\n## Installation\n\n```bash\nnpm install -g @bilalba/fig-mcp\n```\n\nOr use directly with npx:\n\n```bash\nnpx @bilalba/fig-mcp --help\n```\n\n## Quick Start\n\n### Add to Claude\n\n```bash\nclaude mcp add fig-mcp -- npx @bilalba/fig-mcp\n```\n\nThen ask Claude to parse your `.fig` files:\n\n> \"Parse my design.fig file and show me the document structure\"\n\n### Web Viewer\n\nBrowse and preview `.fig` files in your browser:\n\n```bash\nfig-mcp viewer design.fig\n# Opens http://localhost:3000\n```\n\nFeatures:\n- Tree navigation with collapsible nodes\n- SVG preview with zoom/pan\n- Node details panel\n- Copy node IDs for MCP tool calls\n\n### CLI Inspector\n\nInspect `.fig` files from the command line:\n\n```bash\nfig-mcp inspect design.fig summary  # Show document structure\nfig-mcp inspect design.fig stats    # Show node type counts\nfig-mcp inspect design.fig list     # List archive contents\nfig-mcp inspect design.fig json     # Output simplified JSON\n```\n\n## CLI Commands\n\n| Command | Description |\n|---------|-------------|\n| `fig-mcp` | Start MCP server (for AI assistants) |\n| `fig-mcp viewer <file> [port]` | Open web viewer |\n| `fig-mcp inspect <file> [cmd]` | Inspect file |\n| `fig-mcp --help` | Show help |\n| `fig-mcp --version` | Show version |\n\n## MCP Tools\n\nThe MCP server exposes the following tools for AI assistants:\n\n### Document Structure\n\n| Tool | Description |\n|------|-------------|\n| `parse_fig_file` | Parse and return simplified document structure |\n| `get_document_summary` | Text tree of document structure with pagination |\n| `get_tree_summary` | Hierarchical summary for drill-down navigation |\n| `list_pages` | List all pages (canvases) in the document |\n| `get_page_contents` | Get contents of a specific page |\n\n### Node Queries\n\n| Tool | Description |\n|------|-------------|\n| `find_nodes` | Find nodes by type or name |\n| `get_node_details` | Get details for a node by path |\n| `get_node_by_id` | Get details for a node by GUID |\n| `get_layout_info` | Get inferred layout properties |\n\n### Content Extraction\n\n| Tool | Description |\n|------|-------------|\n| `get_text_content` | Extract all text content |\n| `get_colors` | Extract unique color palette |\n| `list_nodes_with_fills` | List nodes with fill paints |\n\n### Image & Rendering\n\n| Tool | Description |\n|------|-------------|\n| `list_images` | List all images with metadata |\n| `get_image` | Get image by hash (base64) |\n| `get_thumbnail` | Get document thumbnail |\n| `render_screen` | Render node subtree as PNG |\n| `get_vector` | Export vector as SVG, PDF, PNG, or WebP |\n\n### Debugging\n\n| Tool | Description |\n|------|-------------|\n| `get_schema_info` | Kiwi schema information |\n| `get_raw_message` | Raw decoded message |\n| `list_archive_contents` | List files in the archive |\n| `clear_cache` | Clear file cache |\n\n## How It Works\n\n1. `.fig` files are ZIP archives containing:\n   - `canvas.fig` - Main document data (kiwi binary format)\n   - `meta.json` - File metadata\n   - `thumbnail.png` - Preview image\n   - `images/` - Image assets\n\n2. The `canvas.fig` uses Evan Wallace's [kiwi](https://github.com/evanw/kiwi) binary format\n\n3. The kiwi schema is embedded in each file and extracted at parse time\n\n4. Document data is decoded and transformed into structured information\n\n5. Layout properties are inferred from node positions and auto-layout settings\n\n## Features\n\n- Parse `.fig` files locally without API access\n- Extract document structure, nodes, and hierarchy\n- Infer layout properties (flexbox-like direction, gap, padding, alignment)\n- Extract colors, text content, and styling information\n- Render nodes to PNG screenshots\n- Export vectors as SVG, PDF, PNG, or WebP\n- Full effect support (shadows, blurs)\n\n## Requirements\n\n- Node.js 18 or higher\n\n## Limitations\n\n- The `.fig` format is undocumented and may change\n- This is for local `.fig` files only (use a cloud API for hosted files)\n- Some complex properties may not be fully parsed\n\n## License\n\nMIT\n\n## Credits\n\n- [Kiwi](https://github.com/evanw/kiwi) by Evan Wallace - Binary format library\n- [MCP SDK](https://github.com/modelcontextprotocol/typescript-sdk) - Protocol implementation\n","readmeFilename":"README.md"}