Skip to content

demo(mcp): render agent-authored dashboards with json-render - #356

Draft
dsklyar wants to merge 19 commits into
mainfrom
danielsklyar/json-render-mvp
Draft

demo(mcp): render agent-authored dashboards with json-render#356
dsklyar wants to merge 19 commits into
mainfrom
danielsklyar/json-render-mvp

Conversation

@dsklyar

@dsklyar dsklyar commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Evaluates json-render as a generative UI layer for MCP: the agent authors a UI spec, and an MCP App view renders it with Transcend's design system.

Stacked on #351.

What this adds

ui_render paints a dashboard from a spec the agent composes after calling domain tools. The catalog — Heading, MetricCard, ProgressBar, Grid — is described in the tool's input schema, so the host's model authors the layout instead of us shipping a fixed view per tool. Calling again replaces the held spec, which gives a progressive reveal without patch machinery.

ui_guide serves a markdown guide on building those dashboards, and the umbrella server's initialize instructions route dashboard requests through it. This is the load-bearing part: without it, a model answers "show me a dashboard" by writing its own HTML or matplotlib artifact rather than calling ui_render. See the demos below for the difference.

Card surfaces in the shared theme. Status colors resolve to --text-*-bold, which is correct for type on white but paints as mud when used as a bar fill, and the host-adaptive content family turns white on a dark host — unreadable against a light dashboard panel. Cards now sit on fixed light surfaces, with a separate fill family for bars and swatches.

The package lives under dev/ and is private. This is an MVP for evaluating the approach, not a published surface.

Demos

1. Natural prompt, routed by the MCP guide

Under 1 minute.

Give me a dashboard of our consent activity for the last 90 days — opt-ins, opt-outs, opt-in rate — plus how our cookies and data flows are split between live, needs-review, and junk. Use Transcend's mcp tools and hints to render this dashboard

Screen.Recording.2026-08-04.at.09.56.33.mov

2. Claude native tools alongside MCP tools

Under 3 minutes.

Give me a dashboard of our consent activity for the last 90 days — opt-ins, opt-outs, opt-in rate — plus how our cookies and data flows are split between live, needs-review, and junk.

Screen.Recording.2026-08-04.at.09.58.15.mov

Known limitation

Claude's bundled dataviz skill can still capture the plan before MCP routing applies, and it can't be disabled when an org provisions it. Skills are selected during planning, ahead of individual tool descriptions, so an MCP server's instructions field cannot outrank one. Closing that gap means shipping a Claude skill of our own — the approach Datadog takes by bundling skills with its MCP server — which is out of scope here.

Notes for review

  • packages/mcp/mcp now depends on a private dev/ package. Fine while this is an evaluation; it would have to move under packages/ before the umbrella is published with it.
  • Adds a .md text loader so the guide is authored as real markdown and inlined at build time, mirroring how prebuilt views are inlined as .html. The vitest plugin hand-mirrored that loader list, so both now share one exported constant.

Test plan

  • ui_render renders in Claude Desktop and is legible in dark mode
  • Period chips round-trip: clicking one refetches at the new window and re-renders
  • ui_guide is called before ui_render on the demo 1 prompt
  • Hosts without MCP Apps get the prose summary

Made with Cursor

dsklyar added 17 commits August 2, 2026 16:12
Launch the MCP Inspector against a built example server, with the
sandbox document repaired and dev views enabled so a view rebuild is
picked up by re-reading the resource rather than restarting the server.
Generate the component and the ui:// resource module, and add the
package-level view wiring when a package has none yet, so adding a view
is two files to fill in rather than seven to remember.
The generator wrote a view that could not be reached without hand-writing a
tool, and left the install that view build needs as an instruction. Skipping it
surfaced as a resolver error naming a synthesized file, so the view build now
checks its dependencies first and says what to run.

The generated tool stays unregistered: adding it to the package's tool list is
where its name becomes public API, which is a person's call.
Deleting a view leaves its directory behind, because git cannot track an empty
one. Discovery then refused to run at all, which broke re-scaffolding the view
it belonged to.

Files present but no *View.tsx still fails: that is a renamed component, and
skipping it is how a view silently stops existing.
Adds `ui_render`, an MCP App tool that paints a dashboard from a spec the
agent composes after calling domain tools. The catalog (Heading, MetricCard,
ProgressBar, Grid) is described in the tool's input schema, so the host's
model authors the layout rather than us shipping a fixed view per tool.
Calling again replaces the held spec, which gives a progressive reveal
without patch machinery.

Ships `ui_guide` alongside it, and a matching rule in the umbrella server's
initialize instructions. Without them a model answers "show me a dashboard"
by writing its own HTML or matplotlib artifact — minutes of work, off-brand,
and not interactive — instead of calling `ui_render`, which renders the same
thing from the design system in about a second. The guide is authored as
markdown and inlined at build time by a new `.md` text loader, mirroring how
prebuilt views are inlined as `.html`.

