Installation
MFUI is split into a frontend package, a server package, and model adapters. Install @mfui/client in the frontend, then install @mfui/server and the adapter you need on the server.
Frontend
sh
npm install @mfui/clientsh
pnpm add @mfui/clientsh
yarn add @mfui/clientsh
bun add @mfui/clientServer
Install @mfui/server on the server first, then choose and install an adapter below.
sh
npm install @mfui/serversh
pnpm add @mfui/serversh
yarn add @mfui/serversh
bun add @mfui/serverChoose An Adapter
Install the adapter for the provider or SDK your server uses.
| Package | Use when |
|---|---|
@mfui/openai-compatible | You use Chat Completions-compatible APIs. |
@mfui/openai-responses | You use OpenAI Responses. |
@mfui/anthropic | You use Anthropic Messages. |
@mfui/gemini | You use Gemini. |
@mfui/ai-sdk | You use Vercel AI SDK. |
For example, with the OpenAI-compatible adapter:
sh
npm install @mfui/openai-compatiblesh
pnpm add @mfui/openai-compatiblesh
yarn add @mfui/openai-compatiblesh
bun add @mfui/openai-compatibleAfter installing the packages, continue to the quick start.