MCP server
Skala’s command line tool, SkalaCLI, contains an MCP (Model Context Protocol) server. MCP is a standard way for AI agents to use tools, and Skala’s server lets agents like Claude Code, Codex, and Gemini CLI read, edit, render, and export Skala documents. The server works on the documents on disk, so Skala doesn’t need to be open.
Connecting an agent #
The easiest way to connect an agent is via the Agents tab of Skala’s settings, which can be opened by choosing Skala › Preferences. It shows the command for each agent, already filled in with the location of SkalaCLI on your Mac. Copy the command for your agent, and run it in Terminal.
For Claude Code:
claude mcp add skala -- "/Applications/Skala.app/Contents/SharedSupport/SkalaCLI" mcp
For Codex:
codex mcp add skala -- "/Applications/Skala.app/Contents/SharedSupport/SkalaCLI" mcp
For Gemini CLI:
gemini mcp add skala "/Applications/Skala.app/Contents/SharedSupport/SkalaCLI" mcp
For other agents, such as Claude Desktop and Cursor, add the following JSON to the agent’s MCP configuration.
{
"mcpServers" : {
"skala" : {
"args" : [
"mcp"
],
"command" : "/Applications/Skala.app/Contents/SharedSupport/SkalaCLI"
}
}
}
The server is started by running SkalaCLI with the mcp command. It communicates using standard input and output, so it’s launched by your agent, rather than by you.
If you’re editing a document in Skala and an agent is working on the same document, save in Skala first. The agent can only see changes that have been saved, and Skala reloads the document after the agent saves it.
Further reading: Settings and command line
MCP tools #
The MCP server gives agents the following tools. Agents choose which tools to use by themselves, so you don’t need to know these to use them, but it helps to know what they can do.
Documents:
create_document,open_document,list_documents,save_document,reload_document, andclose_documentmanage the documents the agent is working on.undo_last_changerestores a document to how it was before the last change. Only one step is kept.
Reading:
get_outlinelists the pages, layers, and other items in a document.get_nodereads the full details of a page, layer, material, or other item.find_nodessearches a document by name, type, material, build group, or constant.describe_typeexplains the properties of each type of item.get_boundsmeasures the bounding box of layers.evaluateworks out the result of expressions and colors, using the document’s constants.render_previewrenders pages or layers as images, so the agent can look at what it has made.
Creating and styling:
add_shape,add_text, andadd_image_layercreate painted shapes, text layers, and image layers.import_imageadds an image to the document.set_fill,set_gradient,set_stroke, andadd_effectchange materials.
Editing:
insert_nodes,update_nodes,delete_nodes,move_nodes,duplicate_nodes, andcopy_nodesadd, change, remove, and rearrange items, including copying between documents.set_constantsanddelete_constantsmanage the document’s constants.set_document_sizeresizes or crops the document.tidy_documentcleans up a document.
Components:
get_componentreads what a component shows, including its linked document, pages, constants, and overrides.set_componentchanges a component’s linked document, page, and constant overrides.list_component_issueslists the components in a document that can’t be drawn, and why.
Collections:
create_collection,open_collection,get_collection,save_collection, andclose_collectionmanage the collections the agent is working on.add_collection_documents,add_collection_group,rename_collection_group,move_collection_items, andremove_collection_itemschange the documents and groups in a collection. The documents themselves aren’t changed.undo_last_collection_changerestores a collection to how it was before the last change. Only one step is kept.
Exporting:
add_exportsets up layers or pages to export, creating a build group and build task if needed.build_document,build_group,build_page, andbuild_layersexport images, in the same way asBuild All. They can also write to a different folder.
get_bounds, render_preview, get_component, and list_component_issues need a GPU, so they may not work on some virtual machines and CI servers.
Further reading: Constants, expressions, components, and collections