Skip to content

Commit 09b3877

Browse files
committed
AnythingLLM example
1 parent 0f448e1 commit 09b3877

File tree

5 files changed

+122
-0
lines changed

5 files changed

+122
-0
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
slug: /use-cases/AI/MCP/anythingllm
3+
sidebar_label: 'Integrate AnythingLLM'
4+
title: 'Set Up ClickHouse MCP Server with AnythingLLM and ClickHouse Cloud'
5+
pagination_prev: null
6+
pagination_next: null
7+
description: 'This guide explains how to set up AnythingLLM with a ClickHouse MCP server using Docker.'
8+
keywords: ['AI', 'AnythingLLM', 'MCP']
9+
show_related_blogs: true
10+
---
11+
12+
import {CardHorizontal} from '@clickhouse/click-ui/bundled'
13+
import Link from '@docusaurus/Link';
14+
import Image from '@theme/IdealImage';
15+
16+
import Conversation from '@site/static/images/use-cases/AI_ML/MCP/allm_conversation.png';
17+
import MCPServers from '@site/static/images/use-cases/AI_ML/MCP/allm_mcp-servers.png';
18+
import ToolIcon from '@site/static/images/use-cases/AI_ML/MCP/alm_tool-icon.png';
19+
20+
# Using ClickHouse MCP server with AnythingLLM
21+
22+
> This guide explains how to set up [AnythingLLM](https://anythingllm.com/) with a ClickHouse MCP server using Docker
23+
> and connect it to the ClickHouse example datasets.
24+
25+
<VerticalStepper headerLevel="h2">
26+
27+
## Install Docker {#install-docker}
28+
29+
You will need Docker to run LibreChat and the MCP server. To get Docker:
30+
1. Visit [docker.com](https://www.docker.com/products/docker-desktop)
31+
2. Download Docker desktop for your operating system
32+
3. Install Docker by following the instructions for your operating system
33+
4. Open Docker Desktop and ensure it is running
34+
<br/>
35+
For more information, see the [Docker documentation](https://docs.docker.com/get-docker/).
36+
37+
## Pull AnythingLLM Docker image {#pull-anythingllm-docker-image}
38+
39+
Run the following command to pull the AnythingLLM Docker image to your machine:
40+
41+
```bash
42+
docker pull anythingllm/anythingllm
43+
```
44+
45+
## Setup storage location {#setup-storage-location}
46+
47+
Create a directory for storage and initialize the environment file:
48+
49+
```bash
50+
export STORAGE_LOCATION=$PWD/anythingllm && \
51+
mkdir -p $STORAGE_LOCATION && \
52+
touch "$STORAGE_LOCATION/.env"
53+
```
54+
55+
## Configure MCP Server config file {#configure-mcp-server-config-file}
56+
57+
Create the `plugins` directory:
58+
59+
```bash
60+
mkdir -p "$STORAGE_LOCATION/plugins"
61+
```
62+
63+
Create a file called `anythingllm_mcp_servers.json` in the `plugins` directory and add the following contents:
64+
65+
```json
66+
{
67+
"mcpServers": {
68+
"mcp-clickhouse": {
69+
"command": "uv",
70+
"args": [
71+
"run",
72+
"--with",
73+
"mcp-clickhouse",
74+
"--python",
75+
"3.10",
76+
"mcp-clickhouse"
77+
],
78+
"env": {
79+
"CLICKHOUSE_HOST": "sql-clickhouse.clickhouse.com",
80+
"CLICKHOUSE_USER": "demo",
81+
"CLICKHOUSE_PASSWORD": ""
82+
}
83+
}
84+
}
85+
}
86+
```
87+
88+
## Start the AnythingLLM Docker container {#start-anythingllm-docker-container}
89+
90+
Run the following command to start the AnythingLLM Docker container:
91+
92+
```bash
93+
docker run -p 3001:3001 \
94+
--cap-add SYS_ADMIN \
95+
-v ${STORAGE_LOCATION}:/app/server/storage \
96+
-v ${STORAGE_LOCATION}/.env:/app/server/.env \
97+
-e STORAGE_DIR="/app/server/storage" \
98+
mintplexlabs/anythingllm
99+
```
100+
101+
Once that's started, navigate to `http://localhost:3001` in your browser.
102+
Select the model that you want to use and provide your API key.
103+
104+
## Wait for MCP Servers to start up {#wait-for-mcp-servers-to-start-up}
105+
106+
Click on the tool icon in the bottom left-hand side of the UI:
107+
108+
<Image img={ToolIcon} alt="Tool icon" size="md"/>
109+
110+
Click on `Agent Skills` and look under the `MCP Servers` section.
111+
Wait until you see `Mcp ClickHouse` set to `On`
112+
113+
<Image img={MCPServers} alt="MCP servers ready" size="md"/>
114+
115+
## Chat with ClickHouse MCP Server with AnythingLLM {#chat-with-clickhouse-mcp-server-with-anythingllm}
116+
117+
We're now ready to start a chat.
118+
To make MCP Servers available to a chat, you'll need to prefix the first message in the conversation with `@agent`.
119+
120+
<Image img={Conversation} alt="Conversation" size="md"/>
121+
122+
</VerticalStepper>
File renamed without changes.
280 KB
Loading
111 KB
Loading
39.1 KB
Loading

0 commit comments

Comments
 (0)