Skip to content

Write Once, Run Everywhere

frac is designed to be runtime-agnostic. Your view code works the same whether it runs in MCP Apps compatible clients (like Claude, Goose, VSCode) via the MCP ext-apps specification, or in ChatGPT via the Apps SDK.

Different AI runtimes use different APIs to communicate with embedded views:

  • ChatGPT uses the Apps SDK with window.openai global
  • MCP Apps use JSON-RPC postMessage protocol (MCP ext-apps spec)

Without abstraction, you’d need to write different code for each platform — or lock yourself into one ecosystem.

frac introduces an adaptor layer that normalizes these differences:

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#2563EB', 'primaryTextColor': '#fff', 'primaryBorderColor': '#1e40af', 'lineColor': '#64748b', 'secondaryColor': '#3B82F6', 'tertiaryColor': '#dbeafe' }}}%%
flowchart TB
subgraph Code["Your View Code"]
Hooks["useToolInfo, useCallTool, etc."]
end
Code --> frac
subgraph frac["frac Hooks"]
Unified["Unified React Interface"]
end
frac --> AppsSdk
frac --> McpApp
subgraph AppsSdk["Apps SDK Adaptor"]
OpenAI["window.openai"]
end
subgraph McpApp["MCP App Adaptor"]
JsonRpc["JSON-RPC Bridge"]
end
AppsSdk --> ChatGPT["ChatGPT"]
McpApp --> McpClients["Claude, Goose, VSCode..."]
style Code fill:#f1f5f9,stroke:#cbd5e1,stroke-width:2px,color:#334155
style frac fill:#f1f5f9,stroke:#cbd5e1,stroke-width:2px,color:#334155
style AppsSdk fill:#f1f5f9,stroke:#cbd5e1,stroke-width:2px,color:#334155
style McpApp fill:#f1f5f9,stroke:#cbd5e1,stroke-width:2px,color:#334155
style ChatGPT fill:#f1f5f9,stroke:#cbd5e1,stroke-width:2px,color:#475569
style McpClients fill:#f1f5f9,stroke:#cbd5e1,stroke-width:2px,color:#475569
style Hooks fill:#2563EB,stroke:#1e40af,stroke-width:2px,color:#fff
style Unified fill:#2563EB,stroke:#1e40af,stroke-width:2px,color:#fff
style OpenAI fill:#2563EB,stroke:#1e40af,stroke-width:2px,color:#fff
style JsonRpc fill:#2563EB,stroke:#1e40af,stroke-width:2px,color:#fff

These include useToolInfo, useCallTool, and other API hooks. frac automatically detects which runtime is available and uses the appropriate adaptor.

Future-Proof

As new AI platforms adopt MCP, your views will work without code changes

No Vendor Lock-in

Build once, deploy to multiple AI clients: ChatGPT, Claude, Goose, VSCode, and more

Single Codebase

One set of hooks, one mental model, multiple platforms

Graceful Degradation

Platform-specific features degrade gracefully with clear warnings

Not all features are available on all platforms. See the API Reference for a full compatibility matrix.

Runtime-specific features: