mcp-sketch
This MCP server exposes a single tool for analyzing Sketch-exported HTML zip files into structured design data.
Analyze a Sketch HTML zip via a required
file_path.Target a specific page or artboard by ID or name.
Restrict analysis to a rectangular region using
rect[x, y, width, height].Optionally save the analysis result, defaulting to true.
Specify a custom assets output path, defaulting to
src/assets/sketch.
This schema does not expose the README's list, dev, or compare tools.
Allows for parsing and extracting design structure information from HTML zip archives exported from Sketch, providing detailed data on pages, artboards, layers, and styles.
mcp-sketch
A local tool providing both MCP server and CLI modes to parse HTML zip archives exported from Sketch-Meaxure and extract design structure information.
SKILL
It is recommended to download the sketch-html
skilland customize your own version to analyze zip files exported fromSketch-Meaxure.You can also use the
skillstool to download it.
npx skills@latest add YamadaAoi/mcp-sketch -s sketch-htmlRelated MCP server: codesign-mcp
Disclaimer
To avoid confusing the
AI, this tool filters out some meaningless layers, but it does not rule out the possibility of filtering out some valid layers.It is recommended to communicate with
UIdesigners; for complex effects, try to use sliced images; for simple effects, set aradiusfor emphasis, even if it is just1.
Features
Parse Sketch exported HTML zip archives and extract design structure
Supports filtering by page and artboard
Supports parsing specified rectangular areas
Outputs design structure JSON and preview images for AI reference
Provides both MCP server and CLI usage modes
Usage
Method 1: Direct CLI Usage
Use with npx:
npx -y mcp-sketch analyze -p /path/to/export.zipCommand Options
Option | Abbreviation | Description |
|
| Path to the Sketch HTML zip archive (Required) |
| Page ID | |
| Page name | |
| Artboard ID | |
| Artboard name | |
|
| Specify the rectangular area to parse, format: |
| Path to store sliced images, default | |
| Whether to save analysis results to a local file, default |
CLI Example
If parameters contain spaces, they must be enclosed in quotes
# 分析 zip 中第一个页面第一个画板
npx -y mcp-sketch analyze -p "/path/to/export .zip"
# 分析指定页面
npx -y mcp-sketch analyze -p /path/to/export.zip --pn 首页
# 分析指定页面指定画板
npx -y mcp-sketch analyze -p /path/to/export.zip --pn 首页 --an 用户管理
# 分析指定区域
npx -y mcp-sketch analyze -p /path/to/export.zip --pn 首页 --an 用户管理 -r "[0,0,1920,64]"Method 2: MCP Server
You must set the environment variable MCP_MODE=1 to enable the MCP server. Configure it as a local MCP server to allow AI tools to call it directly.
opencode:
{
"mcp": {
"mcp-sketch": {
"type": "local",
"command": ["npx", "-y", "mcp-sketch"],
"enabled": true,
"environment": {
"MCP_MODE": "1",
"LOG_LEVEL": "debug"
}
}
}
}Trae:
{
"mcpServers": {
"mcp-sketch": {
"command": "npx",
"args": ["-y", "mcp-sketch"],
"env": {
"MCP_MODE": "1"
}
}
}
}MCP Parameters
Use the sketch_html_analyze tool to analyze the HTML zip archive exported from Sketch:
Parameter | Type | Required | Description |
file_path | string | Yes | Path to the Sketch HTML zip archive |
page_id | string | No | Page ID |
page_name | string | No | Page name |
artboard_id | string | No | Artboard ID |
artboard_name | string | No | Artboard name |
rect | number[] | No | Specify the rectangular area to parse, format: |
assets_path | string | No | Path to store sliced images, default |
save_result | boolean | No | Whether to save analysis results to a local file, default |
MCP Call Examples
Analyze the first artboard of the first page in the Sketch HTML zip archive:
sketch_html_analyze({ file_path: "/path/to/export.zip" })Analyze the first artboard of a specified page:
sketch_html_analyze({ file_path: "/path/to/export.zip", page_name: "首页" })Analyze a specified artboard on a specified page:
sketch_html_analyze({ file_path: "/path/to/export.zip", page_name: "首页", artboard_name: "用户管理" })Analyze a specified area of a specified artboard on a specified page, e.g., parsing the top navigation bar of a user management artboard:
sketch_html_analyze({ file_path: "/path/to/export.zip", page_name: "首页", artboard_name: "用户管理", rect: [0, 0, 1920, 64] })Parameter Priority
page:
page_id>page_name> first pageartboard:
artboard_id>artboard_name> first artboardrect: Specifies the rectangular area to parse. The filtering rule is that as long as the element's
x, y, x+width, y+heightare within the rectangle, it will be parsed.
Return Results
The tool returns text: {artboard: {analysis_result}, previewPath: "preview_image_path"}
artboardArtboard data, including layers, styles, images, and other information
previewPathUses
sharpas anoptionalDependenciesfor image processing.If installation fails (extreme case, as
sharpdepends onlibvips), the original full artboard image will be returned.If installation succeeds, it will resize, crop the
rectarea (if specified), and compress it intowebpformat.Only processes preview images; does not handle
sketchslices.
Output File Location
Parsed sliced images are saved in the
src/assets/sketch/directory by default (can be customized viaassets_path)Parsed design content is saved to a local JSON file by default (for manual review), stored in a folder with the same name as the zip file at the same level
Usage Suggestions
Use models that support multi-modality to read preview images and correct the design structure
Keep the data volume provided to the AI under
50KBto improve AI analysis accuracy (the locally stored JSON file is formatted, while the data passed to the AI is in a compact format)It is recommended to use the
rectparameter to parse specific areas within an artboard for modular development and improved granularity.
Guide
Available Tools
1 toolsketch_html_analyzesketch_html_analyzeC
Analyze sketch html files and return the design structure of corresponding pages or drawing boards
Inputs: file_path (required), page_id, page_name, artboard_id, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool in the set, there is no possibility of confusion or overlap with other tools within this server.
The single tool uses clear snake_case with a descriptive verb suffix, but with only one data point, a broader naming pattern cannot be established.
A single analysis tool is too few for the apparent scope implied by the server name 'mcp-sketch', suggesting a severely limited integration surface.
The server only supports analyzing HTML exports, lacking any functionality for creating, editing, or exporting native Sketch files, representing significant gaps for design workflow automation.
Maintenance
Related MCP Connectors
MCP server for web extraction and rendering via AceDataCloud WebExtrator
MCP server to assist with JxBrowser development.
A remote MCP server to convert HTML documents (URL or raw source) to PDF or screenshots
Document conversion MCP server: PDF to Markdown, image OCR, spreadsheet parsing.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceMCP server to provide Sketch layout information to AI coding agents like Cursor71MIT
- AlicenseAqualityBmaintenanceLocal MCP server for Tencent CoDesign sharing links, exposing artboards, layer specs, preview images, and exported slices to support design-to-code workflows.860 npm23MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for ingesting UI screenshots, Figma MCP node JSON, or hybrid Figma-plus-screenshot sources into a cross-platform design-to-code artifact pipeline.109 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server for the MiroMiro design-extraction API. It extracts real design data from live websites—including brand colors, fonts, tokens, SVGs, images, and component code—so AI agents can build from actual values.165 npmMIT