Chat workspace
LibreChat Self-Hosted Multi-Provider AI Workspace
LibreChat is an MIT-licensed self-hosted AI workspace that connects multiple model providers and adds agents, MCP tools, retrieval, file handling, code execution, artifacts, memory, web search, and enterprise authentication options.
Intermediate · Docker, npm, Helm, or remote self-hosting with MongoDB and optional supporting services
Editorial review
Tool categories, pricing, source status, deployment options, and product claims can change quickly. Verify the official source before production or commercial use.
OpenSourcesAI verdict
LibreChat is one of the most capable self-hosted alternatives to commercial multi-provider chat products. It can unify hosted and local models, agents, MCP, file search, code execution, artifacts, and conversation search in one interface. That breadth creates a substantial operational surface: MongoDB is core state, Meilisearch powers conversation search, RAG and code execution may run as separate services, configuration spans environment and YAML files, and every provider, tool, file, and agent permission changes the privacy boundary. LibreChat is a strong team workspace when deployed and governed as a real application platform.
Best for
Teams and advanced individuals who want a self-hosted, multi-provider AI chat and agent workspace with provider flexibility, tools, file workflows, and centralized configuration.
Why use it
Use LibreChat when the goal is one controlled interface for OpenAI, Anthropic, Google, local endpoints, custom providers, and agent capabilities without committing users to one vendor’s chat product.
Providers, endpoints, and configuration
LibreChat can expose several model providers through one chat interface. Server secrets and feature flags live primarily in environment variables, while librechat.yaml controls custom endpoints, model specs, interface behavior, MCP servers, agents, and advanced features.
Configuration changes require a restart. Keep environment, YAML, and Docker override files in controlled versioned infrastructure, and never commit provider keys or authentication secrets.
Agents, files, RAG, and memory
Agents can combine model instructions with file context, file search, code execution, MCP tools, actions, skills, and persistent sharing permissions. File context places extracted text into instructions, while file search uses semantic retrieval and should be evaluated independently.
Choose the file mode deliberately. Small temporary documents may fit upload-as-text, large collections may require RAG, and structured data may be better processed through code execution. Each path has different retention, token, and privacy implications.
MCP and tool governance
MCP servers can be configured for traditional chats or added to agents with granular tool selection. OAuth-enabled remote servers require correct callback configuration, while local command-based servers execute within the LibreChat deployment environment.
Review server provenance, command arguments, environment variables, network destinations, and tool side effects. Programmatic Tool Calling can broker selected MCP tools through the code-interpreter sandbox, but registered tools still require independent authorization and least privilege.
Code interpreter and sandbox services
LibreChat’s code interpreter is a separate open-source service that can run multiple languages and manage files using isolated execution modes. Operators must deploy it, configure API credentials, and choose the isolation and resource controls appropriate for untrusted model-generated code.
Do not treat the word sandbox as a complete security guarantee. Restrict network access, mounts, secrets, CPU, memory, execution time, file lifetime, and the tool-call server’s registered capabilities.
MongoDB, Meilisearch, and storage
MongoDB stores core application and conversation state. Meilisearch is optional for fast conversation search and should remain internal to the deployment network with a strong master key. Restoring MongoDB without matching Meilisearch data may require a full search resynchronization.
File storage, RAG services, search indexes, and code-interpreter files may have separate backup and retention requirements. A complete recovery plan must cover every enabled service, not only the main container.
Authentication, sharing, and upgrades
LibreChat supports local accounts and several enterprise authentication options. Agent ACLs, user groups, roles, provider credentials, and public sharing settings determine who can view, edit, or execute powerful configurations.
Release upgrades can include configuration and permission migrations. Pin a tested release, review migration notes, back up databases and configuration, and validate agents, file search, MCP, and authentication before promoting an upgrade.
Key features
- Multi-provider chat with custom OpenAI-compatible endpoints and model-specific configuration.
- Agent builder with tools, file context, file search, code interpreter, MCP, actions, skills, and access controls.
- MCP support in normal chat and agents with per-server and per-tool selection.
- Self-hosted code interpreter service with sandboxed multi-language execution and file handling.
- MongoDB-backed application state, optional Meilisearch conversation search, and separate RAG or file services.
- Docker, npm, Helm, and remote hosting paths with OAuth, SAML, LDAP, 2FA, and other authentication options.
Common AI use cases
- Provide one self-hosted chat interface for several model providers.
- Create reusable agents with files, tools, MCP, and code execution.
- Connect local Ollama or OpenAI-compatible endpoints alongside hosted models.
- Search and branch conversation history across a team workspace.
- Use retrieval or file context for document-grounded chat.
- Deploy a controlled internal alternative to consumer AI chat accounts.
Business use cases
- Internal employee AI workspace with approved providers.
- Team agents for support, research, engineering, and document workflows.
- Multi-provider evaluation and fallback in one interface.
- Private chat over local and enterprise model endpoints.
- Controlled MCP and code-execution access for advanced users.
How AI builders can use it
- Choose providers, user groups, and data-residency rules before deployment.
- Deploy MongoDB and the API through Docker or another reproducible method.
- Add Meilisearch, RAG, file storage, or code execution only when required.
- Configure one agent with minimum capabilities and explicit ACLs.
- Add MCP servers one at a time and test every tool and OAuth flow.
- Back up all enabled services and rehearse upgrade and restore procedures.
Who should use it
- Teams needing a self-hosted multi-provider AI workspace.
- Operators comfortable running MongoDB and optional supporting services.
- Organizations that need configurable agents, MCP, RAG, and authentication.
- Advanced users who value provider flexibility and centralized governance.
Who should not use it
- Users wanting a zero-maintenance native desktop application.
- Teams unable to secure a complex multi-service deployment.
- Organizations that cannot govern agents, MCP servers, code execution, and file retention.
- Simple local chat workflows already served by Jan, GPT4All, or LM Studio.
Evaluation checklist
- Which model providers and custom endpoints are approved?
- Which data stays local and which leaves through providers, search, OCR, or tools?
- Which agent capabilities and MCP tools are enabled for each user group?
- How are MongoDB, Meilisearch, files, RAG data, and code sessions backed up?
- What sandbox and resource controls protect code execution?
- How are authentication, ACL migrations, and public sharing tested?
- What release-pinning and rollback process protects the deployment?
Security and admin notes
- Keep MongoDB, Meilisearch, RAG, and code-interpreter services off the public network unless specifically secured.
- Use strong secrets, TLS, least-privilege provider credentials, and approved authentication providers.
- Review every MCP server, agent action, code-execution capability, and file source.
- Limit agent sharing and migrate ACLs when required by release notes.
- Restrict code-interpreter network, mounts, resources, and file retention.
- Redact sensitive prompts and tool outputs from logs, search indexes, and diagnostics.
Pricing notes
LibreChat is MIT licensed and self-hosted. Model providers, hosting, MongoDB, search, file storage, OCR, code-interpreter infrastructure, and enterprise identity services have separate costs. Operational labor is a significant part of total cost.
Tradeoffs
LibreChat provides an unusually broad self-hosted product experience, but every enabled feature adds configuration, data, and recovery dependencies. Its flexibility is valuable for teams with strong platform ownership and risky for casual deployments that expose containers and credentials without governance. Start with the smallest service set and expand only after the base workspace is secure and recoverable.
Recommended workflow
- Deploy the minimum Docker stack.
- Secure identity and provider credentials.
- Add one provider and one agent.
- Introduce MCP and code execution cautiously.
- Test backups and permission migrations.
- Pin releases, monitor services, and expand deliberately.
Pros
- Excellent multi-provider and custom-endpoint flexibility.
- Rich agents, MCP, retrieval, file, artifact, and code features.
- Self-hosted with a permissive MIT license.
- Strong authentication and sharing options for team use.
- Modern chat interface and conversation search.
Cons
- Production deployments may require several stateful services.
- Configuration and migrations can be operationally demanding.
- MCP and code execution create powerful security boundaries.
- Provider and file modes complicate privacy explanations.
- Backup and restore must cover more than MongoDB alone.
Alternatives
- Open WebUI may be better for a local-model-first self-hosted workspace.
- AnythingLLM may be better when document workspaces are the center of the product.
- LobeChat may be better for a lighter polished multi-provider web interface.
- Jan may be better for a local-first native desktop workspace.
FAQ
Does LibreChat support multiple model providers?
Yes. LibreChat can connect to several built-in and custom endpoints, including local OpenAI-compatible services, through one interface.
Can LibreChat use MCP tools?
Yes. MCP servers can be available in traditional chats or assigned to agents with granular tool selection. Each server and tool should be reviewed and permissioned.
Does LibreChat include code execution?
LibreChat integrates with a separate open-source code-interpreter service that operators deploy and secure. It supports multiple languages and file workflows in a sandboxed environment.
Why does LibreChat use Meilisearch?
Meilisearch provides fast full-text conversation search. It is optional, should remain internal, and may need resynchronization after database or index recovery.
What license does LibreChat use?
The current LibreChat repository is licensed under the MIT License.
Official verification sources
Direct official links used to verify pricing, features, security claims, and product packaging.
OpenSourcesAI ecosystem connections
Use these next-step links to move from this profile into related tools, comparisons, guides, stacks, and curated shortlists.
Alternative solutions
Guides, comparisons, and resources
Directory paths