← Back to directory
C

Chat UI

Official
Open-source chat interface with OpenAI-compatible API and MCP tool support.
Category
Dev Tools #227 of 438
Stars
★ 11.0k Very popular
Transport
stdio (local process)
Runtime
Node.js · Docker
Credentials
API key / credential required
License
Apache-2.0
Last commit
Tools
1
52FMRS · D

Chat UI is a powerful open-source chat interface focused on OpenAI-compatible APIs, with built-in MCP tool support. It is suitable for developers needing to quickly build custom AI chat fronts, but attention must be paid to API key management and external dependency risks.

Strongest · Documentation 14/20 Weakest · Reliability 3/20

Reliability
3/20
Security and permissions
9/20
Maintenance
13/20
Documentation
14/20
Setup experience
13/20
Why each score
Reliability 3/20
The repo is fundamentally a SvelteKit chat UI (an MCP client/consumer), not an MCP server exposing a tool list; the SERVER MANIFEST is not cached and the README contains no MCP init or tool-list handshake implementation. The only evidence is the README and metadata — no CI workflows, committed tests, or reviewed source files — and the static calibration forbids scores above 12 without verifiable execution evidence. The 'MCP server' claim contradicts the project's actual client nature and no error-handling/edge-case evidence exists, so the score is lowered to 3.
Security and permissions 9/20
Credentials are managed via .env.local and install examples use placeholders (hf_***, sk-…), not real secrets, so no red line is triggered. MCP_FORWARD_HF_USER_TOKEN forwards the signed-in Hugging Face token to the configured server URL when no Authorization header is set on that entry — this is disclosed, but a misconfigured third-party server entry could receive the token, a data-boundary risk. Source could not be reviewed to verify least privilege or explicit confirmation for dangerous tool calls; external network calls and MongoDB storage boundaries are documented, so deductions apply rather than a red-line score.
Maintenance 13/20
Clear Apache-2.0 license, not archived, and visibly evolving (legacy branch, removed legacy integrations, refactor to OpenAI-compatible only), indicating active upkeep. Stars are discovery signals and earn no points. Deductions: release cadence, dependency update policy, issue response times, and a security-response channel are unverifiable from the provided evidence; 265 open issues show no response evidence, leaving governance/versioning gaps.
Documentation 14/20
The README is well layered: quickstart, database options, launch, Docker, theming, models, LLM router, MCP tools, and building; it includes provider comparison tables, env examples, the MCP_SERVERS JSON array format, and LLM routing policy requirements with sufficient samples. Deductions: no troubleshooting section, no cost/limits disclosure, incomplete MCP tool parameter and usage-limit documentation, and no reviewable evidence that the docs match the actual source or tests.
Setup experience 13/20
Setup is few-step and clear: create .env.local with two variables, npm install, npm run dev, with a provider table covering common endpoints; embedded MongoDB fallback when MONGODB_URL is unset reduces dependency friction, and an optional Docker image is provided. The static calibration caps setup at 15 without verifiable execution evidence (CI/tests), none of which was supplied; additionally the project is an MCP client rather than a server, and no mainstream-client connection example is given, so the score is 13.

Static review · not runListed 2026-08-07

Read the FMRS scoring method →

Fit and risk

What it can accessUses the network

Best for

  • Developers needing to build or customize an AI chat interface.
  • Teams looking to leverage MCP tools to enhance model capabilities.
  • Developers familiar with the Hugging Face ecosystem seeking quick deployment.

Not for

  • Scenarios requiring non-OpenAI-compatible API integrations (removed in this version).
  • Users who need a simple chat interface without MCP functionality.

Required permissions

  • Read and write environment variables to configure API keys.
  • Network access to connect to OpenAI-compatible endpoints and MCP servers.
  • File system access to store database persistence data (if using embedded MongoDB).

Risks and side effects

  • API key leakage risk: keys in environment variables may be exposed, especially in deployment.
  • MCP server security risk: adding untrusted MCP servers could lead to tool misuse or data leakage.
  • Dependency risk: reliance on external APIs and MCP servers, whose availability and behavior may change.

Setup

Before you start

Runtime:Node.js · Docker

