Gene Library Courses Download Pricing Contact Sign in
sketch logo
design Official Website

Sketch MCP Server – AI Design Automation

Sketch's official built-in MCP server gives compatible AI clients local access to selected Sketch documents and the SketchAPI. Use it to inspect designs, automate edits, export assets, audit design systems, generate screens, and support design-to-code workflows while keeping the server local to the Mac.

#interface-design#design-automation#design-to-code

Overview

Sketch includes an official MCP server directly in its Mac app. The server is a
lightweight, local-only HTTP service that lets MCP-compatible AI clients interact
with Sketch documents through defined tools. It runs inside Sketch, remains off
by default, and only becomes available after the user starts it in the app.

What the MCP server enables

Sketch currently exposes two primary MCP tools. get_selection_as_image captures
the current selection in the frontmost document and returns it to the AI client
for visual analysis. run_code executes SketchAPI code generated by the AI,
giving the agent access to the same automation surface available to Sketch
plugins. With these tools, an AI agent can:

  • Explain the structure and visual layout of selected frames.
  • Inspect layers, symbols, styles, tokens, and component hierarchies.
  • Export icons, symbols, and other assets for developer handoff.
  • Audit design systems for unused symbols or inconsistent patterns.
  • Generate layouts or screens from existing components and templates.
  • Correct text, update layers, and automate repetitive document changes.
  • Convert selected design context into implementation guidance or code.

When to use it

Use Sketch MCP when an AI workflow needs direct access to a live Sketch document
rather than screenshots or manually copied specifications. Practical uses include
exporting an icon set, finding inconsistent design tokens, translating App Store
screenshots, generating new screens from a component library, preparing design
handoff, or creating React code from a selected frame.

Connection and authentication

The server requires Sketch 2025.2.4 or later and is unavailable in the Mac App
Store edition. Start it from the Command Bar by choosing Start MCP Server, or
enable it under Settings > General > MCP Server. The default endpoint is
http://localhost:31126/mcp using HTTP. Sketch does not document an API key or
OAuth requirement because the server is local-only and controlled from the app.

Key considerations

The server can run arbitrary SketchAPI code through run_code, so users should
review tool requests and keep approval prompts enabled for consequential changes.
Only connect trusted AI clients, save important documents before large edits, and
verify generated scripts when they may modify or export sensitive design data.
The server cannot be accessed remotely, requires local-network permission on
macOS, and must remain running in Sketch while the AI client is connected.

Supported Transports

streamable_http

URL: http://localhost:31126/mcp

Frequently Asked Questions

When should an AI agent use the Sketch MCP server?
Use it when a workflow needs direct access to a live Sketch document for tasks such as design analysis, asset export, design-system auditing, repetitive editing, screen generation, or design-to-code handoff.
What does the Sketch MCP server add to an AI agent's capabilities?
It gives the agent structured access to the current Sketch selection and the ability to execute SketchAPI code, allowing it to inspect and automate document operations instead of relying only on screenshots or pasted data.
What can an AI agent access or manage through Sketch MCP?
The agent can analyze the current selection as an image and use generated SketchAPI scripts to inspect or modify layers, symbols, styles, text, components, exports, and other document data supported by the SketchAPI.
How is authentication configured for the Sketch MCP server?
Sketch does not document OAuth, API keys, or bearer-token headers for this server. It runs locally inside the Mac app, is off by default, and becomes available only after the user starts it and grants any required macOS local network permission.
Which transport should be used for the Sketch MCP server?
Use the local HTTP transport at http://localhost:31126/mcp. Sketch does not provide a hosted remote endpoint or a separate stdio package; compatible clients connect directly to the local server running inside the Sketch app.