Skip to main content
Glama
vvmahesh0

paper-cdp-mcp

by vvmahesh0

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CDP_PORTNoThe port on which Paper Desktop's Chrome DevTools Protocol is listening. Default is 9222.9222

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}
prompts
{}
resources
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
apply_document_transactionA

Executes an atomic, validated multi-step document mutation with precondition checks, dry-run preview, and automatic rollback on failure.

apply_node_patchB

Executes a unified declarative patch list (setStyle, setText, rename, move, delete, duplicate, setLayout) against one or many canvas nodes with dry-run support.

assert_design_rulesC

Executes programmatic design assertions (alignment, uniform dimensions, bounds containment, min touch targets, WCAG contrast, instance counts) for self-verifying agent workflows.

audit_design_tokensB

Scans an artboard or container for design system compliance, token consistency, and WCAG AA contrast.

auto_layout_gridB

Automatically rearranges and neatly aligns a list of artboards into a clean multi-column grid matrix with consistent gutters.

autofix_contrast_issuesA

Automatically analyzes and corrects color contrast issues to achieve WCAG 2.1 AA (4.5:1) or AAA (7:1) compliance.

batch_export_assetsA

Batch exports multiple artboards or layers as PNG/SVG at 1x, 2x, or 3x resolutions in parallel.

batch_write_artboardsC

Generates multiple artboards and populates their complete HTML UI in a single high-speed atomic transaction (300ms).

bind_data_repeaterC

Binds an array of structured JSON records to a repeated template card/row, populating dynamic lists on the canvas.

calculate_design_quality_scoreB

Calculates multi-dimensional design quality metrics (8pt alignment, token coverage, WCAG contrast, layout consistency) with a 0-100 score.

check_system_healthB

Performs a comprehensive diagnostic health check on Paper Desktop, CDP connection, in-memory rate-limit bypass, and active document state.

compare_visual_regressionB

Captures and compares visual screenshots of a node or artboard to detect unexpected visual regression or layout drift.

configure_layout_constraintsC

Configures auto-layout (Flex/Grid) rules, direction, padding, gap, alignment, and sizing constraints on a container frame.

connect_artboards_flowC

Generates a visual flow connection card or user-journey indicator between two screens.

create_artboardA

Creates a new artboard (top-level frame) on the canvas.

  • Returns the node ID which you can then use with write_html({mode:'insert-children'}) to add content.

  • Use the styles property to set the artboard size and styles.

  • paper-gen:// URLs in styles (e.g. backgroundImage) generate AI images. ONLY if the user asked; read the "image-generation" guide first.

  • Artboards default to display: "flex", flexDirection: "column"

  • The artboard will always be placed in the best empty spot on the canvas.

  • Use one of the default sizes below unless the user specifies a size.

