Skip to content

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/client
sh
pnpm add @mfui/client
sh
yarn add @mfui/client
sh
bun add @mfui/client

Server

Install @mfui/server on the server first, then choose and install an adapter below.

sh
npm install @mfui/server
sh
pnpm add @mfui/server
sh
yarn add @mfui/server
sh
bun add @mfui/server

Choose An Adapter

Install the adapter for the provider or SDK your server uses.

PackageUse when
@mfui/openai-compatibleYou use Chat Completions-compatible APIs.
@mfui/openai-responsesYou use OpenAI Responses.
@mfui/anthropicYou use Anthropic Messages.
@mfui/geminiYou use Gemini.
@mfui/ai-sdkYou use Vercel AI SDK.

For example, with the OpenAI-compatible adapter:

sh
npm install @mfui/openai-compatible
sh
pnpm add @mfui/openai-compatible
sh
yarn add @mfui/openai-compatible
sh
bun add @mfui/openai-compatible

After installing the packages, continue to the quick start.