|
| 1 | +--- |
| 2 | +slug: /use-cases/AI/MCP/janai |
| 3 | +sidebar_label: 'Integrate Jan.ai' |
| 4 | +title: 'Set Up ClickHouse MCP Server with Jan.ai' |
| 5 | +pagination_prev: null |
| 6 | +pagination_next: null |
| 7 | +description: 'This guide explains how to set up Jan.ai with a ClickHouse MCP server.' |
| 8 | +keywords: ['AI', 'Jan.ai', '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 OpenAIModels from '@site/static/images/use-cases/AI_ML/MCP/0_janai_openai.png'; |
| 17 | +import MCPServers from '@site/static/images/use-cases/AI_ML/MCP/1_janai_mcp_servers.png'; |
| 18 | +import MCPServersList from '@site/static/images/use-cases/AI_ML/MCP/2_janai_mcp_servers_list.png'; |
| 19 | +import MCPForm from '@site/static/images/use-cases/AI_ML/MCP/3_janai_add_mcp_server.png'; |
| 20 | +import MCPEnabled from '@site/static/images/use-cases/AI_ML/MCP/4_janai_toggle.png'; |
| 21 | +import MCPTool from '@site/static/images/use-cases/AI_ML/MCP/5_jani_tools.png'; |
| 22 | +import Question from '@site/static/images/use-cases/AI_ML/MCP/6_janai_question.png'; |
| 23 | +import MCPToolConfirm from '@site/static/images/use-cases/AI_ML/MCP/7_janai_tool_confirmation.png'; |
| 24 | +import ToolsCalled from '@site/static/images/use-cases/AI_ML/MCP/8_janai_tools_called.png'; |
| 25 | +import ToolsCalledExpanded from '@site/static/images/use-cases/AI_ML/MCP/9_janai_tools_called_expanded.png'; |
| 26 | +import Result from '@site/static/images/use-cases/AI_ML/MCP/10_janai_result.png'; |
| 27 | + |
| 28 | +# Using ClickHouse MCP server with Jan.ai |
| 29 | + |
| 30 | +> This guide explains how to use the ClickHouse MCP Server with [Jan.ai](https://jan.ai/docs). |
| 31 | +
|
| 32 | +<VerticalStepper headerLevel="h2"> |
| 33 | + |
| 34 | +## Install Jan.ai {#install-janai} |
| 35 | + |
| 36 | +Jan.ai is an open source ChatGPT-alternative that runs 100% offline. |
| 37 | +You can download Jan.ai for [Mac](https://jan.ai/docs/desktop/mac), [Windows](https://jan.ai/docs/desktop/windows), or [Linux](https://jan.ai/docs/desktop/linux). |
| 38 | + |
| 39 | +It's a native app, so once it's downloaded, you can launch it. |
| 40 | + |
| 41 | +## Add LLM to Jan.ai {#add-llm-to-janai} |
| 42 | + |
| 43 | +We can enabled models via the settings menu. |
| 44 | + |
| 45 | +To enable OpenAI, we need to provide an API key, as shown below: |
| 46 | + |
| 47 | +<Image img={OpenAIModels} alt="Enable OpenAI models" size="md"/> |
| 48 | + |
| 49 | + |
| 50 | +## Enable MCP Servers {#enable-mcp-servers} |
| 51 | + |
| 52 | +At the time of writing, MCP Servers are an experimental feature in Jan.ai. |
| 53 | +We can enable them by toggling experimental features: |
| 54 | + |
| 55 | +<Image img={MCPServers} alt="Enable MCP servers" size="md"/> |
| 56 | + |
| 57 | +Once that toggle is pressed, we'll see `MCP Servers` on the left menu. |
| 58 | + |
| 59 | +## Configure ClickHouse MCP Server {#configure-clickhouse-mcp-server} |
| 60 | + |
| 61 | +If we click on the `MCP Servers` menu, we'll see a list of MCP servers that we can connect to: |
| 62 | + |
| 63 | +<Image img={MCPServersList} alt="MCP servers list" size="md"/> |
| 64 | + |
| 65 | +There servers are all disabled by default, but we can able them by clicking the toggle. |
| 66 | + |
| 67 | +To install the ClickHouse MCP Server, we need to click on the `+` icon and then populate the form with the following: |
| 68 | + |
| 69 | +<Image img={MCPForm} alt="Add MCP server" size="md"/> |
| 70 | + |
| 71 | +Once we've done that, we'll need to toggle the ClickHouse Server if it's not already toggled: |
| 72 | + |
| 73 | +<Image img={MCPEnabled} alt="Enable MCP server" size="md"/> |
| 74 | + |
| 75 | +The ClickHouse MCP Server's tools will now be visible on the chat dialog: |
| 76 | + |
| 77 | +<Image img={MCPTool} alt="ClickHouse MCP Server tools" size="md"/> |
| 78 | + |
| 79 | +## Chat to ClickHouse MCP Server with Jan.ai {#chat-to-clickhouse-mcp-server} |
| 80 | + |
| 81 | +It's time to have a conversation about some data stored in ClickHouse! |
| 82 | +Let's ask a question: |
| 83 | + |
| 84 | +<Image img={Question} alt="Question" size="md"/> |
| 85 | + |
| 86 | +Jan.ai will ask confirmation before calling a tool: |
| 87 | + |
| 88 | +<Image img={MCPToolConfirm} alt="Tool confirmation" size="md"/> |
| 89 | + |
| 90 | +It will then show us the list of tool calls that were made: |
| 91 | + |
| 92 | +<Image img={ToolsCalled} alt="Tools called" size="md"/> |
| 93 | + |
| 94 | +If we click on the tool call, we can see the details of the call: |
| 95 | + |
| 96 | +<Image img={ToolsCalledExpanded} alt="Tools called expanded" size="md"/> |
| 97 | + |
| 98 | +And then underneath, we have our result: |
| 99 | + |
| 100 | +<Image img={Result} alt="Result" size="md"/> |
| 101 | + |
| 102 | +</VerticalStepper> |
0 commit comments