Provides a web-based interface for interacting with DaMeng database through natural language or direct SQL operations, including table listing, query execution, and schema viewing.
app_name: 达梦数据库MCP服务 description: 基于Gradio的达梦数据库MCP服务,提供通过自然语言或直接操作与达梦数据库交互的能力 tags: - database - dameng - mcp - sql - gradio
达梦数据库MCP服务
这是一个基于Gradio的达梦数据库MCP(Model Context Protocol)服务,提供了通过自然语言或直接操作与达梦数据库交互的能力。
功能特性
- 列出数据库中的所有表
- 执行自定义SQL查询
- 查看表结构信息
- 直观的Web界面操作
服务配置
安装依赖
如果遇到依赖问题,可以尝试升级相关包:
配置数据库连接
修改 config.json
文件中的配置参数:
或者通过环境变量配置:
- DM_HOST: 数据库主机地址
- DM_PORT: 数据库端口(默认5236)
- DM_USERNAME: 数据库用户名
- DM_PASSWORD: 数据库密码
- DM_DATABASE: 默认数据库名称
启动服务
启动后访问 http://localhost:7860
即可使用Web界面操作达梦数据库。
如果需要从外部访问,可以使用 http://<your_ip>:7860
访问。
使用说明
- 表列表:点击"列出所有表"按钮,显示数据库中的所有用户表
- SQL查询:在输入框中输入SQL语句,点击"执行查询"按钮执行
- 表结构:从下拉列表中选择表名,点击"获取表结构"查看表的字段信息
网络问题解决
如果遇到网络连接问题或frp穿透问题,请注意:
- 程序默认不开启公网分享功能,避免因缺少frp组件导致的错误
- 如果需要公网访问,可以手动下载frp组件:
- 下载文件:https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_windows_amd64.exe
- 重命名为:frpc_windows_amd64_v0.2
- 移动到:
<your_python_env>/lib/site-packages/gradio/
目录下
MCP协议支持
本服务支持MCP协议,可以与大模型平台(如ModelScope)集成,实现智能数据库操作。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with Dameng databases through natural language or direct SQL operations. Provides a web interface for listing tables, executing queries, and viewing table structures with MCP protocol support for AI model integration.
Related MCP Servers
- -securityAlicense-qualityEnables AI agents to interact with PostgreSQL databases through the Model Context Protocol, providing database schema exploration, table structure inspection, and SQL query execution capabilities.Last updated -14MIT License
- AsecurityFlicenseAqualityEnables interaction with Informix databases through a Model Context Protocol server, supporting database exploration, table inspection, and custom SQL query execution.Last updated -1
- -securityAlicense-qualityExecute SQL queries, browse schemas, and analyze Oracle Database performance through an AI-compatible Model Context Protocol server.Last updated -2MIT License
- -securityAlicense-qualityImplements a Model Context Protocol server that enables natural language interactions with SQLite databases, providing tools to list tables, retrieve schemas, count rows, and execute read-only SQL queries.Last updated -MIT License