Default sizes by device (when the user doesn't specify a size):

  • Desktop: 1440 x 900px

  • Tablet: 768 x 1024px

  • Mobile: 390 x 844px — include a status bar at the top. Call get_guide({ topic: "mobile-status-bar" }) for paste-ready markup; do not hand-draw one.

The suggested device height is just a starting point to set the scene and understand how much space there is for the content above the fold. When wrapping up, if content clips, switch the artboard to height: "fit-content" via update_styles instead of guessing a new fixed height.

create_checkpointA

Saves an atomic snapshot checkpoint of current artboards or nodes for 1-click rollback.

create_fileA

Create a new Paper file in the user's active team and returns the new file's ID. To start working in the new file, call open_file with the returned ID.

create_pageA

Creates a new page in either the active file or an explicit file if fileId is provided, and returns its ID. Does not switch to the new page — call open_file with the fileId and the returned pageId to start working in it.

create_tokensA

Create one or more design tokens. Each entry needs type, name, and value. Use var(--other-token) as the value to alias another design token. Returns one {name, result: "created"} (or {result: "error", message}) per input entry. Order is important. For color tokens define semantic colors before palette colors, with neutral colors first, then primary, secondary, and then accent colors. For all other design token types define them based on the size of the value, smallest first. Prefer reusing design tokens before creating new ones.

delete_nodesA

Delete one or more nodes from the design. Also deletes all descendants of the specified nodes. IMPORTANT: Before deleting nodes that you think have an incorrect parent verify using get_node_info first.

diff_design_nodesA

Computes a deep semantic design diff between two nodes or artboards (structural, styling, text deltas, dimension shifts, token bindings).

duplicate_nodesA

Duplicate one or more nodes in the design. Creates a deep clone of each node (including all descendants). Duplicated artboards are automatically positioned in a blank area to avoid overlap. Returns the source and new node IDs, plus a descendantIdMap that maps every original descendant ID to its cloned equivalent. Since you already know the source tree structure, you can use this map to immediately reference any cloned node (e.g. to call setTextContent) without any intermediate lookups.

exportB

Export nodes as image or video files. Unless the user specifies, do not override the default export settings.

export_codeB

Transpiles Paper nodes and layer hierarchies directly into production-ready code (SwiftUI, React + Tailwind, Flutter, CSS Tokens).

export_combined_pdfA

Export multiple nodes combined into a single PDF file, one page per node. Pages are auto-ordered by canvas position (top-to-bottom, then left-to-right). Use this instead of "export" when the user wants the nodes merged into one PDF rather than separate files. The quality and resampling used is the highest of any existing PDF export settings found on individual nodes.

export_figma_compatible_jsonA

Exports a Paper artboard hierarchy into standardized Figma REST/Plugin node schema JSON for cross-tool interoperability.

extract_design_system_tokensA

Analyzes an existing design document and extracts implicit design tokens (color palette, typography scale, radius steps, spacing values) for system creation.

find_nodesA

Find nodes by computed style and/or text content — useful for locating everything using a given token, literal value, or piece of copy before a bulk update. Searches the whole page, or pass nodeId to scope to a node and its descendants. Pass filters, textValue, or both (AND). filters are { styleName, styleValue } matchers combined with AND (color is X AND fontSize is Y). styleValue may be a literal ("#ff0000", "16px") or a token ("--color-primary"). Both fields accept "" wildcards and colors match by equivalence ("#ccc" == "rgb(204, 204, 204)"). A literal color query also finds token-bound usages (reported as the var(--token) reference), so to migrate a raw color to a token you can search the color directly. Omit one field to match any property or any value. textValue matches Text node content, case-insensitive, with "" wildcards anchored to the whole value ("Submit", "Get *", "started"). Each result has its ID, name, component, and a matched array of the { styleName, styleValue } / { textValue } entries that satisfied the query; for a color or token found inside a composite value (gradient/border), styleValue is the matched fragment, not the whole value.

finish_working_on_nodesA

MUST call this when done working. Remove the working indicator from artboards you were editing.

Call with no arguments to release all working indicators at once. Optionally pass specific artboard IDs if you want to release only some.

generate_component_statesB

Generates a complete component interaction state sheet (Default, Hover, Pressed, Focused, Disabled, Skeleton Loading).

generate_design_spec_docB

Generates a comprehensive design handoff specification document for engineering (tokens, components, dimensions, spacing redlines).

generate_journey_storyboardC

Generates a structured user journey storyboard linking multiple screens with step indicators, user goals, and action annotations.

generate_responsive_variantsB

Generates responsive mobile (390px) and tablet (820px) artboard layouts adapted from a desktop design.

generate_theme_variantA

Automatically creates a Light or Dark mode variant of an existing artboard by intelligently inverting surfaces, borders, and typography while preserving brand accents.

get_basic_infoA

Get essential context about the current design: file name, page name, node count, artboards with their dimensions, font families used, a compact list of design tokens. Call get_basic_info first to understand the canvas situation.

  • worldX/worldY properties are the world position of the node

  • x/y properties are the relative position of the node within its parent

get_childrenB

Get the direct children of a node. Returns a list of child nodes with their IDs, names, component types, how many children each has, and each child's worldX/worldY (world position) and x/y (relative to parent). Returns an error if the node does not exist.

get_comment_threadA

Get full details for one visible comment thread, including its open/resolved status, all reply messages, reactions, attachments, page context, and pinned node context. Works for any status. Call list_comment_threads first when you do not already know the commentThreadId. Deleted threads/messages are never returned.

get_computed_stylesA

Get the computed CSS styles for one or more nodes. Returns a map of nodeId to CSSProperties object. Supports batch requests.

get_fill_imageA

Extract the image data from a node that has an image fill. Returns the image as base64-encoded JPEG data optimized for AI consumption. Large images are automatically resized to fit within API size limits. The original image URL is included in the metadata if you need the full-quality source. Returns an error if the node does not exist, or a message if the node has no image fill, is an SVG (use get_jsx), or the image is still generating (poll get_node_info to know when it completes).

get_font_family_infoA

Get information about whether a font family is available to the user and detailed information about all weights and styles in the family. This tool looks up fonts on the user's machine and Google Fonts.

get_guideA

Read a detailed guide on a specific topic. Call with topic "paper-mcp-instructions" before using other Paper tools for best results. Other topics: "mobile-status-bar", "figma-import", "image-generation".

get_jsxB

Get the JSX code representation of a node and its descendants. Supports two styling formats: Tailwind CSS classes (default) or inline styles.

get_node_infoA

Get detailed information about a specific node by ID, including its size, visibility, lock state, parent, children IDs, text content (for text nodes), and the node's worldX/worldY (world position) and x/y (relative to parent). When the node has a generated image, also returns imageGeneration.status (processing / ready / error) and imageGeneration.output (raster / svg) — poll this to know when generation completes. Raster fills are read with get_fill_image; SVG output is read with get_jsx. Returns an error if the node does not exist.

get_screenshotA

Capture a screenshot of a specific node by ID. Returns the image as base64-encoded data. Images are automatically capped to fit API size limits. Defaults to 1x scale which is sufficient for verifying layout, spacing, and visual appearance. Use scale=2 only when you need to read small text or inspect fine visual details. Capture child nodes when needing higher resolution screenshots.

get_selectionA

Get detailed information about the currently selected nodes, including IDs, names, component types, size, and which artboard they belong to.

get_tokensA

List the file's design tokens (colors, spacing, typography, etc).

get_tree_summaryA

Get a compact text summary of a node's subtree hierarchy. Returns an indented tree showing each node's component type, name, ID, and dimensions. Much cheaper than getJSX for understanding structure — use this for orientation before diving into specific nodes. Returns an error if the node does not exist.

insert_curated_mediaB

Inserts high-quality curated stock imagery (portraits/avatars, landscape, tech mockups) or procedural mesh gradients directly as fills.

insert_iconA

Searches and injects a crisp vector icon (Lucide, Phosphor, Heroicons) directly into a container node in Paper.

inspect_scene_contextC

Provides a compact, AI-optimized semantic scene model of current working context (selection, parent containers, surrounding siblings, layout model, design tokens, and off-canvas elements).

list_checkpointsA

Lists all available design checkpoints and timestamps.

list_comment_thread_authorsA

List every user who has started a comment thread or written a visible message in the open file, with their user ID, display name, activity counts, and last activity time. Use this to resolve a person's name to a userId before filtering list_comment_threads by participantUserId or threadAuthorUserId. Deleted threads/messages are never counted.

list_comment_threadsA

List visible comment threads in the open file as compact summaries. A comment thread is a conversation pinned to a node: a first message plus reply messages, each with its own author, and an "open" or "resolved" workflow status. Lists only open (unresolved) threads by default. Use this first to discover relevant discussion, then call get_comment_thread for full replies. If you are tasked and fully addressing a thread's feedback, mark it done with set_comment_thread_status. Supports page, node, status, author, search, sort, and pagination filters. User ID filters accept "current-user" for the signed-in user. Deleted threads/messages are never returned.

list_filesA

Lists Paper files that the user has open, then files that have been recently accessed in their active team. Timestamps will be missing for files that are outside the users active team.

localize_artboardA

Translates and localizes an artboard into German (de), Japanese (ja), Spanish (es), or French (fr) and tests for layout truncation.

move_nodesA

Move one or more existing nodes. Preserves node identity (IDs stay the same), so any references you are holding continue to work. Prefer this over duplicate+delete or rewriting HTML when you just want to reposition or reparent existing layers.

Each move uses one of two shapes:

  1. Sibling-relative: { nodeId, before: siblingId } or { nodeId, after: siblingId }. The destination parent is inferred from the sibling.

  2. Parent-absolute: { nodeId, parentId, index? }. The node is placed at the given index under parentId, or appended if index is omitted. index is clamped to [0, childCount] — use 0 for first. Pass parentId: 'root' as a shortcut for the top-level page root as a parent.

Use shape sibling-relative shape 1 when you already know a neighbor; use parent-absolute shape 2 when you want to move into a specific parent (or to the end of one).

Notes:

  • Moves apply sequentially; later moves in the same batch see earlier changes.

  • For flex/flow parents this changes visual order. For freeform parents this changes stacking (last child renders on top) and does not move the node's world position.

  • When moving to a new parent, Paper may adjust layout-related styles (width/height intents like filling available space) may be adjusted so the node does not collapse to zero size in the new parent.

  • Cannot move the root. Cannot target a node that cannot have children. Cannot move a node under itself or any of its own descendants. For before/after, the sibling cannot be the moved node itself. Returns resolved parentId and index for each successful move, plus affectedParents — the post-batch children list of every parent whose order changed (both sources and destinations, deduplicated). Use affectedParents to refresh your mental model of the tree without a follow-up get_children.

open_fileA

Open a Paper file by its ID or URL, optionally at a specific page. When called any subsequent tool calls without fileId present will target this file. Returns the same result as get_basic_info.

pan_to_nodeA

Smoothly pans and centers the Paper canvas camera on a specific node or artboard so the user can see what the agent is working on.

populate_mock_dataB

Populates realistic contextual mock data (users, financial ledger, SaaS spaces, metrics) into artboard cards or text layers.

query_nodesA

High-performance structured search engine for querying canvas nodes by type, name regex, text content, bounds, parent hierarchy, and logical AND/OR/NOT conditions with pagination and projections.

query_spatial_relationshipsA

Calculates precise 2D canvas spatial relationships (contains, overlaps, nearest, distances, horizontal/vertical alignments, same-row, same-column, gaps) between nodes.

refactor_design_structureA

Safely refactors canvas structure (semantic layer renaming, 8pt spacing normalization, flattening redundant wrappers) with dry-run support.

rename_nodesA

Rename one or more layers in the design. Sets the display name shown in the layer tree. Names longer than 50 characters are automatically truncated. Supports batch renames in a single call.

rollback_checkpointB

Rolls back and restores canvas nodes to an earlier checkpoint state.

set_camera_zoomB

Explicitly sets the canvas zoom percentage (e.g. 0.5 for 50%, 1.0 for 100%, 2.0 for 200%).

set_comment_thread_statusA

Set the workflow status of one comment thread to "resolved" or "open". Resolve a thread once its feedback has been fully addressed in the design — this is how you mark review comments as done. Reopen a resolved thread if more work turns out to be needed. Use list_comment_threads or get_comment_thread to find the commentThreadId.

set_text_contentA

Set the text content of one or more Text nodes. Only works on nodes with component type "Text". Use this instead of writeHTML replace when you only need to change text. Supports batch updates in a single call.

set_tokensA

Update or delete existing design tokens by their full CSS variable name. Each entry needs name; any of newName, value, delete are optional.

  • Rename: set newName.

  • Update value: set value. Use var(--other-token) to alias.

  • Delete the design token: set delete: true. Returns one result per input entry. Per-entry errors are reported in-band.

transform_lofi_to_hifiB

Upgrades a low-fidelity wireframe or mockup artboard into a polished, high-fidelity production screen applying active design tokens.

undo_last_transactionC

Reverts the most recent committed agent transaction on the canvas.

update_stylesA

Update styles on one or more nodes. Use this for targeted style changes. Supports design tokens as CSS variables. Supports batch updates in a single call.

  • Setting the top / left styles of an artboard changes its position on the canvas.

  • Anywhere urls are accepted, paper-gen:// URLs can be used to generate images with AI. ONLY use when the user explicitly asked for image generation. Read "image-generation" guide first via get_guide.

  • Styles you set that are inert in the node's context are dropped rather than applied; their keys are returned under the ignoredStyles property.

write_htmlA

IMPORTANT: Write incrementally. The user sees you write on the canvas in real-time. Show them visual progress every few seconds. Each write_html call should create one visual item: a header, a single list row, a button bar, or a paragraph block. Even simple components should be incremental: a card = container/header, then each row, then the footer. IMPORTANT: Prefer cloning instead of remaking existing Paper nodes using <x-paper-clone node-id="A-01" style="..." />. For repeated elements: create the container first, then add each item as a separate write_html call into the container or use the duplicate tool on the first child.

HTML and CSS rules:

  • Always use inline styles (style="..")

  • Enforce consistency with design tokens as CSS variables if available

  • All Google Fonts and locally installed fonts are available in font-family

  • All CSS color formats are supported: hex, rgb(a), hsl(a), oklch, oklab etc

  • Use flex as the primary layout mode. Flexbox, padding, and gap are the core layout tools in Paper's interface

  • Absolute position is fully supported. Use it for decorative elements. Avoid covering the entire artboard with a single absolute element, it blocks cursor interaction underneath

  • Do NOT use: margin, display: inline, display: grid, HTML tables. Use padding and gap for spacing

  • display: block is acceptable for simple elements (text, decorative shapes) but not for layout containers

  • Assume border-box sizing everywhere

  • Use or white-space: pre for code blocks or indented text

  • Do NOT use emojis as icons. Use SVG icons or images

  • Rich text isn't supported in Paper; code snippets should be a single element with one text color and pre whitespace

  • Use the layer-name attribute to set names on elements in the Paper layer tree, e.g.

  • Local images MUST use absolute paths in an img starting with paper-asset:// e.g.

  • paper-gen:// URLs generate AI images. ONLY if the user asked; read the "image-generation" guide first

zoom_to_fitA

Automatically adjusts the canvas zoom level to fit a single node, multiple nodes, or the entire canvas into view.

Prompts

Interactive templates invoked by user choice

NameDescription
inspect-before-editAutonomous workflow: Inspects scene context, queries target nodes, applies mutations via dry-run transaction, and validates with design assertions.
safe-refactorAutonomous workflow: Creates a checkpoint, lints design quality, executes structured refactoring in dry-run, commits atomically, and verifies with visual diff.
design-reviewAutonomous workflow: Audits 8pt grid alignment, token bindings, WCAG AAA contrast, and outputs an actionable design health report.

Resources

Contextual data attached and managed by the client

NameDescription
Paper CDP MCP CapabilitiesLists all available feature flags, tool categories, and engine status.
Active Document OverviewCurrent document metadata, file ID, artboard inventory, and content hash.
Canvas Selection ContextCurrently selected nodes and their direct properties.
Active Design System TokensColors, typography styles, and spacing tokens registered in the file.
System Diagnostics & LatencyLive CDP connection health, latency, and memory bypass status.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vvmahesh0/paper-cdp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server