OPENAI_BASE_URL required Base URL of any OpenAI-compatible API (e.g. https://router.huggingface.co/v1); models are discovered via its /models endpoint.
OPENAI_API_KEY requiredsecret Key for the OpenAI-compatible endpoint, e.g. hf_xxx (Hugging Face access token); HF_TOKEN is a legacy alias.
HF_TOKEN optionalsecret Legacy alias for OPENAI_API_KEY, still accepted.
Other optional settings (18)
MONGODB_URL optional MongoDB connection string; if unset, an embedded MongoDB persists to ./db.
MONGODB_DB_NAME optional Database name, defaults to chat-ui.
MCP_SERVERS optional JSON array of preconfigured MCP servers (name, url, optional headers) serving as the base list for all users.
MCP_FORWARD_HF_USER_TOKEN optional Set to true to forward the signed-in user's Hugging Face token to the official HF MCP login endpoint when that server entry has no Authorization header.
LLM_ROUTER_ROUTES_PATH optional Path to your own routes-policy JSON array (each entry needs name, description, primary_model, optional fallback_models).
LLM_ROUTER_DEFAULT_ROUTE optional Default route name for the Omni router, defaults to default.
LLM_ROUTER_FALLBACK_MODEL optional Fallback model when all models in the selected route fail.
LLM_ROUTER_ENABLE_MULTIMODAL optional Set to true so image inputs bypass the policy file and go to the multimodal model.
LLM_ROUTER_MULTIMODAL_MODEL optional Target model for the multimodal route.
LLM_ROUTER_ENABLE_TOOLS optional Set to true so requests with an MCP server enabled take the agentic route.
LLM_ROUTER_TOOLS_MODEL optional Tools-capable target model that must support OpenAI function calling.
PUBLIC_LLM_ROUTER_ALIAS_ID optional Alias ID of the virtual Omni model, defaults to omni.
PUBLIC_LLM_ROUTER_DISPLAY_NAME optional Display name shown in the UI for the Omni alias, defaults to Omni.
PUBLIC_LLM_ROUTER_LOGO_URL optional Optional logo URL for the Omni alias.
PUBLIC_APP_NAME optional App title used throughout the UI.
PUBLIC_APP_ASSETS optional Folder under static/ for logos and favicons (chatui or huggingchat).
PUBLIC_APP_DESCRIPTION optional App description text.
PUBLIC_APP_DATA_SHARING optional Set to 1 to add a user-settings toggle for opting in to data sharing with model creators.

To use this MCP server, you need to clone the Chat UI repository and configure environment variables.

  1. Clone the repo: git clone https://github.com/huggingface/chat-ui
  2. Go to the directory: cd chat-ui
  3. Configure .env.local, set OPENAI_BASE_URL and OPENAI_API_KEY. For example:
OPENAI_BASE_URL=https://router.huggingface.co/v1
OPENAI_API_KEY=hf_xxx
  1. Install dependencies: npm install
  2. Run dev server: npm run dev -- --open

Note: MCP server support is not a standalone installation; it is built into Chat UI. You do not need to install a separate MCP server package.

Check that it works

After starting the app, open "MCP Servers" from the top-right menu or the + menu in the chat input, add a server, and run Health Check; a passing health check and a tool list on the server card confirm the MCP connection works.

Troubleshooting

  1. Ensure `OPENAI_BASE_URL` and `OPENAI_API_KEY` are set correctly and the endpoint is reachable.
  2. Check MongoDB connection: if `MONGODB_URL` is set, ensure MongoDB is running; otherwise, embedded MongoDB is used.
  3. For MCP server connection issues, check the URL and auth headers, and use health check.
  4. If build fails, check Node.js version and dependencies installation.

Things to try

Once connected, you can ask your AI assistant things like:

  • Search the web for the latest Model Context Protocol news and summarize it
  • Use the enabled MCP tools to list the most popular text-generation models on Hugging Face
  • Translate this paragraph to French and verify the terminology with a tool
  • Check today's tech headlines through the connected MCP server

Tools 1

MCP Servers read-only
Manage MCP servers within Chat UI, including adding, enabling, disabling, and running health checks.

Use cases

Provide a versatile chat interface for HuggingChat or custom LLM interfaces.
Integrate MCP tools into chat applications, allowing models to use external tools.
Connect to multiple model providers via OpenAI-compatible APIs.

Supported clients

Claude Desktop

Listed from the project's documentation, not tested by this site.

Overview

Chat UI is a chat interface for large language models, built with SvelteKit and powering HuggingChat. It only supports OpenAI-compatible APIs, configured via environment variables. Chat UI can connect to various OpenAI-compatible endpoints such as Hugging Face Inference Providers, llama.cpp, Ollama, OpenRouter, etc. It also integrates MCP (Model Context Protocol) tools, allowing models to call external tools. This MCP server provides MCP support for Chat UI, enabling it to act as an MCP client.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 62.9k · Tools 2 Compare with this →

Source revision 8e696f8877ca Data synced 2026-10-12 Read the FMRS scoring method