Renderify
Architecture

MCP App runtime modules

Scope

This inventory covers packages/mcp-app/src and the shared declarative-event contract in IR, security, and runtime.

Module responsibilities

ModuleResponsibilityNot responsible forVerification
plan.tsJSON detach, size bound, and offline declarative validationRuntime rendering or MCP transportPlan corpus in tests/mcp-app.test.ts
bundle.tsBundle the browser view as an inline-safe IIFEHTML policy or server registrationDefault shell build and artifact smoke
shell.tsEscape configuration, hash scripts, and emit restrictive CSPHost iframe sandbox flagsCSP reconstruction tests
server.tsOfficial resource/tool registration and result metadataAuthentication or host capability implementationOfficial in-memory SDK test
view.tsOfficial lifecycle, rendering, context, tool allowlist, teardownArbitrary source or external modulesOfficial AppBridge browser test
IR event parserDefine the only declarative onX binding shapeDOM listener ownershipIR/security/runtime tests

Dependency rationale

ModuleDependencyWhy neededConsumers / verification
plan.ts@renderify/ir + @renderify/securityRuntimePlan guards, tree walk, and shared URL inspectionServer and view validators
bundle.tsesbuildProduce a self-contained browser IIFE and inline-script escapingShell builder
server.tsofficial MCP SDK + Apps helpersNormalize resource/tool metadata and SDK registrationsMCP clients/servers
view.tsofficial MCP Apps AppOwn wire lifecycle and source-checked postMessage transportMCP host iframe
view.ts@renderify/runtimeExecute state transitions and render RuntimeNodesBrowser test
security/runtimeIR event parserKeep validation and rendering semantics identicalStrict declarative interaction

Dependency rules

  • The view MUST depend on the official bridge, not a local protocol copy.
  • Node-only shell/server modules MUST NOT enter the browser view bundle.
  • The MCP boundary MUST remain narrower than the general trusted Renderify source APIs.
  • Server tool authorization MUST remain outside the view.

Boundary diagram

What this shows: only validated RuntimePlan data crosses from MCP results into the offline runtime; server effects return through an explicit host proxy.

Loading diagram…
Edit this page on GitHub

On this page