← Back to directory
C

Chat UI

Official
Open-source chat interface with OpenAI-compatible API and MCP tool support.
GitHub source repository ↗
★ 10.9k Stars Category · Dev Tools Very popular Source revision 1f07fa5cb98a
52FMRS · D
Reliability
3/20
Security and permissions
9/20
Maintenance
13/20
Documentation
14/20
Setup experience
13/20

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.

Read the FMRS scoring method →

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.

Tools

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

Setup

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.

Fit and risk

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.

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.

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 DesktopFull support