MCP server
The tools Dex's MCP server gives agents, and their arguments.
Dex’s MCP server is how agents read comments, guidelines and files, and how they answer. create registers it for you. To add it by hand:
claude mcp add dex -- npx --package=@dexhq/canvas dex mcp
The server runs over stdio. --agent "<name>" sets the name on the agent’s messages, and --root <folder> sets the studio folder.
Started by dex claude, the server is also a Claude Code channel. It pushes each new comment into the session, so the agent needs no watch loop.
Tools name a file by its slug, such as "f-3k7q9x2m" for files/f-3k7q9x2m/. The argument is called prototype.
Tools
| Tool | Does | Arguments |
|---|---|---|
brief |
Says what there is and where: the open file, the folder the agent may write in, the guidelines, what views may import, and the paths of specs, rules and methods. | load: paths of rules or methods to return in full |
components |
Searches the design system’s components, best fit first. With name, returns one in full: import, props, an example and notes. |
query, name |
prototype |
One file: its spec, views, frames and open threads. Large files are shortened, with a note on what was left out. | prototype |
decide |
Records a decision in a spec, as a > [!DECISION] callout. |
prototype, decision, flow |
where |
What the person has open in Dex: the file, the page and the selected frame. | None |
show |
Opens a file’s canvas and zooms to a frame, when the person asks to see it. | prototype, frame or view |
threads |
Threads with their target, source file, element and messages. Those on the person’s open page come first. | prototype, status, id, offset, limit |
watch |
Takes waiting threads in groups, waiting for them if needed. Each group comes with the files it may change. | prototype, timeout_seconds (1 to 1800, default 300), groups, ids, receipt |
comment |
Starts a thread. | See below |
close |
Closes threads: ✅ with what changed, or 🚫 with why. | threads: { id, summary } or { id, dismiss } |
reply |
Sends a message, to ask a question or answer an @mention. | id, message, ask |
place_frame |
Puts views on a file’s canvas, in a request’s cell or a named cell. | prototype, frames |
snapshot |
Screenshots one view from the running Dex, with page errors and overflow. | prototype, view, params, viewport, scheme |
feedback |
Drafts feedback about Dex itself. It sends only on a second call with confirmed: true, after the person approves the draft. |
kind, message, title, files, email, confirmed |
Notes on the tools:
- A target with
kind: "view"is a request for a new view: build it, then callplace_frame - Threads that
watchreturns belong to the agent until it callscloseon them - Each response stays within a few thousand characters, and says how to get what it left out
comment arguments
| Argument | Notes |
|---|---|
prototype, message |
Required. |
for |
people (default) or agent. |
frame |
"section/row/frame" from canvas.json. |
view or doc |
Instead of frame: the first frame showing it. |
selector |
Pins the comment to an element, such as [data-slot="card"] h3. |
text |
The start of the element’s text. |
With no frame, view or doc, the comment is on the whole file. Without MCP, use the threads and thread CLI commands.