Add frac to existing app
frac contains 2 main packages that can be used together or independently.
The packages
Section titled “The packages”@usefractal/frac/server: A drop-in replacement for the official MCP SDK that adds view registration and type inference capabilities.@usefractal/frac/web: A React library providing hooks, components, and the runtime glue to render your views inside the host’s iframe environment.
Option 1: use @usefractal/frac/server (Recommended)
Section titled “Option 1: use @usefractal/frac/server (Recommended)” Use @usefractal/frac/server
Best if: you’re using the official TypeScript MCP SDK and want to add rich UI views with full type safety.
Option 2: use @usefractal/frac/web only
Section titled “Option 2: use @usefractal/frac/web only” Use @usefractal/frac/web only
Best if: you already have an MCP server in a non-TypeScript runtime and only want React hooks for UI components.