Card surfaces in the shared theme are new too. Status colors resolve to
`--text-*-bold`, which is right for type on white but paints as mud when used
as a bar fill, and the host-adaptive `content` family turns white on a dark
host — unreadable against a light dashboard panel. Cards now sit on fixed
light surfaces with a separate `fill` family for bars and swatches.

The package lives under `dev/` and is private: this is an MVP for evaluating
json-render in MCP, not a published surface.
The vitest text-asset plugin hand-mirrored tsdown's `loader` list, so adding
`.md` to one left the other parsing a guide as JavaScript. Both now share a
single exported extension list.

Counts the two UI tools in the umbrella expectations, which also puts them
under the annotation checks every other tool already gets.
@pkg-pr-new

pkg-pr-new Bot commented Aug 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

@transcend-io/airgap.js-types

pnpm add https://pkg.pr.new/@transcend-io/airgap.js-types@356
yarn add https://pkg.pr.new/@transcend-io/airgap.js-types@356.tgz

@transcend-io/cli

pnpm add https://pkg.pr.new/@transcend-io/cli@356
yarn add https://pkg.pr.new/@transcend-io/cli@356.tgz

@transcend-io/design-tokens

pnpm add https://pkg.pr.new/@transcend-io/design-tokens@356
yarn add https://pkg.pr.new/@transcend-io/design-tokens@356.tgz

@transcend-io/internationalization

pnpm add https://pkg.pr.new/@transcend-io/internationalization@356
yarn add https://pkg.pr.new/@transcend-io/internationalization@356.tgz

@transcend-io/privacy-types

pnpm add https://pkg.pr.new/@transcend-io/privacy-types@356
yarn add https://pkg.pr.new/@transcend-io/privacy-types@356.tgz

@transcend-io/sdk

pnpm add https://pkg.pr.new/@transcend-io/sdk@356
yarn add https://pkg.pr.new/@transcend-io/sdk@356.tgz

@transcend-io/type-utils

pnpm add https://pkg.pr.new/@transcend-io/type-utils@356
yarn add https://pkg.pr.new/@transcend-io/type-utils@356.tgz

@transcend-io/utils

pnpm add https://pkg.pr.new/@transcend-io/utils@356
yarn add https://pkg.pr.new/@transcend-io/utils@356.tgz

@transcend-io/mcp

pnpm add https://pkg.pr.new/@transcend-io/mcp@356
yarn add https://pkg.pr.new/@transcend-io/mcp@356.tgz

@transcend-io/mcp-server-admin

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-admin@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-admin@356.tgz

@transcend-io/mcp-server-assessment

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-assessment@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-assessment@356.tgz

@transcend-io/mcp-server-base

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-base@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-base@356.tgz

@transcend-io/mcp-server-consent

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-consent@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-consent@356.tgz

@transcend-io/mcp-server-discovery

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-discovery@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-discovery@356.tgz

@transcend-io/mcp-server-docs

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-docs@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-docs@356.tgz

@transcend-io/mcp-server-dsr

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-dsr@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-dsr@356.tgz

@transcend-io/mcp-server-inventory

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-inventory@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-inventory@356.tgz

@transcend-io/mcp-server-preferences

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-preferences@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-preferences@356.tgz

@transcend-io/mcp-server-workflows

pnpm add https://pkg.pr.new/@transcend-io/mcp-server-workflows@356
yarn add https://pkg.pr.new/@transcend-io/mcp-server-workflows@356.tgz

commit: 3917172

@dsklyar dsklyar changed the title feat(mcp): render agent-authored dashboards with json-render demo(mcp): render agent-authored dashboards with json-render Aug 4, 2026
@dsklyar
dsklyar marked this pull request as draft August 4, 2026 16:59
It was a scratch tool for iterating on card styling without restarting an MCP
host. Nothing imports it, and its sample spec was cast past the catalog types
while its wrapper markup duplicated JsonRenderView's, so both would have drifted
into rendering something the tool would reject.
@dsklyar
dsklyar force-pushed the danielsklyar/zel-8113-new-view-scaffolder branch from dc1825d to 00b56b5 Compare August 4, 2026 20:24
Track removing the Inspector packaging workaround against the cleanup ticket
under the MCP Apps epic, so it is findable once upstream ships the file.
@dsklyar
dsklyar force-pushed the danielsklyar/zel-8113-new-view-scaffolder branch 3 times, most recently from 4aac7cf to d07c4a6 Compare August 7, 2026 22:50
Base automatically changed from danielsklyar/zel-8113-new-view-scaffolder to main August 8, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant