Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Using ClickHouse MCP server with LibreChat
This guide explains how to set up LibreChat with a ClickHouse MCP server using Docker and connect it to the ClickHouse example datasets.
Install docker
You will need Docker to run LibreChat and the MCP server. To get Docker:- Visit docker.com
- Download Docker desktop for your operating system
- Install Docker by following the instructions for your operating system
- Open Docker Desktop and ensure it is running
For more information, see the Docker documentation.
Clone the LibreChat repository
Open a terminal (command prompt, terminal or PowerShell) and clone the LibreChat repository using the following command:Create and edit the .env file
Copy the example configuration file from.env.example to .env:.env file in your favorite text editor. You will see sections for
many popular LLM providers, including OpenAI, Anthropic, AWS bedrock etc, for
example:.venv
user_provided with your API key for the LLM provider you want to use.Using a local LLMIf you don’t have an API key you can use a local LLM like Ollama. You’ll see how
to do this later in step “Install Ollama”. For now
don’t modify the .env file and continue with the next steps.
Create a librechat.yaml file
Run the following command to create a newlibrechat.yaml file:Add ClickHouse MCP server to Docker compose
Next we’ll add the ClickHouse MCP server to the LibreChat Docker compose file so that the LLM can interact with the ClickHouse SQL playground.Create a file calleddocker-compose.override.yml and add the following configuration to it:docker-compose.override.yml
Get started with ClickHouse Cloud
If you don’t have a Cloud account yet, get started with ClickHouse Cloud today and receive $300 in credits. At the end of your 30-day free trial, continue with a pay-as-you-go plan, or contact us to learn more about our volume-based discounts. Visit our pricing page for details.
Configure MCP server in librechat.yaml
Openlibrechat.yaml and place the following configuration at the end of the file:librechat.yaml
librechat.yaml
Add a local LLM using Ollama (optional)
Install Ollama
Go to the Ollama website and install Ollama for your system.Once installed, you can run a model like this:Configure Ollama in librechat.yaml
Once the model has downloaded, configure it inlibrechat.yaml:librechat.yaml
Start all services
From the root of the LibreChat project folder, run the following command to start the services:Open LibreChat in your browser
Once all services are up and running, open your browser and go tohttp://localhost:3080/Create a free LibreChat account if you don’t yet have one, and sign in. You should
now see the LibreChat interface connected to the ClickHouse MCP server, and optionally,
your local LLM.From the chat interface, select clickhouse-playground as your MCP server:You can now prompt the LLM to explore the ClickHouse example datasets. Give it a go:Prompt
If the MCP server option doesn’t appear in the LibreChat UI,
check that the proper permissions are set in your
librechat.yaml file.use is set to false in the mcpServers section under interface, the MCP selection dropdown won’t appear in chat:
librechat.yaml