[{"data":1,"prerenderedAt":2361},["ShallowReactive",2],{"api-blog-connect-miromiro-mcp-claude-cursor-chatgpt":3,"api-blog-related-connect-miromiro-mcp-claude-cursor-chatgpt":738},{"id":4,"title":5,"author":6,"body":7,"category":707,"date":708,"dateModified":709,"description":710,"extension":711,"faqs":712,"image":709,"meta":724,"navigation":408,"path":725,"readingTime":250,"relatedSlugs":726,"seo":730,"stem":731,"tags":732,"__hash__":737},"apiBlog/api-blog/connect-miromiro-mcp-claude-cursor-chatgpt.md","How to Connect the MiroMiro MCP to Claude, Cursor, ChatGPT and Codex","Soraia",{"type":8,"value":9,"toc":690},"minimark",[10,19,28,33,36,100,107,113,121,125,136,266,269,273,276,323,327,333,350,354,357,423,431,435,438,531,538,542,545,559,563,598,602,605,639,646,650,655,658,662,665,669,672,676,686],[11,12,13,14,18],"p",{},"Every client that speaks MCP can connect to MiroMiro with one URL. Paste ",[15,16,17],"code",{},"https://miromiro.app/mcp"," into the client's connector settings and seven design-extraction tools appear in your chats: section-to-code, brand, design tokens, images, SVGs, fonts, and Lottie.",[11,20,21,22,27],{},"You do not need an account to try it. The bare URL connects in demo mode; a ",[23,24,26],"a",{"href":25},"/api/onboarding","free key"," (100 credits a month, no card) unlocks full results. Client-by-client steps below.",[29,30,32],"h2",{"id":31},"claude-web-and-desktop","Claude - web and desktop",[11,34,35],{},"Claude calls these custom connectors. Two ways in:",[37,38,39,59,86,89],"ol",{},[40,41,42,43,47,48,51,52,51,55,58],"li",{},"In any chat, click the ",[44,45,46],"strong",{},"+"," button in the input, then ",[44,49,50],{},"Connectors"," → ",[44,53,54],{},"Add connector",[44,56,57],{},"Add custom connector",". (Settings → Connectors gets you to the same dialog.)",[40,60,61,62],{},"In the dialog, fill in:\n",[63,64,65,74],"ul",{},[40,66,67,70,71],{},[44,68,69],{},"Name:"," ",[15,72,73],{},"MiroMiro",[40,75,76,70,79,82,83,85],{},[44,77,78],{},"URL:",[15,80,81],{},"https://miromiro.app/mcp?access_key=mm_live_your_key"," - or just ",[15,84,17],{}," to try it keyless first",[40,87,88],{},"Leave the OAuth Client ID and Secret fields under Advanced settings empty. The key travels in the URL.",[40,90,91,92,95,96,99],{},"Click ",[44,93,94],{},"Add",". The tools are live in every chat immediately - ask \"get the brand colors and fonts of stripe.com\" and watch it call ",[15,97,98],{},"extract_brand",".",[11,101,102],{},[103,104],"img",{"alt":105,"src":106},"Claude's + menu: Connectors, then Add connector, then Add custom connector","/api-blog/connector1.png",[11,108,109],{},[103,110],{"alt":111,"src":112},"Claude's Add custom connector dialog with the MiroMiro name and URL filled in","/api-blog/connector2.png",[11,114,115,116,120],{},"One click faster: the ",[23,117,119],{"href":118},"/api/mcp","Add to Claude button on our MCP page"," opens this dialog with the name and URL pre-filled.",[29,122,124],{"id":123},"cursor","Cursor",[11,126,127,128,131,132,135],{},"Cursor supports install deeplinks, so the ",[23,129,130],{"href":118},"Add to Cursor button"," does the whole thing in one click. Manual version, in ",[15,133,134],{},"~/.cursor/mcp.json",":",[137,138,143],"pre",{"className":139,"code":140,"language":141,"meta":142,"style":142},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"mcpServers\": {\n    \"miromiro\": {\n      \"url\": \"https://miromiro.app/mcp\",\n      \"headers\": { \"Authorization\": \"Bearer mm_live_your_key\" }\n    }\n  }\n}\n","json","",[15,144,145,154,172,188,213,248,254,260],{"__ignoreMap":142},[146,147,150],"span",{"class":148,"line":149},"line",1,[146,151,153],{"class":152},"sMK4o","{\n",[146,155,157,160,164,167,169],{"class":148,"line":156},2,[146,158,159],{"class":152},"  \"",[146,161,163],{"class":162},"spNyl","mcpServers",[146,165,166],{"class":152},"\"",[146,168,135],{"class":152},[146,170,171],{"class":152}," {\n",[146,173,175,178,182,184,186],{"class":148,"line":174},3,[146,176,177],{"class":152},"    \"",[146,179,181],{"class":180},"sBMFI","miromiro",[146,183,166],{"class":152},[146,185,135],{"class":152},[146,187,171],{"class":152},[146,189,191,194,198,200,202,205,208,210],{"class":148,"line":190},4,[146,192,193],{"class":152},"      \"",[146,195,197],{"class":196},"sbssI","url",[146,199,166],{"class":152},[146,201,135],{"class":152},[146,203,204],{"class":152}," \"",[146,206,17],{"class":207},"sfazB",[146,209,166],{"class":152},[146,211,212],{"class":152},",\n",[146,214,216,218,221,223,225,228,230,234,236,238,240,243,245],{"class":148,"line":215},5,[146,217,193],{"class":152},[146,219,220],{"class":196},"headers",[146,222,166],{"class":152},[146,224,135],{"class":152},[146,226,227],{"class":152}," {",[146,229,204],{"class":152},[146,231,233],{"class":232},"swJcz","Authorization",[146,235,166],{"class":152},[146,237,135],{"class":152},[146,239,204],{"class":152},[146,241,242],{"class":207},"Bearer mm_live_your_key",[146,244,166],{"class":152},[146,246,247],{"class":152}," }\n",[146,249,251],{"class":148,"line":250},6,[146,252,253],{"class":152},"    }\n",[146,255,257],{"class":148,"line":256},7,[146,258,259],{"class":152},"  }\n",[146,261,263],{"class":148,"line":262},8,[146,264,265],{"class":152},"}\n",[11,267,268],{},"Cursor can send headers, so put the key there instead of in the URL - headers stay out of logs. Restart Cursor and check the MCP panel for the seven tools.",[29,270,272],{"id":271},"chatgpt","ChatGPT",[11,274,275],{},"ChatGPT only takes remote servers, which is exactly what this is:",[37,277,278,293,320],{},[40,279,280,51,283,51,286,289,290],{},[44,281,282],{},"Settings",[44,284,285],{},"Apps & Connectors",[44,287,288],{},"Advanced"," → enable ",[44,291,292],{},"Developer mode",[40,294,295,298,299],{},[44,296,297],{},"Create"," a connector:\n",[63,300,301,307,314],{},[40,302,303,70,305],{},[44,304,69],{},[15,306,73],{},[40,308,309,70,312],{},[44,310,311],{},"MCP server URL:",[15,313,81],{},[40,315,316,319],{},[44,317,318],{},"Authentication:"," No authentication (the key is in the URL)",[40,321,322],{},"Enable the connector in a chat via the tools menu.",[29,324,326],{"id":325},"codex-cli","Codex CLI",[11,328,329,330,135],{},"Add to ",[15,331,332],{},"~/.codex/config.toml",[137,334,338],{"className":335,"code":336,"language":337,"meta":142,"style":142},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[mcp_servers.miromiro]\nurl = \"https://miromiro.app/mcp?access_key=mm_live_your_key\"\n","toml",[15,339,340,345],{"__ignoreMap":142},[146,341,342],{"class":148,"line":149},[146,343,344],{},"[mcp_servers.miromiro]\n",[146,346,347],{"class":148,"line":156},[146,348,349],{},"url = \"https://miromiro.app/mcp?access_key=mm_live_your_key\"\n",[29,351,353],{"id":352},"claude-code","Claude Code",[11,355,356],{},"One command in your terminal, not inside a session:",[137,358,362],{"className":359,"code":360,"language":361,"meta":142,"style":142},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","claude mcp add --transport http miromiro https://miromiro.app/mcp \\\n  --header \"Authorization: Bearer mm_live_your_key\"\n\nclaude mcp list   # look for \"✓ Connected\"\n","bash",[15,363,364,391,404,410],{"__ignoreMap":142},[146,365,366,369,372,375,378,381,384,387],{"class":148,"line":149},[146,367,368],{"class":180},"claude",[146,370,371],{"class":207}," mcp",[146,373,374],{"class":207}," add",[146,376,377],{"class":207}," --transport",[146,379,380],{"class":207}," http",[146,382,383],{"class":207}," miromiro",[146,385,386],{"class":207}," https://miromiro.app/mcp",[146,388,390],{"class":389},"sTEyZ"," \\\n",[146,392,393,396,398,401],{"class":148,"line":156},[146,394,395],{"class":207},"  --header",[146,397,204],{"class":152},[146,399,400],{"class":207},"Authorization: Bearer mm_live_your_key",[146,402,403],{"class":152},"\"\n",[146,405,406],{"class":148,"line":174},[146,407,409],{"emptyLinePlaceholder":408},true,"\n",[146,411,412,414,416,419],{"class":148,"line":190},[146,413,368],{"class":180},[146,415,371],{"class":207},[146,417,418],{"class":207}," list",[146,420,422],{"class":421},"sHwdD","   # look for \"✓ Connected\"\n",[11,424,425,426,430],{},"Claude Code also runs the ",[23,427,429],{"href":428},"/api/blog/add-design-extraction-to-claude-code-mcp","local npm package"," if you prefer the key in an env var instead of a header.",[29,432,434],{"id":433},"demo-mode-vs-a-key","Demo mode vs a key",[11,436,437],{},"The same tools respond either way. What changes:",[439,440,441,459],"table",{},[442,443,444],"thead",{},[445,446,447,450,453,456],"tr",{},[448,449],"th",{},[448,451,452],{},"No key (demo)",[448,454,455],{},"Free key",[448,457,458],{},"Paid plans",[460,461,462,476,490,504,517],"tbody",{},[445,463,464,468,471,474],{},[465,466,467],"td",{},"Results",[465,469,470],{},"Capped previews",[465,472,473],{},"Full",[465,475,473],{},[445,477,478,481,484,487],{},[465,479,480],{},"Rate limit",[465,482,483],{},"5/min, shared per IP",[465,485,486],{},"30/min, yours",[465,488,489],{},"60 to 300/min",[445,491,492,495,498,501],{},[465,493,494],{},"Credits",[465,496,497],{},"None used",[465,499,500],{},"100/month",[465,502,503],{},"5,000 to 200,000/month",[445,505,506,509,512,515],{},[465,507,508],{},"Usage and logs",[465,510,511],{},"No",[465,513,514],{},"Dashboard",[465,516,514],{},[445,518,519,522,525,528],{},[465,520,521],{},"Price",[465,523,524],{},"Free",[465,526,527],{},"Free, no card",[465,529,530],{},"From €19/month",[11,532,533,534,537],{},"Demo mode is for seeing real output before you sign up. Treat the free key as the actual starting point: it is also free, and ",[15,535,536],{},"extract_code"," alone is worth the 30 seconds of signup.",[29,539,541],{"id":540},"what-to-ask-once-connected","What to ask once connected",[11,543,544],{},"You never name tools in prompts - ask design-shaped questions and the agent picks the right one:",[63,546,547,550,553,556],{},[40,548,549],{},"\"Rebuild stripe.com's pricing section in React\"",[40,551,552],{},"\"Extract linear.app's design tokens and restyle our Button component to match\"",[40,554,555],{},"\"What fonts does vercel.com actually load?\"",[40,557,558],{},"\"Pull the brand palette from ourcustomer.com and generate a theme file\"",[29,560,562],{"id":561},"common-problems","Common problems",[63,564,565,576,582,588],{},[40,566,567,570,571,575],{},[44,568,569],{},"\"Invalid or revoked API key\" in the tool result."," The key in your URL or header is wrong or was rotated. Grab the current one from ",[23,572,574],{"href":573},"/api/dashboard/keys","API Keys"," - keys are shown once at creation, so rotate if you lost it.",[40,577,578,581],{},[44,579,580],{},"Rate limited in demo mode."," The keyless tier is 5 requests a minute per IP, shared with everyone behind your NAT. A free key gives you your own 30/minute.",[40,583,584,587],{},[44,585,586],{},"Thin results on an app-like site."," The engine reads static HTML and CSS, no JavaScript execution. A fully client-rendered app returns little, and the tools say so instead of inventing values.",[40,589,590,593,594,597],{},[44,591,592],{},"Claude web has no header field."," Correct - claude.ai custom connectors cannot send custom headers. That is what ",[15,595,596],{},"?access_key="," is for.",[29,599,601],{"id":600},"or-skip-mcp-entirely","Or skip MCP entirely",[11,603,604],{},"The same engine is a plain REST API:",[137,606,608],{"className":359,"code":607,"language":361,"meta":142,"style":142},"curl \"https://miromiro.app/api/v1/brand?url=stripe.com\" \\\n  -H \"Authorization: Bearer $MIROMIRO_API_KEY\"\n",[15,609,610,624],{"__ignoreMap":142},[146,611,612,615,617,620,622],{"class":148,"line":149},[146,613,614],{"class":180},"curl",[146,616,204],{"class":152},[146,618,619],{"class":207},"https://miromiro.app/api/v1/brand?url=stripe.com",[146,621,166],{"class":152},[146,623,390],{"class":389},[146,625,626,629,631,634,637],{"class":148,"line":156},[146,627,628],{"class":207},"  -H",[146,630,204],{"class":152},[146,632,633],{"class":207},"Authorization: Bearer ",[146,635,636],{"class":389},"$MIROMIRO_API_KEY",[146,638,403],{"class":152},[11,640,641,642,645],{},"Full reference at ",[23,643,644],{"href":644},"/api/docs",". You can start for free.",[29,647,649],{"id":648},"frequently-asked-questions","Frequently asked questions",[651,652,654],"h3",{"id":653},"how-do-i-add-a-custom-mcp-connector-to-claude-web","How do I add a custom MCP connector to Claude web?",[11,656,657],{},"The + button in the chat input → Connectors → Add connector → Add custom connector. Name it, paste the URL, click Add.",[651,659,661],{"id":660},"do-i-need-a-key-to-try-it","Do I need a key to try it?",[11,663,664],{},"No. The bare URL runs in demo mode. Full results need a key - free, 100 credits a month, no card.",[651,666,668],{"id":667},"which-clients-does-the-remote-server-work-with","Which clients does the remote server work with?",[11,670,671],{},"Claude web and desktop, Cursor, ChatGPT developer mode, Codex, Claude Code, Windsurf, and any MCP SDK. If it takes a server URL, it works.",[651,673,675],{"id":674},"where-does-my-key-go-safest","Where does my key go safest?",[11,677,678,679,682,683,685],{},"Header (",[15,680,681],{},"Authorization: Bearer",") where the client supports it - Cursor, Claude Code, SDKs. URL (",[15,684,596],{},") only where headers are not an option - claude.ai, ChatGPT. Rotate keys anytime in the dashboard.",[687,688,689],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}",{"title":142,"searchDepth":156,"depth":156,"links":691},[692,693,694,695,696,697,698,699,700,701],{"id":31,"depth":156,"text":32},{"id":123,"depth":156,"text":124},{"id":271,"depth":156,"text":272},{"id":325,"depth":156,"text":326},{"id":352,"depth":156,"text":353},{"id":433,"depth":156,"text":434},{"id":540,"depth":156,"text":541},{"id":561,"depth":156,"text":562},{"id":600,"depth":156,"text":601},{"id":648,"depth":156,"text":649,"children":702},[703,704,705,706],{"id":653,"depth":174,"text":654},{"id":660,"depth":174,"text":661},{"id":667,"depth":174,"text":668},{"id":674,"depth":174,"text":675},"AI Engineering","2026-07-20",null,"Step-by-step connector setup for every client: paste one URL into Claude web, one-click install in Cursor, developer mode in ChatGPT, one command in Claude Code. Works without a key in demo mode.","md",[713,715,718,721],{"question":654,"answer":714},"Click the + button in the chat input, choose Connectors, then Add connector and Add custom connector. Name it, paste the server URL (for MiroMiro: https://miromiro.app/mcp), and click Add. No OAuth fields needed for servers that use URL keys.",{"question":716,"answer":717},"Do I need an API key to try the MiroMiro MCP?","No. The bare URL https://miromiro.app/mcp connects in demo mode - capped results, shared rate limit, zero signup. For full results, append ?access_key=mm_live_your_key to the URL, or send the key as an Authorization: Bearer header in clients that support headers.",{"question":719,"answer":720},"How do I connect an MCP server to ChatGPT?","Settings, then Apps & Connectors, then Advanced, then enable Developer mode. Create a connector with the MCP server URL and pick No authentication. ChatGPT requires remote (URL-based) servers - it cannot run local stdio packages.",{"question":722,"answer":723},"What is the difference between the remote MCP server and the npm package?","Same seven tools. The remote server (https://miromiro.app/mcp) is a hosted URL - nothing to install, works in browser clients like claude.ai and ChatGPT. The npm package (npx miromiro-mcp) runs locally and reads the key from an env var, which keeps it out of any URL.",{},"/api-blog/connect-miromiro-mcp-claude-cursor-chatgpt",[727,728,729],"add-design-extraction-to-claude-code-mcp","how-to-extract-design-tokens-from-any-website-in-python","best-design-to-code-apis-2026",{"title":5,"description":710},"api-blog/connect-miromiro-mcp-claude-cursor-chatgpt",[733,368,123,271,734,735,736],"mcp","codex","connectors","ai agents","a2tzmmGGjH3MTqWedb8mJxtpJkSYfhXTuPPKLIqpiGE",[739,1267,1983],{"id":740,"title":741,"author":6,"body":742,"category":707,"date":1242,"dateModified":709,"description":1243,"extension":711,"faqs":1244,"image":709,"meta":1256,"navigation":408,"path":1257,"readingTime":215,"relatedSlugs":1258,"seo":1261,"stem":1262,"tags":1263,"__hash__":1266},"apiBlog/api-blog/add-design-extraction-to-claude-code-mcp.md","Add Design Extraction to Claude Code with MCP",{"type":8,"value":743,"toc":1227},[744,747,808,811,821,825,828,835,839,849,853,864,903,913,917,953,956,965,969,975,1104,1110,1114,1144,1146,1149,1179,1185,1187,1191,1200,1204,1207,1211,1214,1218,1224],[11,745,746],{},"Two commands and Claude Code can read any website's design system instead of guessing it from a screenshot. Here is the whole setup:",[137,748,750],{"className":359,"code":749,"language":361,"meta":142,"style":142},"claude mcp add miromiro -s user \\\n  --env MIROMIRO_API_KEY=mm_live_your_key \\\n  -- npx -y miromiro-mcp\n\nclaude mcp list   # look for \"✓ Connected\"\n",[15,751,752,770,780,794,798],{"__ignoreMap":142},[146,753,754,756,758,760,762,765,768],{"class":148,"line":149},[146,755,368],{"class":180},[146,757,371],{"class":207},[146,759,374],{"class":207},[146,761,383],{"class":207},[146,763,764],{"class":207}," -s",[146,766,767],{"class":207}," user",[146,769,390],{"class":389},[146,771,772,775,778],{"class":148,"line":156},[146,773,774],{"class":207},"  --env",[146,776,777],{"class":207}," MIROMIRO_API_KEY=mm_live_your_key",[146,779,390],{"class":389},[146,781,782,785,788,791],{"class":148,"line":174},[146,783,784],{"class":207},"  --",[146,786,787],{"class":207}," npx",[146,789,790],{"class":207}," -y",[146,792,793],{"class":207}," miromiro-mcp\n",[146,795,796],{"class":148,"line":190},[146,797,409],{"emptyLinePlaceholder":408},[146,799,800,802,804,806],{"class":148,"line":215},[146,801,368],{"class":180},[146,803,371],{"class":207},[146,805,418],{"class":207},[146,807,422],{"class":421},[11,809,810],{},"That is genuinely it. The rest of this post is what those commands do, the Cursor/Windsurf versions, and how to actually use it in a session.",[11,812,813,814,816,817,99],{},"No terminal, or you use Claude in the browser? There is also a hosted server - paste ",[15,815,17],{}," into any client that takes a URL. Full walkthrough for Claude web, Cursor, ChatGPT and Codex in ",[23,818,820],{"href":819},"/api/blog/connect-miromiro-mcp-claude-cursor-chatgpt","how to connect the MiroMiro MCP",[29,822,824],{"id":823},"why-bother","Why bother",[11,826,827],{},"Ask a coding agent to \"make it look like stripe.com\" and it works from a screenshot at best, memory at worst. Either way it guesses: colors eyeballed from pixels, spacing approximated, fonts invented. The output is a plausible imitation with none of the real values.",[11,829,830,831,99],{},"With the MCP server connected, the agent stops guessing. It calls the extraction tools itself, gets the site's actual ranked palette, type scale, spacing, and shadows as data, and builds with those. Same prompt, real values. We wrote more about this gap in ",[23,832,834],{"href":833},"/api/use-cases/ai-agent-ground-truth","ground truth for AI agents",[29,836,838],{"id":837},"step-1-get-a-key","Step 1: get a key",[11,840,841,842,845,846,99],{},"Sign in and mint one at ",[23,843,844],{"href":573},"miromiro.app/api/dashboard/keys",". 100 free credits a month, no card. Keys look like ",[15,847,848],{},"mm_live_...",[29,850,852],{"id":851},"step-2-add-the-server","Step 2: add the server",[11,854,855,856,859,860,863],{},"The server is a local stdio process (",[15,857,858],{},"npx miromiro-mcp",") that reads your key from ",[15,861,862],{},"MIROMIRO_API_KEY",". Run this in your terminal - not inside a Claude session; you are configuring the server before the conversation starts:",[137,865,867],{"className":359,"code":866,"language":361,"meta":142,"style":142},"claude mcp add miromiro -s user \\\n  --env MIROMIRO_API_KEY=mm_live_your_key \\\n  -- npx -y miromiro-mcp\n",[15,868,869,885,893],{"__ignoreMap":142},[146,870,871,873,875,877,879,881,883],{"class":148,"line":149},[146,872,368],{"class":180},[146,874,371],{"class":207},[146,876,374],{"class":207},[146,878,383],{"class":207},[146,880,764],{"class":207},[146,882,767],{"class":207},[146,884,390],{"class":389},[146,886,887,889,891],{"class":148,"line":156},[146,888,774],{"class":207},[146,890,777],{"class":207},[146,892,390],{"class":389},[146,894,895,897,899,901],{"class":148,"line":174},[146,896,784],{"class":207},[146,898,787],{"class":207},[146,900,790],{"class":207},[146,902,793],{"class":207},[11,904,905,908,909,912],{},[15,906,907],{},"-s user"," registers it for every project; drop it to scope to the current one. The ",[15,910,911],{},"-y"," matters: it lets npx start the package unattended, so the editor can spawn the server without an install prompt.",[29,914,916],{"id":915},"step-3-verify-and-use-it","Step 3: verify and use it",[137,918,920],{"className":359,"code":919,"language":361,"meta":142,"style":142},"claude mcp list\n# miromiro ... ✓ Connected\n\nclaude\n> Use the miromiro server to get the brand colors and fonts of stripe.com\n",[15,921,922,931,936,940,945],{"__ignoreMap":142},[146,923,924,926,928],{"class":148,"line":149},[146,925,368],{"class":180},[146,927,371],{"class":207},[146,929,930],{"class":207}," list\n",[146,932,933],{"class":148,"line":156},[146,934,935],{"class":421},"# miromiro ... ✓ Connected\n",[146,937,938],{"class":148,"line":174},[146,939,409],{"emptyLinePlaceholder":408},[146,941,942],{"class":148,"line":190},[146,943,944],{"class":180},"claude\n",[146,946,947,950],{"class":148,"line":215},[146,948,949],{"class":152},">",[146,951,952],{"class":389}," Use the miromiro server to get the brand colors and fonts of stripe.com\n",[11,954,955],{},"All seven extraction tools appear in Claude's toolbox automatically: design tokens, brand, images, SVGs, fonts, Lottie, and section-to-code. You do not name tools in prompts - ask design-shaped questions and the agent picks the right one. Prompts that work well:",[63,957,958,960,963],{},[40,959,552],{},[40,961,962],{},"\"Get vercel.com's hero section as Tailwind and adapt it for our landing page\"",[40,964,558],{},[29,966,968],{"id":967},"cursor-and-windsurf","Cursor and Windsurf",[11,970,971,972,974],{},"Both take the standard ",[15,973,163],{}," JSON block:",[137,976,978],{"className":139,"code":977,"language":141,"meta":142,"style":142},"{\n  \"mcpServers\": {\n    \"miromiro\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"miromiro-mcp\"],\n      \"env\": { \"MIROMIRO_API_KEY\": \"mm_live_your_key\" }\n    }\n  }\n}\n",[15,979,980,984,996,1008,1028,1061,1091,1095,1099],{"__ignoreMap":142},[146,981,982],{"class":148,"line":149},[146,983,153],{"class":152},[146,985,986,988,990,992,994],{"class":148,"line":156},[146,987,159],{"class":152},[146,989,163],{"class":162},[146,991,166],{"class":152},[146,993,135],{"class":152},[146,995,171],{"class":152},[146,997,998,1000,1002,1004,1006],{"class":148,"line":174},[146,999,177],{"class":152},[146,1001,181],{"class":180},[146,1003,166],{"class":152},[146,1005,135],{"class":152},[146,1007,171],{"class":152},[146,1009,1010,1012,1015,1017,1019,1021,1024,1026],{"class":148,"line":190},[146,1011,193],{"class":152},[146,1013,1014],{"class":196},"command",[146,1016,166],{"class":152},[146,1018,135],{"class":152},[146,1020,204],{"class":152},[146,1022,1023],{"class":207},"npx",[146,1025,166],{"class":152},[146,1027,212],{"class":152},[146,1029,1030,1032,1035,1037,1039,1042,1044,1046,1048,1051,1053,1056,1058],{"class":148,"line":215},[146,1031,193],{"class":152},[146,1033,1034],{"class":196},"args",[146,1036,166],{"class":152},[146,1038,135],{"class":152},[146,1040,1041],{"class":152}," [",[146,1043,166],{"class":152},[146,1045,911],{"class":207},[146,1047,166],{"class":152},[146,1049,1050],{"class":152},",",[146,1052,204],{"class":152},[146,1054,1055],{"class":207},"miromiro-mcp",[146,1057,166],{"class":152},[146,1059,1060],{"class":152},"],\n",[146,1062,1063,1065,1068,1070,1072,1074,1076,1078,1080,1082,1084,1087,1089],{"class":148,"line":250},[146,1064,193],{"class":152},[146,1066,1067],{"class":196},"env",[146,1069,166],{"class":152},[146,1071,135],{"class":152},[146,1073,227],{"class":152},[146,1075,204],{"class":152},[146,1077,862],{"class":232},[146,1079,166],{"class":152},[146,1081,135],{"class":152},[146,1083,204],{"class":152},[146,1085,1086],{"class":207},"mm_live_your_key",[146,1088,166],{"class":152},[146,1090,247],{"class":152},[146,1092,1093],{"class":148,"line":256},[146,1094,253],{"class":152},[146,1096,1097],{"class":148,"line":262},[146,1098,259],{"class":152},[146,1100,1102],{"class":148,"line":1101},9,[146,1103,265],{"class":152},[11,1105,1106,1107,1109],{},"Cursor: ",[15,1108,134],{},". Windsurf: Settings → MCP. Restart the editor after saving; both show the server's tools in their MCP panel when connected.",[29,1111,1113],{"id":1112},"things-worth-knowing","Things worth knowing",[63,1115,1116,1122,1128],{},[40,1117,1118,1121],{},[44,1119,1120],{},"It reads static HTML + CSS."," No JavaScript execution, so a fully client-rendered app can return little. The tools say so rather than inventing a result, which is the behavior you want in an agent pipeline.",[40,1123,1124,1127],{},[44,1125,1126],{},"Credits:"," a token extraction is 10 credits, brand 15, section-to-code 25. The free 100/month covers real experimentation; the agent sees remaining quota in each response's usage object.",[40,1129,1130,1133,1134,1137,1138,1141,1142,99],{},[44,1131,1132],{},"Server not connecting?"," It is almost always the key: check ",[15,1135,1136],{},"claude mcp list",", and confirm the env var made it in (",[15,1139,1140],{},"claude mcp get miromiro","). Node 18+ is required for ",[15,1143,1023],{},[29,1145,601],{"id":600},[11,1147,1148],{},"The same engine is a plain REST API if your agent framework speaks HTTP instead:",[137,1150,1152],{"className":359,"code":1151,"language":361,"meta":142,"style":142},"curl \"https://miromiro.app/api/v1/extract?url=stripe.com\" \\\n  -H \"Authorization: Bearer $MIROMIRO_API_KEY\"\n",[15,1153,1154,1167],{"__ignoreMap":142},[146,1155,1156,1158,1160,1163,1165],{"class":148,"line":149},[146,1157,614],{"class":180},[146,1159,204],{"class":152},[146,1161,1162],{"class":207},"https://miromiro.app/api/v1/extract?url=stripe.com",[146,1164,166],{"class":152},[146,1166,390],{"class":389},[146,1168,1169,1171,1173,1175,1177],{"class":148,"line":156},[146,1170,628],{"class":207},[146,1172,204],{"class":152},[146,1174,633],{"class":207},[146,1176,636],{"class":389},[146,1178,403],{"class":152},[11,1180,1181,1182,99],{},"Full setup docs, including the agent quickstart, live at ",[23,1183,1184],{"href":1184},"/api/docs/install-mcp",[29,1186,649],{"id":648},[651,1188,1190],{"id":1189},"how-do-i-add-an-mcp-server-to-claude-code","How do I add an MCP server to Claude Code?",[11,1192,1193,1196,1197,1199],{},[15,1194,1195],{},"claude mcp add \u003Cname> ... -- \u003Ccommand>"," in your terminal, then ",[15,1198,1136],{}," to confirm it connected. Exact MiroMiro command at the top of this post.",[651,1201,1203],{"id":1202},"what-tools-does-the-server-expose","What tools does the server expose?",[11,1205,1206],{},"Seven: design tokens, brand, images, SVGs, fonts, Lottie, and section-to-code. They register automatically; the agent picks per task.",[651,1208,1210],{"id":1209},"why-tokens-instead-of-a-screenshot","Why tokens instead of a screenshot?",[11,1212,1213],{},"Screenshots make the model guess every value. Tokens are the site's real CSS - the difference between imitation and ground truth.",[651,1215,1217],{"id":1216},"does-it-work-with-cursor-and-windsurf","Does it work with Cursor and Windsurf?",[11,1219,1220,1221,1223],{},"Yes - standard ",[15,1222,163],{}," JSON (above), restart, done.",[687,1225,1226],{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":142,"searchDepth":156,"depth":156,"links":1228},[1229,1230,1231,1232,1233,1234,1235,1236],{"id":823,"depth":156,"text":824},{"id":837,"depth":156,"text":838},{"id":851,"depth":156,"text":852},{"id":915,"depth":156,"text":916},{"id":967,"depth":156,"text":968},{"id":1112,"depth":156,"text":1113},{"id":600,"depth":156,"text":601},{"id":648,"depth":156,"text":649,"children":1237},[1238,1239,1240,1241],{"id":1189,"depth":174,"text":1190},{"id":1202,"depth":174,"text":1203},{"id":1209,"depth":174,"text":1210},{"id":1216,"depth":174,"text":1217},"2026-07-18","Install the MiroMiro MCP server in two commands and Claude Code can pull any website's tokens, brand, fonts, and section code instead of guessing.",[1245,1247,1250,1253],{"question":1190,"answer":1246},"Run claude mcp add \u003Cname> with the command that starts the server, in your terminal before starting a session. For MiroMiro: claude mcp add miromiro -s user --env MIROMIRO_API_KEY=your_key -- npx -y miromiro-mcp. Verify with claude mcp list - you want to see Connected.",{"question":1248,"answer":1249},"What does the MiroMiro MCP server let Claude do?","Seven extraction tools appear in Claude's toolbox automatically: design tokens, brand data (logo, palette, fonts), images, SVGs, fonts, Lottie animations, and section-to-code. Claude calls them by itself when you ask design questions about a URL - no manual API calls in your prompts.",{"question":1251,"answer":1252},"Why give a coding agent design tokens instead of a screenshot?","Screenshots make the model guess values - it eyeballs colors, approximates spacing, and invents font names. Tokens are the site's real CSS values, so 'build it like stripe.com' produces the actual palette and type scale instead of a plausible imitation.",{"question":1254,"answer":1255},"Does the MiroMiro MCP server work with Cursor and Windsurf?","Yes. Both take the standard mcpServers JSON block: command npx, args ['-y', 'miromiro-mcp'], and your key in the env. In Cursor it goes in ~/.cursor/mcp.json; in Windsurf under Settings, MCP.",{},"/api-blog/add-design-extraction-to-claude-code-mcp",[1259,728,1260],"connect-miromiro-mcp-claude-cursor-chatgpt","design-token-types-reference",{"title":741,"description":1243},"api-blog/add-design-extraction-to-claude-code-mcp",[733,1264,736,1265,123],"claude code","design tokens","5ZSlTLfRpZyWbN6QBl48G2MrATv3P0HPlFNY504YFvY",{"id":1268,"title":1269,"author":6,"body":1270,"category":1960,"date":1242,"dateModified":709,"description":1961,"extension":711,"faqs":1962,"image":709,"meta":1972,"navigation":408,"path":1973,"readingTime":262,"relatedSlugs":1974,"seo":1977,"stem":1978,"tags":1979,"__hash__":1982},"apiBlog/api-blog/how-to-extract-design-tokens-from-any-website-in-python.md","How to Extract Design Tokens from Any Website in Python",{"type":8,"value":1271,"toc":1944},[1272,1279,1282,1286,1289,1315,1318,1508,1511,1519,1534,1538,1541,1580,1583,1587,1590,1627,1629,1632,1694,1698,1778,1785,1789,1792,1820,1850,1861,1865,1875,1877,1881,1884,1888,1901,1905,1908,1912,1915,1919,1941],[11,1273,1274,1275,1278],{},"The fastest way to extract design tokens from a website in Python is Playwright plus ",[15,1276,1277],{},"getComputedStyle()",": load the page in a real browser, collect the computed styles of every element, and count what repeats. The counting is the important part. A site's design system is whatever it uses everywhere, not every value that appears once in a forgotten footer.",[11,1280,1281],{},"Parsing CSS files without a browser is the approach most tutorials suggest, and it is the one that works worst on modern sites. More on that below.",[29,1283,1285],{"id":1284},"extract-colors-with-playwright","Extract colors with Playwright",[11,1287,1288],{},"First, install Playwright and a browser:",[137,1290,1292],{"className":359,"code":1291,"language":361,"meta":142,"style":142},"pip install playwright\nplaywright install chromium\n",[15,1293,1294,1305],{"__ignoreMap":142},[146,1295,1296,1299,1302],{"class":148,"line":149},[146,1297,1298],{"class":180},"pip",[146,1300,1301],{"class":207}," install",[146,1303,1304],{"class":207}," playwright\n",[146,1306,1307,1310,1312],{"class":148,"line":156},[146,1308,1309],{"class":180},"playwright",[146,1311,1301],{"class":207},[146,1313,1314],{"class":207}," chromium\n",[11,1316,1317],{},"Then collect styles from every element and count them:",[137,1319,1323],{"className":1320,"code":1321,"language":1322,"meta":142,"style":142},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from collections import Counter\nfrom playwright.sync_api import sync_playwright\n\nCOLLECT = \"\"\"\n() => {\n  const els = [...document.querySelectorAll('body *')].slice(0, 5000);\n  const out = { colors: [], fonts: [], sizes: [], radii: [], shadows: [] };\n  for (const el of els) {\n    const s = getComputedStyle(el);\n    out.colors.push(s.color, s.backgroundColor, s.borderTopColor);\n    out.fonts.push(s.fontFamily);\n    out.sizes.push(s.fontSize);\n    out.radii.push(s.borderTopLeftRadius);\n    out.shadows.push(s.boxShadow);\n  }\n  return out;\n}\n\"\"\"\n\ndef top(values, n=8, skip=(\"\", \"none\", \"normal\", \"auto\", \"0px\", \"rgba(0, 0, 0, 0)\")):\n    return Counter(v for v in values if v not in skip).most_common(n)\n\nwith sync_playwright() as p:\n    browser = p.chromium.launch()\n    page = browser.new_page(viewport={\"width\": 1440, \"height\": 900})\n    page.goto(\"https://stripe.com\", wait_until=\"networkidle\")\n    raw = page.evaluate(COLLECT)\n    browser.close()\n\nfor name in (\"colors\", \"fonts\", \"sizes\", \"radii\", \"shadows\"):\n    print(f\"\\n== {name} ==\")\n    for value, count in top(raw[name]):\n        print(f\"{count:>5}  {value}\")\n","python",[15,1324,1325,1330,1335,1339,1344,1349,1354,1359,1364,1369,1375,1381,1387,1393,1399,1404,1410,1415,1421,1426,1432,1438,1443,1449,1455,1461,1467,1473,1479,1484,1490,1496,1502],{"__ignoreMap":142},[146,1326,1327],{"class":148,"line":149},[146,1328,1329],{},"from collections import Counter\n",[146,1331,1332],{"class":148,"line":156},[146,1333,1334],{},"from playwright.sync_api import sync_playwright\n",[146,1336,1337],{"class":148,"line":174},[146,1338,409],{"emptyLinePlaceholder":408},[146,1340,1341],{"class":148,"line":190},[146,1342,1343],{},"COLLECT = \"\"\"\n",[146,1345,1346],{"class":148,"line":215},[146,1347,1348],{},"() => {\n",[146,1350,1351],{"class":148,"line":250},[146,1352,1353],{},"  const els = [...document.querySelectorAll('body *')].slice(0, 5000);\n",[146,1355,1356],{"class":148,"line":256},[146,1357,1358],{},"  const out = { colors: [], fonts: [], sizes: [], radii: [], shadows: [] };\n",[146,1360,1361],{"class":148,"line":262},[146,1362,1363],{},"  for (const el of els) {\n",[146,1365,1366],{"class":148,"line":1101},[146,1367,1368],{},"    const s = getComputedStyle(el);\n",[146,1370,1372],{"class":148,"line":1371},10,[146,1373,1374],{},"    out.colors.push(s.color, s.backgroundColor, s.borderTopColor);\n",[146,1376,1378],{"class":148,"line":1377},11,[146,1379,1380],{},"    out.fonts.push(s.fontFamily);\n",[146,1382,1384],{"class":148,"line":1383},12,[146,1385,1386],{},"    out.sizes.push(s.fontSize);\n",[146,1388,1390],{"class":148,"line":1389},13,[146,1391,1392],{},"    out.radii.push(s.borderTopLeftRadius);\n",[146,1394,1396],{"class":148,"line":1395},14,[146,1397,1398],{},"    out.shadows.push(s.boxShadow);\n",[146,1400,1402],{"class":148,"line":1401},15,[146,1403,259],{},[146,1405,1407],{"class":148,"line":1406},16,[146,1408,1409],{},"  return out;\n",[146,1411,1413],{"class":148,"line":1412},17,[146,1414,265],{},[146,1416,1418],{"class":148,"line":1417},18,[146,1419,1420],{},"\"\"\"\n",[146,1422,1424],{"class":148,"line":1423},19,[146,1425,409],{"emptyLinePlaceholder":408},[146,1427,1429],{"class":148,"line":1428},20,[146,1430,1431],{},"def top(values, n=8, skip=(\"\", \"none\", \"normal\", \"auto\", \"0px\", \"rgba(0, 0, 0, 0)\")):\n",[146,1433,1435],{"class":148,"line":1434},21,[146,1436,1437],{},"    return Counter(v for v in values if v not in skip).most_common(n)\n",[146,1439,1441],{"class":148,"line":1440},22,[146,1442,409],{"emptyLinePlaceholder":408},[146,1444,1446],{"class":148,"line":1445},23,[146,1447,1448],{},"with sync_playwright() as p:\n",[146,1450,1452],{"class":148,"line":1451},24,[146,1453,1454],{},"    browser = p.chromium.launch()\n",[146,1456,1458],{"class":148,"line":1457},25,[146,1459,1460],{},"    page = browser.new_page(viewport={\"width\": 1440, \"height\": 900})\n",[146,1462,1464],{"class":148,"line":1463},26,[146,1465,1466],{},"    page.goto(\"https://stripe.com\", wait_until=\"networkidle\")\n",[146,1468,1470],{"class":148,"line":1469},27,[146,1471,1472],{},"    raw = page.evaluate(COLLECT)\n",[146,1474,1476],{"class":148,"line":1475},28,[146,1477,1478],{},"    browser.close()\n",[146,1480,1482],{"class":148,"line":1481},29,[146,1483,409],{"emptyLinePlaceholder":408},[146,1485,1487],{"class":148,"line":1486},30,[146,1488,1489],{},"for name in (\"colors\", \"fonts\", \"sizes\", \"radii\", \"shadows\"):\n",[146,1491,1493],{"class":148,"line":1492},31,[146,1494,1495],{},"    print(f\"\\n== {name} ==\")\n",[146,1497,1499],{"class":148,"line":1498},32,[146,1500,1501],{},"    for value, count in top(raw[name]):\n",[146,1503,1505],{"class":148,"line":1504},33,[146,1506,1507],{},"        print(f\"{count:>5}  {value}\")\n",[11,1509,1510],{},"Run it and you get something like:",[137,1512,1517],{"className":1513,"code":1515,"language":1516},[1514],"language-text","== colors ==\n 3021  rgb(255, 255, 255)\n 1204  rgb(26, 27, 37)\n  412  rgb(99, 91, 255)\n  118  rgb(66, 84, 102)\n","text",[15,1518,1515],{"__ignoreMap":142},[11,1520,1521,1522,1525,1526,1529,1530,1533],{},"That third line is the brand color, found by nothing smarter than counting. ",[15,1523,1524],{},"getComputedStyle"," has already done the hard work for you: it resolved every CSS variable chain, every ",[15,1527,1528],{},"var(--a, var(--b))"," fallback, every cascade conflict, and turned Tailwind utility soup into plain ",[15,1531,1532],{},"rgb()"," values.",[29,1535,1537],{"id":1536},"fonts-and-the-type-scale","Fonts and the type scale",[11,1539,1540],{},"The same collection already has them. Font families come back as full stacks, so take the first entry:",[137,1542,1544],{"className":1320,"code":1543,"language":1322,"meta":142,"style":142},"families = Counter(f.split(\",\")[0].strip('\"\\' ') for f in raw[\"fonts\"])\nprint(families.most_common(5))\n\nsizes = sorted(\n    {float(s.replace(\"px\", \"\")) for s, c in top(raw[\"sizes\"], n=20)},\n)\nprint(sizes)  # e.g. [12.0, 14.0, 16.0, 18.0, 20.0, 24.0, 36.0, 56.0]\n",[15,1545,1546,1551,1556,1560,1565,1570,1575],{"__ignoreMap":142},[146,1547,1548],{"class":148,"line":149},[146,1549,1550],{},"families = Counter(f.split(\",\")[0].strip('\"\\' ') for f in raw[\"fonts\"])\n",[146,1552,1553],{"class":148,"line":156},[146,1554,1555],{},"print(families.most_common(5))\n",[146,1557,1558],{"class":148,"line":174},[146,1559,409],{"emptyLinePlaceholder":408},[146,1561,1562],{"class":148,"line":190},[146,1563,1564],{},"sizes = sorted(\n",[146,1566,1567],{"class":148,"line":215},[146,1568,1569],{},"    {float(s.replace(\"px\", \"\")) for s, c in top(raw[\"sizes\"], n=20)},\n",[146,1571,1572],{"class":148,"line":250},[146,1573,1574],{},")\n",[146,1576,1577],{"class":148,"line":256},[146,1578,1579],{},"print(sizes)  # e.g. [12.0, 14.0, 16.0, 18.0, 20.0, 24.0, 36.0, 56.0]\n",[11,1581,1582],{},"That sorted list is the site's type scale. If it has fifteen entries instead of seven, you are looking at a site without a design system, which is also useful to know.",[29,1584,1586],{"id":1585},"from-raw-values-to-actual-tokens","From raw values to actual tokens",[11,1588,1589],{},"Raw counts are not tokens yet. Three cleanup steps matter:",[37,1591,1592,1601,1614],{},[40,1593,1594,70,1597,1600],{},[44,1595,1596],{},"Drop the defaults.",[15,1598,1599],{},"rgb(0, 0, 0)"," near the top does not mean the brand is black. Browser resets and inherited defaults pollute every element, so check whether a value actually appears on visible, styled elements before promoting it.",[40,1602,1603,70,1606,1609,1610,1613],{},[44,1604,1605],{},"Merge near-duplicates.",[15,1607,1608],{},"rgb(99, 91, 255)"," and ",[15,1611,1612],{},"rgb(99, 92, 255)"," are the same token with a rounding disagreement. Snap channels to a small tolerance before counting, or you will split one token's count across five entries.",[40,1615,1616,1619,1620,1623,1624,1626],{},[44,1617,1618],{},"Name by role, not by value."," The most frequent saturated color on buttons and links is ",[15,1621,1622],{},"primary",". The dominant text color is ",[15,1625,1516],{},". Frequency plus element context gets you there; k-means clustering is overkill for this and I would skip it.",[29,1628,562],{"id":561},[11,1630,1631],{},"Real gotchas, in the order they will bite you:",[63,1633,1634,1644,1650,1667,1680],{},[40,1635,1636,1639,1640,1643],{},[44,1637,1638],{},"Your viewport is a filter."," Computed styles reflect the current viewport only. A ",[15,1641,1642],{},"@media (max-width: 640px)"," override is invisible at 1440px. Extract at two viewports (mobile and desktop) if you care about responsive tokens.",[40,1645,1646,1649],{},[44,1647,1648],{},"Cookie banners poison the palette."," Consent overlays and chat widgets bring their own colors and fonts, and they are often thousands of DOM nodes. Dismiss them or exclude their containers before collecting.",[40,1651,1652,70,1655,1658,1659,1662,1663,1666],{},[44,1653,1654],{},"Fonts can lie.",[15,1656,1657],{},"font-family"," lists what CSS asked for, not what loaded. With ",[15,1660,1661],{},"font-display: swap"," the brand font may never arrive in a headless run. Await ",[15,1664,1665],{},"document.fonts.ready"," before collecting if exact loaded fonts matter.",[40,1668,1669,1675,1676,1679],{},[44,1670,1671,1672,99],{},"Gradients are not in ",[15,1673,1674],{},"backgroundColor"," They live in ",[15,1677,1678],{},"backgroundImage",". If a brand is gradient-heavy, collect that property too or you will report their hero as plain white.",[40,1681,1682,1685,1686,1689,1690,1693],{},[44,1683,1684],{},"Shadow DOM and iframes are invisible"," to ",[15,1687,1688],{},"querySelectorAll",". Web-component-heavy sites need you to walk ",[15,1691,1692],{},"shadowRoot","s explicitly.",[29,1695,1697],{"id":1696},"diy-vs-parsing-css-vs-an-api","DIY vs parsing CSS vs an API",[439,1699,1700,1722],{},[442,1701,1702],{},[445,1703,1704,1707,1710,1713,1716,1719],{},[448,1705,1706],{},"Approach",[448,1708,1709],{},"Tailwind / utility CSS",[448,1711,1712],{},"Runtime CSS-in-JS",[448,1714,1715],{},"Resolves var() and cascade",[448,1717,1718],{},"Media queries",[448,1720,1721],{},"Maintenance",[460,1723,1724,1742,1760],{},[445,1725,1726,1729,1732,1734,1736,1739],{},[465,1727,1728],{},"Playwright + computed styles (this guide)",[465,1730,1731],{},"Yes",[465,1733,1731],{},[465,1735,1731],{},[465,1737,1738],{},"Current viewport only",[465,1740,1741],{},"Browser infra is yours to run",[445,1743,1744,1747,1750,1752,1754,1757],{},[465,1745,1746],{},"Parse CSS files yourself (tinycss2, no browser)",[465,1748,1749],{},"Painful",[465,1751,511],{},[465,1753,511],{},[465,1755,1756],{},"Declared, but unused values included",[465,1758,1759],{},"Low, but wrong on modern sites",[445,1761,1762,1765,1767,1770,1772,1775],{},[465,1763,1764],{},"MiroMiro extract API",[465,1766,1731],{},[465,1768,1769],{},"No (static HTML + CSS, no JS execution)",[465,1771,1731],{},[465,1773,1774],{},"Yes, all declared breakpoints",[465,1776,1777],{},"None",[11,1779,1780,1781,1784],{},"Use the Playwright approach if you are extracting from a handful of sites, need runtime-injected styles, and want full control. Skip the hand-rolled CSS-parsing route: resolving the cascade, specificity, and nested ",[15,1782,1783],{},"var()"," fallbacks yourself is a project, not a script.",[29,1786,1788],{"id":1787},"or-use-one-api-call","Or use one API call",[11,1790,1791],{},"The dedupe, the ranking, the var() chains, the resets, and every declared breakpoint - that is what our extract endpoint does for a living:",[137,1793,1794],{"className":359,"code":1151,"language":361,"meta":142,"style":142},[15,1795,1796,1808],{"__ignoreMap":142},[146,1797,1798,1800,1802,1804,1806],{"class":148,"line":149},[146,1799,614],{"class":180},[146,1801,204],{"class":152},[146,1803,1162],{"class":207},[146,1805,166],{"class":152},[146,1807,390],{"class":389},[146,1809,1810,1812,1814,1816,1818],{"class":148,"line":156},[146,1811,628],{"class":207},[146,1813,204],{"class":152},[146,1815,633],{"class":207},[146,1817,636],{"class":389},[146,1819,403],{"class":152},[11,1821,1822,1823,1826,1827,1826,1830,1826,1833,1826,1836,1826,1839,1826,1842,1845,1846,1849],{},"The JSON response has ",[15,1824,1825],{},"colors",", ",[15,1828,1829],{},"fontFamilies",[15,1831,1832],{},"fontSizes",[15,1834,1835],{},"fontWeights",[15,1837,1838],{},"spacing",[15,1840,1841],{},"borderRadiuses",[15,1843,1844],{},"boxShadows",", and more, already deduped and ranked. Trim it with ",[15,1847,1848],{},"?fields=colors,spacing"," if you only need part of it.",[11,1851,1852,1853,1856,1857,99],{},"If your script from this guide breaks on some site's cookie banner at 2am, that is roughly the moment an API earns its keep. You can ",[23,1854,1855],{"href":573},"get a free API key"," with 100 credits a month, no card, or try it without signing up in the ",[23,1858,1860],{"href":1859},"/api/demo","playground",[29,1862,1864],{"id":1863},"summary","Summary",[11,1866,1867,1868,1870,1871,1874],{},"Playwright plus ",[15,1869,1524],{}," plus a ",[15,1872,1873],{},"Counter"," is the honest way to extract design tokens in Python, and the frequency counting matters more than any clever clustering. Parse-the-CSS approaches are not worth your time on modern sites. I hope this saved you a debugging evening.",[29,1876,649],{"id":648},[651,1878,1880],{"id":1879},"can-i-extract-design-tokens-without-a-headless-browser","Can I extract design tokens without a headless browser?",[11,1882,1883],{},"You can parse the site's CSS with a library like tinycss2, but on modern sites this works badly: CSS-in-JS generates styles at runtime, Tailwind buries the palette in utility classes, and you cannot tell which declared values are actually used. Computed styles from a real browser are the ground truth.",[651,1885,1887],{"id":1886},"how-do-i-extract-tokens-from-a-tailwind-site-where-everything-is-utility-classes","How do I extract tokens from a Tailwind site where everything is utility classes?",[11,1889,1890,1891,1893,1894,1685,1897,1900],{},"Ignore the class names entirely and read computed styles. ",[15,1892,1524],{}," resolves ",[15,1895,1896],{},"bg-indigo-600",[15,1898,1899],{},"rgb(79, 70, 229)"," like any other CSS, so nothing in this guide changes.",[651,1902,1904],{"id":1903},"why-do-my-extracted-colors-include-values-the-site-never-visibly-uses","Why do my extracted colors include values the site never visibly uses?",[11,1906,1907],{},"Three usual suspects: browser defaults on elements you collected, cookie banners and chat widgets injecting their own palette, and transparent or inherited values you forgot to filter.",[651,1909,1911],{"id":1910},"how-many-pages-should-i-sample","How many pages should I sample?",[11,1913,1914],{},"One landing page is usually enough for brand color and typography. Add one product or app page for functional colors (success, error, info). More than three pages rarely changes the top tokens.",[29,1916,1918],{"id":1917},"related-reading","Related reading",[63,1920,1921,1928,1935],{},[40,1922,1923,1927],{},[23,1924,1926],{"href":1925},"/api/design-tokens-api","Design tokens API"," - the endpoint this post's shortcut uses",[40,1929,1930,1934],{},[23,1931,1933],{"href":1932},"/api/docs/design-tokens","Design tokens docs"," - full response shape and field list",[40,1936,1937,1940],{},[23,1938,1939],{"href":833},"Ground truth for AI agents"," - why agents need real tokens instead of guessing from screenshots",[687,1942,1943],{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}",{"title":142,"searchDepth":156,"depth":156,"links":1945},[1946,1947,1948,1949,1950,1951,1952,1953,1959],{"id":1284,"depth":156,"text":1285},{"id":1536,"depth":156,"text":1537},{"id":1585,"depth":156,"text":1586},{"id":561,"depth":156,"text":562},{"id":1696,"depth":156,"text":1697},{"id":1787,"depth":156,"text":1788},{"id":1863,"depth":156,"text":1864},{"id":648,"depth":156,"text":649,"children":1954},[1955,1956,1957,1958],{"id":1879,"depth":174,"text":1880},{"id":1886,"depth":174,"text":1887},{"id":1903,"depth":174,"text":1904},{"id":1910,"depth":174,"text":1911},{"id":1917,"depth":156,"text":1918},"Tutorials","Extract colors, fonts, spacing, and shadows from any website with Playwright in Python - working code, the gotchas that bite, and the one-API-call shortcut.",[1963,1965,1967,1969],{"question":1880,"answer":1964},"You can parse the site's CSS files with a library like tinycss2, but on modern sites this works badly. CSS-in-JS generates styles at runtime, utility-class sites like Tailwind bury the palette in thousands of class rules, and you cannot tell which declared values are actually used. Computed styles from a real browser are the ground truth.",{"question":1887,"answer":1966},"Ignore the class names entirely and read computed styles. getComputedStyle resolves bg-indigo-600 to rgb(79, 70, 229) the same way it resolves any other CSS, so the frequency-counting approach in this guide works unchanged.",{"question":1904,"answer":1968},"Three usual suspects: browser default styles on elements you collected, cookie banners and chat widgets injecting their own palette, and transparent or inherited values you forgot to filter. Count frequency, filter defaults, and dismiss overlays before collecting.",{"question":1970,"answer":1971},"How many pages should I sample to get a reliable palette?","One page is usually enough for brand color and typography if it is the homepage or a landing page. Add one product or app page for the functional palette (success, error, info states). More than three pages rarely changes the top tokens.",{},"/api-blog/how-to-extract-design-tokens-from-any-website-in-python",[1975,1260,1976],"best-design-token-extraction-tools-2026","how-to-extract-website-color-palette-programmatically",{"title":1269,"description":1961},"api-blog/how-to-extract-design-tokens-from-any-website-in-python",[1265,1322,1309,1980,1981],"css","web extraction","L5qnHk0I6Xw2LZ4KpLx52C6CU18QlatcV45aNNbr8F0",{"id":1984,"title":1985,"author":6,"body":1986,"category":2336,"date":1242,"dateModified":709,"description":2337,"extension":711,"faqs":2338,"image":709,"meta":2349,"navigation":408,"path":2350,"readingTime":256,"relatedSlugs":2351,"seo":2353,"stem":2354,"tags":2355,"__hash__":2360},"apiBlog/api-blog/best-design-to-code-apis-2026.md","Best Design-to-Code APIs and Tools in 2026",{"type":8,"value":1987,"toc":2322},[1988,1991,1994,1998,2024,2044,2048,2058,2075,2079,2089,2106,2110,2118,2148,2154,2171,2175,2277,2281,2289,2291,2295,2298,2302,2305,2309,2312,2316,2319],[11,1989,1990],{},"\"Design to code\" means four different products depending on what goes in: a Figma file, a screenshot, a prompt, or a live URL. Most listicles mix them together and compare a Figma plugin against an AI app builder, which helps nobody. Here is the landscape sorted by input, with an honest read on each.",[11,1992,1993],{},"Disclosure up front: we build the URL-to-code entry. The others are genuinely good at their own input type, and I will say so.",[29,1995,1997],{"id":1996},"input-a-figma-file","Input: a Figma file",[11,1999,2000,1609,2008,2015,2016,2023],{},[44,2001,2002],{},[23,2003,2007],{"href":2004,"rel":2005},"https://www.animaapp.com",[2006],"nofollow","Anima",[44,2009,2010],{},[23,2011,2014],{"href":2012,"rel":2013},"https://www.locofy.ai",[2006],"Locofy"," are the established Figma-to-code plugins - React/HTML output, component mapping, years of production use. ",[44,2017,2018],{},[23,2019,2022],{"href":2020,"rel":2021},"https://www.builder.io",[2006],"Builder.io's Visual Copilot"," is the newer AI take on the same job.",[63,2025,2026,2032,2038],{},[40,2027,2028,2031],{},[44,2029,2030],{},"Good:"," if your designs live in Figma with proper auto-layout, these produce real component code and preserve design intent.",[40,2033,2034,2037],{},[44,2035,2036],{},"Bad:"," they need a Figma file. Messy layers produce messy code, and there is no path from \"site I saw\" to code - someone has to design it first.",[40,2039,2040,2043],{},[44,2041,2042],{},"Use when:"," your team designs in Figma and wants the handoff automated.",[29,2045,2047],{"id":2046},"input-a-screenshot","Input: a screenshot",[11,2049,2050,2057],{},[44,2051,2052],{},[23,2053,2056],{"href":2054,"rel":2055},"https://github.com/abi/screenshot-to-code",[2006],"screenshot-to-code"," (open source, very popular) and the screenshot modes of various AI tools take a picture and ask a vision model to write matching HTML/Tailwind.",[63,2059,2060,2065,2070],{},[40,2061,2062,2064],{},[44,2063,2030],{}," works on anything you can see. Zero setup for the OSS version. Genuinely impressive first drafts.",[40,2066,2067,2069],{},[44,2068,2036],{}," every value is a guess. The model approximates colors from pixels, eyeballs spacing, and invents font stacks. Two runs give two different answers. Fine for a prototype, dangerous as a source of truth.",[40,2071,2072,2074],{},[44,2073,2042],{}," speed matters more than fidelity.",[29,2076,2078],{"id":2077},"input-a-prompt","Input: a prompt",[11,2080,2081,2088],{},[44,2082,2083],{},[23,2084,2087],{"href":2085,"rel":2086},"https://v0.dev",[2006],"v0"," (Vercel) and its peers generate UI from a text description. Strictly speaking that is prompt-to-code, not design-to-code, but it is where much of the category's attention went.",[63,2090,2091,2096,2101],{},[40,2092,2093,2095],{},[44,2094,2030],{}," the fastest way to get a decent generic component that never existed before.",[40,2097,2098,2100],{},[44,2099,2036],{}," the output looks like v0 output. If the goal is \"match this existing brand\", a prompt cannot carry a design system's worth of values.",[40,2102,2103,2105],{},[44,2104,2042],{}," greenfield UI with no reference to match.",[29,2107,2109],{"id":2108},"input-a-live-url","Input: a live URL",[11,2111,2112,2113,2117],{},"This is the gap. When the reference already exists as a website - a client's current site, a competitor's pricing page, a section your PM screenshotted - none of the above reads the real CSS. Our ",[23,2114,2116],{"href":2115},"/api/docs/code","/v1/code"," endpoint does:",[137,2119,2121],{"className":359,"code":2120,"language":361,"meta":142,"style":142},"curl \"https://miromiro.app/api/v1/code?url=stripe.com&format=tailwind\" \\\n  -H \"Authorization: Bearer $MIROMIRO_API_KEY\"\n",[15,2122,2123,2136],{"__ignoreMap":142},[146,2124,2125,2127,2129,2132,2134],{"class":148,"line":149},[146,2126,614],{"class":180},[146,2128,204],{"class":152},[146,2130,2131],{"class":207},"https://miromiro.app/api/v1/code?url=stripe.com&format=tailwind",[146,2133,166],{"class":152},[146,2135,390],{"class":389},[146,2137,2138,2140,2142,2144,2146],{"class":148,"line":156},[146,2139,628],{"class":207},[146,2141,204],{"class":152},[146,2143,633],{"class":207},[146,2145,636],{"class":389},[146,2147,403],{"class":152},[11,2149,2150,2151,2153],{},"It parses the live page's actual cascade - specificity, media queries, nested ",[15,2152,1783],{}," chains - and returns the section as Tailwind, JSX, Vue, or plain HTML, with the extracted token set alongside. Auto-detects the hero if you do not pass a selector; 25 credits a call.",[63,2155,2156,2161,2166],{},[40,2157,2158,2160],{},[44,2159,2030],{}," the values are real, not guessed - the exact colors, spacing, and fonts the site ships. It is an API, so it runs inside agents and products, which almost nothing else in this category does.",[40,2162,2163,2165],{},[44,2164,2036],{}," section-level, not whole-app cloning - it will not produce a working multi-page app from a URL. Static HTML + CSS; fully client-rendered apps can come back thin.",[40,2167,2168,2170],{},[44,2169,2042],{}," an agent or product needs faithful code from a page that already exists.",[29,2172,2174],{"id":2173},"the-whole-landscape-in-one-table","The whole landscape in one table",[439,2176,2177,2196],{},[442,2178,2179],{},[445,2180,2181,2184,2187,2190,2193],{},[448,2182,2183],{},"Tool",[448,2185,2186],{},"Input",[448,2188,2189],{},"Output",[448,2191,2192],{},"API available",[448,2194,2195],{},"Values real or guessed?",[460,2197,2198,2215,2230,2246,2261],{},[445,2199,2200,2203,2206,2209,2212],{},[465,2201,2202],{},"Anima / Locofy",[465,2204,2205],{},"Figma file",[465,2207,2208],{},"React/HTML components",[465,2210,2211],{},"Limited",[465,2213,2214],{},"Real (from Figma)",[445,2216,2217,2220,2222,2225,2228],{},[465,2218,2219],{},"Builder.io Visual Copilot",[465,2221,2205],{},[465,2223,2224],{},"Components",[465,2226,2227],{},"Yes (Builder ecosystem)",[465,2229,2214],{},[445,2231,2232,2234,2237,2240,2243],{},[465,2233,2056],{},[465,2235,2236],{},"Image",[465,2238,2239],{},"HTML/Tailwind draft",[465,2241,2242],{},"Self-host",[465,2244,2245],{},"Guessed",[445,2247,2248,2250,2253,2256,2258],{},[465,2249,2087],{},[465,2251,2252],{},"Prompt",[465,2254,2255],{},"React/Tailwind",[465,2257,1731],{},[465,2259,2260],{},"Invented",[445,2262,2263,2266,2269,2272,2274],{},[465,2264,2265],{},"MiroMiro /v1/code",[465,2267,2268],{},"Live URL",[465,2270,2271],{},"Tailwind/JSX/Vue + tokens",[465,2273,1731],{},[465,2275,2276],{},"Real (from the site's CSS)",[29,2278,2280],{"id":2279},"the-verdict","The verdict",[11,2282,2283,2284,2286,2287,99],{},"Match the tool to the input you actually have. Figma file: Anima or Locofy. Nothing yet: v0. A picture and low stakes: screenshot-to-code. A live site that must be matched faithfully, inside a pipeline: that is URL-to-code, and it is the lane we picked precisely because the others do not drive in it. ",[23,2285,455],{"href":573}," (100 credits a month, no card) or try a URL in the ",[23,2288,1860],{"href":1859},[29,2290,649],{"id":648},[651,2292,2294],{"id":2293},"what-is-the-best-way-to-turn-an-existing-website-into-code","What is the best way to turn an existing website into code?",[11,2296,2297],{},"If fidelity matters, read the live CSS (URL-to-code). If speed matters more, screenshot-to-code gives a fast approximation.",[651,2299,2301],{"id":2300},"can-ai-convert-a-screenshot-to-code-accurately","Can AI convert a screenshot to code accurately?",[11,2303,2304],{},"Plausibly, not accurately. Every color, spacing, and font value is a model's guess from pixels.",[651,2306,2308],{"id":2307},"figma-to-code-vs-url-to-code","Figma-to-code vs URL-to-code?",[11,2310,2311],{},"Input: a design file you own vs any live website. The first automates handoff; the second works when no design file exists.",[651,2313,2315],{"id":2314},"which-of-these-have-real-apis","Which of these have real APIs?",[11,2317,2318],{},"v0 and Builder.io within their platforms, and MiroMiro as a plain REST endpoint. The Figma plugins are primarily apps - a hard filter if you are building a pipeline.",[687,2320,2321],{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":142,"searchDepth":156,"depth":156,"links":2323},[2324,2325,2326,2327,2328,2329,2330],{"id":1996,"depth":156,"text":1997},{"id":2046,"depth":156,"text":2047},{"id":2077,"depth":156,"text":2078},{"id":2108,"depth":156,"text":2109},{"id":2173,"depth":156,"text":2174},{"id":2279,"depth":156,"text":2280},{"id":648,"depth":156,"text":649,"children":2331},[2332,2333,2334,2335],{"id":2293,"depth":174,"text":2294},{"id":2300,"depth":174,"text":2301},{"id":2307,"depth":174,"text":2308},{"id":2314,"depth":174,"text":2315},"Comparisons","The design-to-code landscape in 2026 sorted by input - Figma files, screenshots, prompts, or live URLs - and which tool honestly wins for each job.",[2339,2341,2343,2346],{"question":2294,"answer":2340},"Depends on fidelity needs. For a quick approximation, screenshot-to-code tools work from a picture. For code that uses the site's real CSS values - exact colors, spacing, fonts - you need something that reads the live page's stylesheets, which is what a URL-to-code API does.",{"question":2301,"answer":2342},"It produces plausible code fast, but the model guesses every value: colors approximated from pixels, spacing eyeballed, fonts inferred. Great for prototypes; risky when the output must match a real design system.",{"question":2344,"answer":2345},"What is the difference between Figma-to-code and URL-to-code?","Input. Figma-to-code tools (Anima, Locofy, Builder.io) need a Figma file and turn design layers into components. URL-to-code starts from any live website - no design file required - and derives the code from the real rendered CSS.",{"question":2347,"answer":2348},"Which design-to-code tools have an actual API?","Fewer than the category suggests. Most are plugins or apps. If you need code generation inside your own product or agent pipeline, check for a documented REST endpoint first - that requirement alone eliminates most of the list.",{},"/api-blog/best-design-to-code-apis-2026",[1975,2352,728],"best-firecrawl-alternatives-2026",{"title":1985,"description":2337},"api-blog/best-design-to-code-apis-2026",[2356,2357,2358,2359],"design to code","tailwind","code generation","comparison","Ds8Hb1IY5fXrd4oGyzAN3SLgbiC7wqiv79mad9KMYu8",1784751609937]