diff --git a/content/docs-lite/zh/docs/DataVec/MCP.md b/content/docs-lite/zh/docs/DataVec/MCP.md new file mode 100644 index 0000000000000000000000000000000000000000..b29e79bab9fffd76da2658c672393529baddfc37 --- /dev/null +++ b/content/docs-lite/zh/docs/DataVec/MCP.md @@ -0,0 +1,67 @@ +# MCP + openGauss +随着AI从静态推理向动态交互演进,智能体(Agent)逐渐成为焦点。Agent不仅能够调用LLM进行推理,还能访问数据库、调用API、执行任务。然而,当前LLM和Agent之间缺乏标准化交互协议, 每个新数据源都需要自定义实现,使得真正互联的系统难以扩展。MCP(Model Context Protocol, 模型上下文协议)解决了这一挑战,MCP是为LLM和Agent系统设计的标准化交互框架,使LLM可以与外部数据库、API和工具进行高效交互。 + +## openGauss + MCP + LLM 架构 + +**图 1** openGauss + MCP + LLM 架构 +
+ +
+ +## 快速搭建openGauss + MCP + LLM的AI Agent应用 +### 环境准备 +- 安装python3环境,安装uv。 +- 通过[容器部署](../InstallationGuide/容器镜像安装.md)并启动openGauss数据库。 +- 下载Claude Desktop配合MCP协议进行问答操作。 + +### 获取openGauss_mcp_server源码 +访问链接 https://github.com/vincentsunx/mcp-openGauss.git 获取openGauss_mcp_server源码,当前版本为(0.1.0)。 + +### 配置参数 +- 打开Claude Desktop设置,编辑配置文件。 + +**图 2** Claude Desktop配置页面 +
+ +
+ +- 通过Edit Config增加配置 + +``` +{ + "mcpServers": { + "openGauss": { + "command": "uv", + "args": [ + "--directory", + "path/to/openGauss_mcp_server", + "run", + "server.py" + ], + "env": { + "OPENGAUSS_HOST": "localhost", + "OPENGAUSS_PORT": "8888", + "OPENGAUSS_USER": "your_username", + "OPENGAUSS_PASSWORD": "your_password", + "OPENGAUSS_DBNAME": "your_database" + } + } + } +} +``` +## AI服务集成 +### 重新启动Claude Desktop +可以看到可用MCP Tool, 执行sql通过openGauss server + +**图 3** Claude Desktop可用MCP Tool +
+ +
+ +### 使用Cluade Desktop通过openGauss进行问答 +**图 4** Claude Desktop问答演示 +
+ +
+ + diff --git a/content/docs-lite/zh/docs/DataVec/figures/Claude-MCP.png b/content/docs-lite/zh/docs/DataVec/figures/Claude-MCP.png new file mode 100644 index 0000000000000000000000000000000000000000..f3989669746eca0d0a9d9032a22fce749c500a44 Binary files /dev/null and b/content/docs-lite/zh/docs/DataVec/figures/Claude-MCP.png differ diff --git a/content/docs-lite/zh/docs/DataVec/figures/Claude-show.png b/content/docs-lite/zh/docs/DataVec/figures/Claude-show.png new file mode 100644 index 0000000000000000000000000000000000000000..fd7d50769352f28b98c69024906227bbcc2ae465 Binary files /dev/null and b/content/docs-lite/zh/docs/DataVec/figures/Claude-show.png differ diff --git a/content/docs-lite/zh/docs/DataVec/figures/Claude.png b/content/docs-lite/zh/docs/DataVec/figures/Claude.png new file mode 100644 index 0000000000000000000000000000000000000000..40a6e8affc19da9f9c92a835c5b7d947aba0cdd6 Binary files /dev/null and b/content/docs-lite/zh/docs/DataVec/figures/Claude.png differ diff --git a/content/docs-lite/zh/docs/DataVec/figures/MCP.png b/content/docs-lite/zh/docs/DataVec/figures/MCP.png new file mode 100644 index 0000000000000000000000000000000000000000..8606022f1081a6fdc030000e5829b6f35dbbba37 Binary files /dev/null and b/content/docs-lite/zh/docs/DataVec/figures/MCP.png differ diff --git a/content/docs-lite/zh/menu/index.md b/content/docs-lite/zh/menu/index.md index dac9328f091eef99b74e716d0555cbd30fa8d6a6..e27be8fd320168b70cdbdfdfa2816944f8a06e12 100644 --- a/content/docs-lite/zh/menu/index.md +++ b/content/docs-lite/zh/menu/index.md @@ -634,6 +634,8 @@ headless: true - 嵌入模型 - [BGE-M3]({{< relref "./docs/DataVec/embedding-bgem3.md" >}}) - [Nomic]({{< relref "./docs/DataVec/embedding-nomic.md" >}}) + - Agents + - [MCP]({{< relref "./docs/DataVec/mcp.md" >}}) - 数据迁移 - [从Milvus迁移至openGauss DataVec]({{< relref "./docs/DataVec/milvus2datavec.md" >}}) - API Reference diff --git a/content/zh/docs/DataVec/MCP.md b/content/zh/docs/DataVec/MCP.md new file mode 100644 index 0000000000000000000000000000000000000000..b5c256009c8ab5e34ca18645ad3163283cf34893 --- /dev/null +++ b/content/zh/docs/DataVec/MCP.md @@ -0,0 +1,67 @@ +# MCP + openGauss +随着AI从静态推理向动态交互演进,智能体(Agent)逐渐成为焦点。Agent不仅能够调用LLM进行推理,还能访问数据库、调用API、执行任务。然而,当前LLM和Agent之间缺乏标准化交互协议, 每个新数据源都需要自定义实现,使得真正互联的系统难以扩展。MCP(Model Context Protocol, 模型上下文协议)解决了这一挑战,MCP是为LLM和Agent系统设计的标准化交互框架,使LLM可以与外部数据库、API和工具进行高效交互。 + +## openGauss + MCP + LLM 架构 + +**图 1** openGauss + MCP + LLM 架构 +
+ +
+ +## 快速搭建openGauss + MCP + LLM的AI Agent应用 +### 环境准备 +- 安装python3环境,安装uv。 +- 通过[容器部署](../InstallationGuide/容器镜像安装.md)并启动openGauss数据库。 +- 下载Claude Desktop配合MCP协议进行问答操作。 + +### 获取openGauss_mcp_server源码 +访问链接 https://github.com/vincentsunx/mcp-openGauss.git 获取openGauss_mcp_server源码,当前版本为(0.1.0)。 + +### 配置参数 +- 打开Claude Desktop设置,编辑配置文件。 + +**图 2** Claude Desktop配置页面 +
+ +
+ +- 通过Edit Config增加配置 + +``` +{ + "mcpServers": { + "openGauss": { + "command": "uv", + "args": [ + "--directory", + "path/to/openGauss_mcp_server",s + "run", + "server.py" + ], + "env": { + "OPENGAUSS_HOST": "localhost", + "OPENGAUSS_PORT": "8888", + "OPENGAUSS_USER": "your_username", + "OPENGAUSS_PASSWORD": "your_password", + "OPENGAUSS_DBNAME": "your_database" + } + } + } +} +``` +## AI服务集成 +### 重新启动Claude Desktop +可以看到可用MCP Tool, 执行sql通过openGauss server + +**图 3** Claude Desktop可用MCP Tool +
+ +
+ +### 使用Cluade Desktop通过openGauss进行问答 +**图 4** Claude Desktop问答演示 +
+ +
+ + diff --git a/content/zh/docs/DataVec/figures/Claude-MCP.png b/content/zh/docs/DataVec/figures/Claude-MCP.png new file mode 100644 index 0000000000000000000000000000000000000000..f3989669746eca0d0a9d9032a22fce749c500a44 Binary files /dev/null and b/content/zh/docs/DataVec/figures/Claude-MCP.png differ diff --git a/content/zh/docs/DataVec/figures/Claude-show.png b/content/zh/docs/DataVec/figures/Claude-show.png new file mode 100644 index 0000000000000000000000000000000000000000..fd7d50769352f28b98c69024906227bbcc2ae465 Binary files /dev/null and b/content/zh/docs/DataVec/figures/Claude-show.png differ diff --git a/content/zh/docs/DataVec/figures/Claude.png b/content/zh/docs/DataVec/figures/Claude.png new file mode 100644 index 0000000000000000000000000000000000000000..40a6e8affc19da9f9c92a835c5b7d947aba0cdd6 Binary files /dev/null and b/content/zh/docs/DataVec/figures/Claude.png differ diff --git a/content/zh/docs/DataVec/figures/MCP.png b/content/zh/docs/DataVec/figures/MCP.png new file mode 100644 index 0000000000000000000000000000000000000000..8606022f1081a6fdc030000e5829b6f35dbbba37 Binary files /dev/null and b/content/zh/docs/DataVec/figures/MCP.png differ diff --git a/content/zh/menu/index.md b/content/zh/menu/index.md index 6a77d5be78ea713cea47c0097fdb53be00f2467f..8ae385e31c0f4a27068aee83f70a295434d540ce 100644 --- a/content/zh/menu/index.md +++ b/content/zh/menu/index.md @@ -919,6 +919,8 @@ headless: true - 嵌入模型 - [BGE-M3]({{< relref "./docs/DataVec/embedding-bgem3.md" >}}) - [Nomic]({{< relref "./docs/DataVec/embedding-nomic.md" >}}) + - Agents + - [MCP]({{< relref "./docs/DataVec/mcp.md" >}}) - 数据迁移 - [从Milvus迁移至openGauss DataVec]({{< relref "./docs/DataVec/milvus2datavec.md" >}}) - API Reference