MCP
Coview exposes a remote MCP server for agents that can read, write, inspect, and screenshot canvas documents with the same high-level methods as the Agent API.
Endpoint:
https://coview.dev/mcp
Configure
Register a remote MCP server named coview with this URL:
https://coview.dev/mcp
For Claude Code:
claude mcp add --transport http coview https://coview.dev/mcp
For a generic Streamable HTTP MCP runtime, add a server named coview with URL https://coview.dev/mcp.
For the OpenAI Agents SDK, configure a hosted MCP tool with serverLabel set to coview and serverUrl set to https://coview.dev/mcp.
After connecting, call tools/list. The Coview tool list mirrors the Agent API methods.
Document id
Use the document id from the Coview document URL. In https://coview.dev/d/my-document-id, the documentId is my-document-id.
Use create_document only when you need a fresh document.
Fast flow
- Call
get_basic_info. - Use
get_tree_summaryto choose targets. - Inspect specific nodes with
get_node. - Create top-level frames with
create_artboard. - Create or replace larger sections with
write_html. - Refine with
update_styles,set_text_content,rename_nodes,duplicate_nodes,move_nodes, ordelete_nodes. - Use
get_screenshotto check layout, clipping, contrast, and spacing.
For creating or replacing a presentation, use write_html with full HTML frames. Send multiple 1280x720 <section> elements and pass targetNodeId:"root" when replacing the canvas directly. Use mode:"insert-children" to append top-level objects to root or append inside an existing frame/flex-frame.
Do not send raw operation batches through MCP. The document changes API under /api/v1/documents/... is for the Coview app runtime, not agent editing.
Methods
| Method | Purpose |
|---|---|
get_guide | Return fast workflow and layout guidance. |
get_basic_info | Return document metadata, canvas summary, endpoint URLs, fonts, and guidance. |
create_document | Create a blank document and return its documentId, path, and URL. |
update_document_metadata | Update document-level metadata such as the title. |
get_selection | Return the current selected node, if any. |
get_node | Return focused geometry, style, text, parent, and child ids for one node or root. |
get_children | List direct children for the root canvas or one node. |
get_tree_summary | Return a compact hierarchy for choosing edit targets. |
get_screenshot | Return a visual verification image. It defaults to fast SVG rendering; use renderer:"browser" only for final PNG browser fidelity. |
get_jsx | Return inline-style JSX for a node. |
get_computed_styles | Return inline style objects for one or more nodes. |
get_font_family_info | Check available font families and weights before styling text. |
create_artboard | Create a top-level frame or flex-frame. |
write_html | Parse HTML and replace a target node, or insert children when requested. |
insert_nodes | Insert structured Coview nodes into a parent or as top-level canvas nodes. |
update_styles | Merge style properties into nodes. |
set_text_content | Set text content for text nodes and convert targets to text when needed. |
rename_nodes | Rename nodes for clearer layer inspection. |
duplicate_nodes | Duplicate nodes with fresh ids. |
move_nodes | Move, reparent, or reorder nodes without resizing them. |
delete_nodes | Delete nodes by id. |
HTML authoring
write_html accepts normal HTML fragments or full HTML documents. By default it replaces the selected node or root canvas content when no targetNodeId is passed. Pass targetNodeId to replace a specific node, or pass targetNodeId:"root" to force root canvas replacement even when another node is selected. Replace mode accepts one or more root HTML elements. Use mode:"insert-children" to append top-level objects to root or add nodes inside an existing frame/flex-frame.
Coview preserves normalized CSS intent: property names become camelCase, authored CSS values stay CSS strings, mixed direct text is preserved in flow order, and data-coview-name sets the Coview layer name.
Layout guidance
Coview supports frame, flex-frame, rectangle, text, and image nodes. Prefer flex-frame or normal document flow for padded groups, cards, rows, columns, navs, and repeated content. Use position:absolute only when an element must be placed independently on the artboard.