FreeOnePlus commented on code in PR #2: URL: https://github.com/apache/doris-mcp-server/pull/2#discussion_r2153805855
########## examples/dify/dify_demo.md: ########## @@ -0,0 +1,370 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +# Dify Example: Integrating Doris MCP Server + +This document demonstrates how to integrate and use `doris-mcp-server` in Dify to perform Doris SQL calls via MCP. + +## Table of Contents + +- [Prerequisites](#prerequisites) +- [Installation & Configuration](#installation--configuration) +- [Starting the MCP Server](#starting-the-mcp-server) +- [Ngrok Tunnel (Optional)](#ngrok-tunnel-optional) +- [Installing & Configuring the Plugin in Dify](#installing--configuring-the-plugin-in-dify) +- [Creating a Dify App](#creating-a-dify-app) +- [Adding MCP Tools](#adding-mcp-tools) +- [Example Calls](#example-calls) + +--- + +## Prerequisites + +1. Clone the repository: + ```bash + git clone https://github.com/apache/doris-mcp-server.git + + cd doris-mcp-server + ``` + +2. Install the latest Python package and copy the environment template: + + ```bash + pip install mcp-doris-server + + cp .env.example .env + + vim .env + ``` + + Fill in your Doris FE connection settings in `.env`: + + ```env + DORIS_HOST=localhost + DORIS_PORT=9030 + DORIS_USER=root + DORIS_PASSWORD= + DORIS_DATABASE=information_schema + + DORIS_FE_HTTP_PORT=8030 + + # Optional: custom BE host list + DORIS_BE_HOSTS= + ``` + + +## Starting the MCP Server + +Run the startup script: + +```bash +./start_server.sh +``` + +If successful, you will see logs like this: + + +--- + +## Ngrok Tunnel (Optional) + +If your Dify deployment requires a public endpoint, use [ngrok](https://ngrok.com): + +```bash +ngrok http http://localhost:3000 +``` Review Comment: The ngrok tool has an additional learning cost. It is recommended to only make special instructions here, without adding a URL without context, which may be misleading. ########## examples/dify/dify_demo.md: ########## @@ -0,0 +1,370 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +# Dify Example: Integrating Doris MCP Server + +This document demonstrates how to integrate and use `doris-mcp-server` in Dify to perform Doris SQL calls via MCP. + +## Table of Contents + +- [Prerequisites](#prerequisites) +- [Installation & Configuration](#installation--configuration) +- [Starting the MCP Server](#starting-the-mcp-server) +- [Ngrok Tunnel (Optional)](#ngrok-tunnel-optional) +- [Installing & Configuring the Plugin in Dify](#installing--configuring-the-plugin-in-dify) +- [Creating a Dify App](#creating-a-dify-app) +- [Adding MCP Tools](#adding-mcp-tools) +- [Example Calls](#example-calls) + +--- + +## Prerequisites + +1. Clone the repository: + ```bash + git clone https://github.com/apache/doris-mcp-server.git + + cd doris-mcp-server + ``` + +2. Install the latest Python package and copy the environment template: + + ```bash + pip install mcp-doris-server + + cp .env.example .env + + vim .env + ``` + + Fill in your Doris FE connection settings in `.env`: + + ```env + DORIS_HOST=localhost + DORIS_PORT=9030 + DORIS_USER=root + DORIS_PASSWORD= + DORIS_DATABASE=information_schema + + DORIS_FE_HTTP_PORT=8030 + + # Optional: custom BE host list + DORIS_BE_HOSTS= + ``` Review Comment: You should use pip install to install it, and try to lower the usage threshold as much as possible. Do not use git clone source. You can also navigate to the README file in the root directory project in a specific place for operation. ########## examples/dify/dify_demo.md: ########## @@ -0,0 +1,370 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + + +# Dify Example: Integrating Doris MCP Server + +This document demonstrates how to integrate and use `doris-mcp-server` in Dify to perform Doris SQL calls via MCP. + +## Table of Contents + +- [Prerequisites](#prerequisites) +- [Installation & Configuration](#installation--configuration) +- [Starting the MCP Server](#starting-the-mcp-server) +- [Ngrok Tunnel (Optional)](#ngrok-tunnel-optional) +- [Installing & Configuring the Plugin in Dify](#installing--configuring-the-plugin-in-dify) +- [Creating a Dify App](#creating-a-dify-app) +- [Adding MCP Tools](#adding-mcp-tools) +- [Example Calls](#example-calls) + +--- + +## Prerequisites + +1. Clone the repository: + ```bash + git clone https://github.com/apache/doris-mcp-server.git + + cd doris-mcp-server + ``` + +2. Install the latest Python package and copy the environment template: + + ```bash + pip install mcp-doris-server + + cp .env.example .env + + vim .env + ``` + + Fill in your Doris FE connection settings in `.env`: + + ```env + DORIS_HOST=localhost + DORIS_PORT=9030 + DORIS_USER=root + DORIS_PASSWORD= + DORIS_DATABASE=information_schema + + DORIS_FE_HTTP_PORT=8030 + + # Optional: custom BE host list + DORIS_BE_HOSTS= + ``` + + +## Starting the MCP Server + +Run the startup script: + +```bash +./start_server.sh +``` Review Comment: And this~ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
