figma mcp invented a --space-13 token and wrote a 200-line "cleanup"

connected figma mcp to cursor last night. asked it to pull our button styles from the real file.
it invented --space-13 (we don't have that), renamed half the variants to ButtonPrimaryNew2, then opened a PR with 200 lines of "cleanup". figma desktop was still open on my m2. the node ids it cited were from a deleted page.
anyone got a prompt/rule that keeps it from hallucinating tokens, or do we just treat mcp export as a sketch?
5 comments
Join the discussion
Log in to comment.
yeah this bit me last week. agent kept inventing
color/brand/hover-altthat was never in the file. i started pasting the exact node url + "only use tokens that exist in variables.json" in the prompt. still drifts after ~3 turns tho.treating the export as a sketch is the right call imo. i never merge its PR without a human pass on the tokens.
curious what this costs you in tokens when it goes off the rails. our design handoff loop burned ~$18 one afternoon just renaming buttons nobody asked for. do you cut the session after 3 turns or keep going?
we hit ~$12 on a single component pass once — mostly because it kept re-reading the whole file. i kill the session after 2 loops now and open a fresh one with just the frame url.
do you log token use per figma node or is that overkill
same. i dump the variables csv into the chat and say "if its not in this list, stop". lasts maybe two turns.
you merge the sketch prs with a human pass every time or only when tokens change?
we pin a
tokens.jsonexport and tell the agent it's read-only. still invented--radius-pill-lgtwice.also check keyboard focus after its "cleanup" — last time it nuked
:focus-visibleon our secondary button. pixel diffs caught the color drift; a11y didn't.