Skip to content

Paper

Build a local xmcp integration with Paper Design using the managed MCP client.

For the complete documentation index, see llms.txt. Markdown variants of every page are available by appending .md to the URL.

Paper Design exposes design tools through its desktop CLI. Use xmcp/client to call those tools from your own xmcp server. The runnable STDIO example supports discovery, an explicit allowlist, and forwarding of text, images, and structured results.

Connect to Paper

Install Paper Desktop, open a design file, and copy the absolute CLI path from the MCP panel into PAPER_COMMAND.

TypeScript

withClient closes the connection after the operation, including on failure. Put calls inside tool handlers so importing or building the server does not launch Paper. Use xmcp 1.8 or later for the managed client API.

Discover and authorize tools

The example exposes two tools:

ToolBehavior
list-paper-toolsReturn upstream instructions, tool names and input schemas, and an allowed flag.
call-paper-toolForward a call only when its exact name appears in PAPER_ALLOWED_TOOLS.

Start with an empty allowlist, inspect discovery, then choose the upstream tools needed for your workflow. Set their names as a comma-separated value in .env and restart the server. Both reads and writes must be explicitly enabled; direct calls cannot bypass the allowlist.

Paper validates the delegated arguments against its own schemas. The forwarding tool preserves upstream isError, images, and structured content. Because allowed tools may edit or delete content, its annotations conservatively describe it as potentially destructive.

Local design workflow

The integration operates on Paper's currently open file. Follow the upstream instructions and inspect the current document before modifying it. Paper's CLI can advertise tools while Desktop is closed, but design reads and writes still need the app and a file open. This example is a local workflow, not a hosted or multi-user service.

See the example README for build commands, MCP client configuration, and credential-free tests.

One framework to rule them all