Skip to content

Commit 054746a

Browse files
authored
Update librechat.md
1 parent 9984978 commit 054746a

File tree

1 file changed

+22
-61
lines changed

1 file changed

+22
-61
lines changed

docs/use-cases/AI_ML/MCP/librechat.md

Lines changed: 22 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,6 @@ ANTHROPIC_API_KEY=user_provided
6666
Replace `user_provided` with your API key for the LLM provider you want to use,
6767
making sure it is quoted, e.g. `"A2bC3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z"`.
6868

69-
Next uncomment the following line:
70-
71-
```text title=".env"
72-
# ENDPOINTS=openAI,assistants,azureOpenAI,google,anthropic
73-
```
74-
75-
Add `agents` to the list of endpoints:
76-
77-
```text
78-
ENDPOINTS=openAI,assistants,azureOpenAI,google,anthropic,agents
79-
```
80-
8169
:::note Using a local LLM
8270
If you don't have an API key you can use a local LLM like Ollama. You'll see how
8371
to do this later in step ["Install Ollama"](#add-local-llm-using-ollama). For now
@@ -97,26 +85,29 @@ This creates the main [configuration file](https://www.librechat.ai/docs/configu
9785
## Add ClickHouse MCP server to Docker compose {#add-clickhouse-mcp-server-to-docker-compose}
9886

9987
Next we'll add the ClickHouse MCP server to the LibreChat Docker compose file
100-
called `docker-compose.yaml` so that the LLM can interact with the
88+
so that the LLM can interact with the
10189
[ClickHouse SQL playground](https://sql.clickhouse.com/).
10290

103-
Find the `services` section in the `docker-compose.yaml` file and add
104-
`mcp-clickhouse` as a new service with the following configuration:
105-
106-
```yml title="docker-compose.yaml"
107-
mcp-clickhouse:
108-
image: mcp/clickhouse
109-
container_name: mcp-clickhouse
110-
ports:
111-
- 8001:8000
112-
extra_hosts:
113-
- "host.docker.internal:host-gateway"
114-
environment:
115-
- CLICKHOUSE_HOST=sql-clickhouse.clickhouse.com
116-
- CLICKHOUSE_USER=demo
117-
- CLICKHOUSE_PASSWORD=
118-
- CLICKHOUSE_MCP_SERVER_TRANSPORT=sse
119-
- CLICKHOUSE_MCP_BIND_HOST=0.0.0.0
91+
Create a file called `docker-compose.override.yml` and add the following configuration to it:
92+
93+
```yml title="docker-compose.override.yml"
94+
services:
95+
api:
96+
volumes:
97+
- ./librechat.yaml:/app/librechat.yaml
98+
mcp-clickhouse:
99+
image: mcp/clickhouse
100+
container_name: mcp-clickhouse
101+
ports:
102+
- 8001:8000
103+
extra_hosts:
104+
- "host.docker.internal:host-gateway"
105+
environment:
106+
- CLICKHOUSE_HOST=sql-clickhouse.clickhouse.com
107+
- CLICKHOUSE_USER=demo
108+
- CLICKHOUSE_PASSWORD=
109+
- CLICKHOUSE_MCP_SERVER_TRANSPORT=sse
110+
- CLICKHOUSE_MCP_BIND_HOST=0.0.0.0
120111
```
121112
122113
If you want to explore your own data, you can do so by
@@ -143,36 +134,6 @@ isSelected={true}
143134
/>
144135
</Link>
145136
146-
## Mount the librechat.yaml file {#mount-librechat-yaml-file}
147-
148-
In `docker-compose.yml`, find the API service:
149-
150-
```yml title="docker-compose.yaml"
151-
services:
152-
#highlight-next-line
153-
api:
154-
container_name: LibreChat
155-
ports:
156-
- "${PORT}:${PORT}"
157-
158-
#highlight-next-line
159-
volumes:
160-
- type: bind
161-
source: ./.env
162-
target: /app/.env
163-
- ./images:/app/client/public/images
164-
- ./uploads:/app/uploads
165-
- ./logs:/app/api/logs
166-
```
167-
168-
Under the volumes section, add the following line:
169-
170-
```yml
171-
- ./librechat.yaml:/librechat/librechat.yaml
172-
```
173-
174-
This will make the configuration file available to the backend service.
175-
176137
## Configure MCP server in librechat.yaml {#configure-mcp-server-in-librechat-yaml}
177138
178139
Open `librechat.yaml` and place the following configuration at the end of the file:
@@ -242,7 +203,7 @@ custom:
242203
From the root of the LibreChat project folder, run the following command to start the services:
243204

244205
```bash
245-
docker compose -f docker-compose.yml up
206+
docker compose up
246207
```
247208

248209
Wait until all services are fully running.

0 commit comments

Comments
 (0)