cyberuni/cyber-figma
Figma CLI and MCP server for AI agents
cyber-figma
0.1.1
Patch Changes
-
7b9517f: Bundle the CLI's dependencies into
dist/cli.js, and let the skills invoke it directly.An installed agent plugin is a copy of a source checkout, not an npm install, so its directory has no reliable
node_modules. That is why every skill had to shell out through a pinnednpx— the fetch was the only thing supplying the dependency tree. The publisheddist/cli.jsnow inlines each runtime dependency and runs with nonode_modulespresent at all.skills/init-figma/scripts/cyber-figma.mjslaunches that shipped CLI, and the Ensure cyber-figma CLI section now prefers it, falling back to a global install and then to pinnednpxexactly as before. The fallback is deliberate: resolving the launcher path is model behaviour, not a guarantee.@figma/rest-api-specis not inlined and does not need to be — it is consumed only throughimport type, so it never reaches the bundler and contributes nothing to the output.The library entries (
.and./mcp) are unchanged. Their dependencies stay external so a consumer that also uses zod or the MCP SDK shares one copy instead of getting a private inlined duplicate.
0.1.0
Minor Changes
-
c40d450: Add the analytics and organization domains:
analytics,activity-log,developer-log,ai-usage,discovery, andpayment, with the matchingfigma_analytics_*,figma_activity_log_list,figma_developer_log_list,figma_ai_usage_daily,figma_discovery_text_events, andfigma_payment_getMCP tools. Together they cover all six Library Analytics endpoints plus Activity Logs, Developer Logs, AI Usage, Discovery, and Payments — eleven endpoints, none skipped.Library Analytics ships one command per (asset, metric) pair, because the
actionshalf is a weekly time series with a date window and theusageshalf is a snapshot with none;--group-byis required and offers only the two dimensions that endpoint actually has.These endpoints are gated in ways a bare
403cannot explain, so every command and tool description names its requirement: Activity Logs needs OAuth or a plan access token and will never work with a personal one; Developer Logs and AI Usage are reachable with a plan access token only; Discovery needs OAuth 2 plus the Governance+ add-on; and Payments is the reverse — a personal access token only, on a resource you own, with no OAuth support at all. Windows, grouping dimensions, and enum filters are validated before the request rather than paid for in a round trip.Activity Logs is deliberately declared as an unpaginated endpoint: its response carries a cursor that Figma documents no request parameter for, so the result reports
has_moreand points at a narrower time window instead of advertising a--cursorflag that would silently re-request the first page. -
c155cd1: Add the published-library domains:
component,component-set, andstyle. Each shipsteam-list,file-list, andgeton the CLI and the matchingfigma_<resource>_<action>MCP tools, covering all nine Components / Component Sets / Styles endpoints. The team lists declare Figma's integer id-cursor pagination (page_sizedefault 30, max 1000), the file lists declare none, and every description states the two rules these endpoints are misread on: they return published library content only, and a file-scoped read needs a main file key because branches cannot publish. -
d1b024c: Add the comments domain:
comment list,comment create,comment delete, andcomment reaction list|add|delete, with the matchingfigma_comment_*andfigma_comment_reaction_*MCP tools. Covers all three Comments endpoints and all three Comment Reactions endpoints.Comments can be posted as replies (
--reply-to) and pinned to a point, a frame, or a region (--x/--y,--node-id,--region-width/--region-height,--pin-corner);--threadnarrows a listing to one conversation, which Figma's flat comment list offers no parameter for. Reactions take an emoji shortcode such as:heart:and a literal emoji is refused before the request is spent. Both deletes are idempotent, and the two rules Figma answers with a bare403— only the author may delete a comment, only the person who reacted may remove a reaction — are reported as hints. Under--auth-mode planthe writes are refused up front, since Figma does not supportfile_comments:writefor plan access tokens. -
ca73fb7: Add the dev resources domain:
dev-resource list|create|update|deleteand thefigma_dev_resource_*MCP tools, covering all four Dev Resources endpoints. The two bulk writes answer HTTP 200 even when items fail, so every write is reported asok / requested / succeeded / failed / errorsin text, JSON, and TOON alike, and a write where Figma rejected everything exits nonzero instead of acknowledging a change that never happened. -
f87b9a1: Add the variables domain:
cyber-figma variable list|collections|get|applyand thefigma_variable_list,figma_variable_collection_list,figma_variable_get, andfigma_variable_applyMCP tools, covering all three Figma Variables endpoints.Variables and collections come back as lists rather than the id-keyed maps Figma sends,
getresolves thevariableIda node carries inboundVariables, andapplychecks a batch change set against the documented limits — action shape, the 40-mode and 5000-variable ceilings, forbidden name characters, value types — before spending a request, with--dry-runto run that check alone.Every operation needs an Enterprise plan, reading included; writing also needs a Full seat or admin and is not reachable with a plan access token. The CLI help, the tool descriptions, and the exit code (
7) all say so. -
29e6e02: Ship the agent-plugin layer. The package root is the plugin root, so the tarball now carries the Agent Plugins 1.0.0 manifests (
plugin.json,mcp.json), the per-vendor manifests for Claude Code, Cursor, and Codex, and three skills:init-figma,inspect-figma-file, andexport-figma-assets. -
ba74636: Add the webhooks domain:
cyber-figma webhook list|get|create|update|delete|requestsand thefigma_webhook_*MCP tools, covering all seven Webhooks v2 endpoints. Passcodes are masked on every path out — including--jsonand MCP output — and--passcode-env <VAR>keeps one out of shell history; endpoints are checked forhttpsbefore Figma is asked to call them; and a refused write names the role that context requires (team admin, or Can edit on the project or file) instead of relaying a bare 403. -
4924b5c: Add the shared spine: a hand-written typed
fetchclient for the Figma REST API (auth modes, integer query coercion, envelope unwrapping, bounded 429 retry), error classification that names Figma's misleading codes and their fixes, normalization of all four pagination families, agent-friendly output (TOON/JSON/text, truncation, empty states, next steps), URL and team-scope resolution, and the CLI and MCP entrypoints with the seam resource domains plug into.