New in Sketch: MCP Server

Hey folks :waving_hand:

Our MCP server is now out of beta and in our latest update. Thanks to those of you who shared feedback during the beta. We’ll continue to adapt and improve on this feature in future releases.

If you already know what an MCP server is — great! Here are the docs, get yourself set up, go crazy, and show us what you’re making with it. We’d love to see it.

If you’re wondering what an MCP server is — read on…

What is an MCP server?

Many AI apps today aren’t just answer-generating machines; they can actually do things: read files from your computer, search the internet, run cli tools, and so on. This type of AI is dubbed “agentic AI”, because well, it has some level of agency to it.

Now, reading files and running standard CLI commands is straightforward – but what if you want your AI “agent” to, say, access your Sketch designs? Maybe you want it to export all of your icons for developer handoff. Maybe you want it to find issues and inconsistencies in your design system. Maybe you want it to take a template and generate new screens based on that template using existing components.

The problem is, your AI agent doesn’t know anything about Sketch out of the box, so we have to teach it somehow. That’s where Model Context Protocol (MCP) comes into play. Here’s how this protocol works:

  1. In our latest Sketch release, there’s a built-in MCP server. It’s a very basic local-only web server that exposes a couple of MCP commands (aka tools) that an AI client, like Claude or ChatGPT, may call to access Sketch data or even make changes there.
  2. Once you connect your AI client to the Sketch MCP server, it will learn the available Sketch tools and their usage suggestions. These suggestions are supplied by the MCP server and are automatically injected into the LLM’s context.
  3. From now on, whenever you prompt the AI to, say, gather some information from a Sketch document, or make a change there – it will choose a tool that it finds suitable for the task, and call it.
  4. This MCP call is handled by the Sketch MCP server, i.e. by Sketch itself. The results are then sent back to the AI client for further processing.

What can I do with it?

Once you’re all set up, here are a few ideas for prompts you can give your AI client:

  • Explain the visual layout of the selected Sketch frame
  • Are there any symbol sources in my active Sketch document that don’t have any instances?
  • List all design tokens used in my Sketch selection
  • Create a vertical stack of 4 rectangles in sketch, add a unique gradient pattern to each rectangle
  • Fix grammar and spelling mistakes on the selected Sketch frame
  • Export all Sketch symbols prefixed with “icon/” from the current page as svgs to my Desktop
  • Show the full component hierarchy of my Sketch selection as a tree
  • Generate my current Sketch selection in React
  • Replace every text layer on the selected Sketch frame with a random Apple product name (including text in symbols)

Of course, good prompts tend to be more detailed than that, but these hopefully give you an idea of where to start!

Is it secure?

The MCP server is local-only and cannot be accessed remotely. Each call is handled locally by the MCP server — that is, by Sketch itself — and the results are sent back to the AI client for further processing. The server is off by default, and you have full control over when and how external AI clients connect to it.

In other words, this entirely opt-in. You choose whether to use it, and what AI client you use it with.

3 Likes