### Sketch library installation URL Source: https://www.sketch.com/docs/libraries/sharing-libraries.md Use this URL format to trigger the Sketch app to add a library from a remote server. The JSON file URL must be URL-encoded. ```text sketch://add-library?url=https%3A%2F%2Fmy.server.com%2FTemplateLibraryUpdate.json ``` -------------------------------- ### Copy CSS Attributes Output Example Source: https://www.sketch.com/docs/importing-and-exporting Example of the CSS output when using Edit > Copy > Copy CSS Attributes on a simple shape. Shows the background color and border-radius properties. ```css /* Rectangle: */ background: #6dd400; border-radius: 5px; /* Rectangle: */ ``` -------------------------------- ### Copy CSS Attributes Example Source: https://www.sketch.com/docs/designing/importing-and-exporting.md Example of the CSS code generated when using the Copy CSS Attributes feature on a shape layer. ```css /* Rectangle: */ background: #6dd400; border-radius: 5px; /* Rectangle: */ ``` -------------------------------- ### Create a plain text data source Source: https://www.sketch.com/docs/designing/data.md Create a .txt file with each data value on a new line to use as a text data source in Sketch. ```text Afghanistan Albania Algeria Andorra Angola ... ``` -------------------------------- ### Configure Cursor MCP settings Source: https://www.sketch.com/docs/mcp-server.md JSON configuration to add the Sketch MCP server to the Cursor mcp.json file. ```json { "mcpServers": { "sketch": { "url": "http://localhost:31126/mcp", "type": "http" } } } ``` -------------------------------- ### Configure Antigravity MCP settings Source: https://www.sketch.com/docs/mcp-server.md JSON configuration to add the Sketch MCP server to the Antigravity raw configuration. ```json { "mcpServers": { "sketch": { "serverUrl": "http://localhost:31126/mcp" } } } ``` -------------------------------- ### Library JSON metadata file Source: https://www.sketch.com/docs/libraries/sharing-libraries.md Create this JSON file to host a Library on a server. Ensure all URLs use https and the file is saved with a .json extension. ```json { "versionID" : "0.5.1", "downloadURL" : "https://my.server.com/TemplateLibrary.sketch", "downloadFileSize" : 68487516, "creationDate" : "Wed, Mar 17 2022 14:00:00 +0000", "itemName" : "Template Library", "imageURL" : "https://my.server.com/TemplateLibrary.png" } ``` -------------------------------- ### Configure Codex MCP settings Source: https://www.sketch.com/docs/mcp-server.md Configuration for the ~/.codex/config.toml file and the command to verify the active server. ```toml [mcp_servers.sketch] url = "http://localhost:31126/mcp" ``` ```text /mcp 🔌 MCP Tools • Server: sketch • URL: http://localhost:31126/mcp • Tools: get_design_assets, get_document_info, get_guide, get_layer_tree_summary, get_libraries, get_screenshot, get_symbol_overrides, run_code ``` -------------------------------- ### Connect Claude Code to Sketch MCP Source: https://www.sketch.com/docs/mcp-server.md Commands to register the Sketch MCP server with Claude Code and verify the connection status. ```bash claude mcp add --transport http sketch http://localhost:31126/mcp ``` ```bash claude mcp get sketch ``` -------------------------------- ### Create a JSON file for linked data Source: https://www.sketch.com/docs/designing/data.md Use a JSON array of objects to combine multiple sets of data, such as images and text, for realistic design stress testing. ```json [ { "Photo": "baobab.jpeg", "Location": "Menabe, Madagascar", "Title": "Avenue of the Baobabs", "Trees": "20 trees", }, { "Photo": "laurel.jpeg", "Location": "Madeira, Portugal", "Title": "Laurel Forest", "Trees": "300 trees", }, { "Photo": "bamboo.jpeg", "Location": "Kyoto, Japan", "Title": "Sagano Bamboo Forest", "Trees": "2000 trees", } ] ``` -------------------------------- ### Configure MCP URL for Copilot Source: https://www.sketch.com/docs/mcp-server.md The URL required when prompted by the Copilot MCP Add command. ```text http://localhost:31126/mcp ``` -------------------------------- ### Create a JSON file with nested data structures Source: https://www.sketch.com/docs/designing/data.md Include nested objects in your JSON to map data to groups or symbols within Sketch by matching the group name. ```json [ { "name": "Anje Keizer", "avatar": "/Faces/109.jpg", "location": "Bangkok", "bio": "Dog lover 🐕, mahjong champion 🀄️, and traveler 🗺 ", "social": { "handle": "@akeizer01", "bio": "Loving life and living in Dallas, go Mavs!" } }, ] ``` -------------------------------- ### Reset the MCP Server port to default Source: https://www.sketch.com/docs/mcp-server.md Run this command to remove the custom port configuration and revert to the default port value. ```bash defaults delete com.bohemiancoding.sketch3 mcpServerPortNumber ``` -------------------------------- ### Add access level attribute Source: https://www.sketch.com/docs/getting-started/single-sign-on/scim-provisioning/microsoft-entra.md The attribute string required when editing the attribute list for customappsso in Entra ID. ```text urn:ietf:params:scim:schemas:extension:sketch:1.0:User:accessLevel ``` -------------------------------- ### Disable MCP Server functionality Source: https://www.sketch.com/docs/mcp-server.md Run this command to hide the MCP server functionality from the Sketch Mac app. ```bash defaults write com.bohemiancoding.sketch3 mcpServerEnabled -bool NO ``` -------------------------------- ### HTML snippet for embedding Sketch documents Source: https://www.sketch.com/docs/sharing-and-collaborating/sharing-and-viewing-documents/embedding-sketch-documents.md Use this HTML structure to embed a Sketch document into a custom web page. Ensure the snippet is placed between the
tags of your HTML document. ```html ``` -------------------------------- ### Access level mapping expression Source: https://www.sketch.com/docs/getting-started/single-sign-on/scim-provisioning/microsoft-entra.md The expression used in the attribute mapping to translate Entra ID app role assignments into Sketch access levels. ```text IIF(SingleAppRoleAssignment([appRoleAssignments])="", "viewer", ToLower(SingleAppRoleAssignment([appRoleAssignments]), )) ``` -------------------------------- ### Change the MCP Server local port number Source: https://www.sketch.com/docs/mcp-server.md Use this command to set a custom port for the MCP server. Replace 1234 with a value between 1024 and 49151, ensuring it is not currently in use by another service. ```bash defaults write com.bohemiancoding.sketch3 mcpServerPortNumber -int 1234 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.