MCP server
potlot mcp is a stdio MCP server that lets any MCP client design in Potlot documents. This page covers setup for each client, the tools it offers and how it works with the app.
Set it up
npm runs the server for you, so you need Node.js 18 or later. When the Potlot app is installed, npx potlot runs the server that ships inside the app, so both are always the same version.
Claude Code, for every project:
claude mcp add --scope user potlot -- npx -y potlot mcpCodex, in ~/.codex/config.toml. Codex asks before each tool call unless you approve the tools:
[mcp_servers.potlot]
command = "npx"
args = ["-y", "potlot", "mcp"]
[mcp_servers.potlot.tools.execute]
approval_mode = "approve"
[mcp_servers.potlot.tools.get_app_state]
approval_mode = "approve"
[mcp_servers.potlot.tools.get_style]
approval_mode = "approve"
[mcp_servers.potlot.tools.read_skill]
approval_mode = "approve"
[mcp_servers.potlot.tools.get_comments]
approval_mode = "approve"
[mcp_servers.potlot.tools.reply_comment]
approval_mode = "approve"Cursor, in .cursor/mcp.json in your project or ~/.cursor/mcp.json for all of them, then turn the server on in Cursor's MCP settings:
{
"mcpServers": {
"potlot": {
"command": "npx",
"args": ["-y", "potlot", "mcp"]
}
}
}Any other MCP client takes the same command and args as Cursor.
Tools
| Tool | What it does |
|---|---|
read_skill | Returns the Potlot skill, the guide agents read before their first design, and the files it points to, such as execute.md. |
execute | Changes a document by running a JavaScript snippet. Each call is a transaction. See The execute tool. |
get_app_state | An overview of a document: its pages, top-level layers with their boxes, and pending image generations. See Reading the document. |
get_style | Visual style archetypes for a design without a brand direction, as a written brief. It does not change the document. |
get_comments | The comment threads people left on the design. See Comments. |
reply_comment | Answers a comment thread. Only people resolve threads. |
Every tool that works on a document takes its absolute path, filePath. A path that does not exist yet becomes a new document, so an agent can start a design from a plain prompt. Screenshots taken inside execute come back as images the agent can see.
Agents that the Potlot app runs get two more tools, spawn_agents and wait_agents, to split a design between sub-agents. An agent in your own terminal does not get them.
Options
| Flag | Environment | Effect |
|---|---|---|
--open-app | POTLOT_OPEN_APP=1 | Opens Potlot when it is not running and shows each document the agent works on. It opens the app once: if you quit it, the agent carries on headless. |
--require-daemon | Fails when the app is not running, instead of working headless. | |
POTLOT_HOME | The data folder, ~/.potlot by default. A server with another folder only works with an app that uses the same one, and ignores --open-app. |
Flags go after mcp:
claude mcp add --scope user potlot -- npx -y potlot mcp --open-appHow it works with the app
- App open: the server sends every call to the app, so the agent edits the same document you see, live.
- App closed: the server runs the design engine itself, headless, and saves to the same files.
- App opened later: the server hands its documents to the app within a couple of seconds, once any image it is generating has finished. If you quit the app, work carries on headless.
- Versions: if the running app speaks a different version of the server's protocol, the server refuses to attach and says which one to update.
Troubleshooting
- Which binary runs?
npx potlot --whichprints the path: the app's binary when the app is installed, otherwise the one from npm. - npx not found or too old: install Node.js 18 or later, or use the binary inside the app (see the note under Set it up).
- "open in another Potlot process": the document is open in the app or in another agent's server. Close it there, or wait for that agent to finish.
- Cursor shows the server as not loaded: turn it on in Cursor's MCP settings. Cursor does not load a new server until you approve it.
- The agent asks before every call in Codex: approve the tools in
config.tomlas shown above.
New to Potlot? Start with Design with Claude Code.
Something unclear, missing or broken? Write to feedback@anaknegeri.dev.