mcp-server-dameng
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-damengList all tables in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-dameng
达梦数据库 MCP Server — 通过 Model Context Protocol (MCP) 让 AI 助手(Claude、Trae、Cursor 等)直接连接和查询达梦 DM8 数据库。
功能
query_dameng — 执行 SQL 查询(SELECT/DML),返回结构化结果
list_tables — 列出数据库中所有用户表
describe_table — 查看指定表的列信息(类型、可空、默认值、注释)
Related MCP server: dameng-mcp-server
前置条件
Node.js >= 18
Java 8+(JDK 或 JRE)— 用于 JDBC 桥接
达梦 JDBC 驱动 —
DmJdbcDriver18.jar
安装
方式一:npx 直接运行(推荐)
# 首次运行会自动下载 npm 包
npx -y mcp-server-dameng@latest方式二:全局安装
npm install -g mcp-server-dameng@latest
mcp-server-dameng方式三:项目内安装
npm install mcp-server-dameng@latest
npx mcp-server-dameng@latest配置 JDBC 驱动
由于达梦 JDBC 驱动(DmJdbcDriver18.jar)是专有软件,无法通过 npm 自动分发,需要手动配置。
方式 A:通过环境变量指定路径
# 设置驱动路径环境变量
export DAMENG_DRIVER_PATH=/path/to/DmJdbcDriver18.jar方式 B:放置到 lib 目录
将 DmJdbcDriver18.jar 复制到包目录下的 lib/ 文件夹中:
# 全局安装时
cp DmJdbcDriver18.jar $(npm root -g)/mcp-server-dameng/lib/
# 项目内安装时
cp DmJdbcDriver18.jar node_modules/mcp-server-dameng/lib/方式 C:运行 setup 命令获取帮助
npx mcp-server-dameng@latest setup环境变量配置
必需
变量 | 说明 | 示例 |
| 完整 JDBC 连接 URL |
|
| 数据库用户名 |
|
| 数据库密码 |
|
或者使用拆分方式(替代 DAMENG_URL):
变量 | 说明 | 默认值 |
| 数据库主机地址 |
|
| 数据库端口 |
|
可选
变量 | 说明 |
| 默认模式名(连接后自动设置) |
| JDBC 驱动 JAR 文件路径 |
在 AI 工具中配置
Trae / Claude Desktop / Cursor
在 MCP 配置文件(mcp.json)中添加:
{
"mcpServers": {
"dameng": {
"command": "npx",
"args": ["-y", "mcp-server-dameng@latest"],
"env": {
"DAMENG_URL": "jdbc:dm://your-host:5236",
"DAMENG_SCHEMA": "YOUR_SCHEMA",
"DAMENG_USER": "your_username",
"DAMENG_PASSWORD": "your_password",
"DAMENG_DRIVER_PATH": "D:\\path\\to\\DmJdbcDriver18.jar"
}
}
}
}开发
# 克隆仓库
git clone https://github.com/SpringDamon/mcp-server-dameng.git
cd mcp-server-dameng
# 安装依赖
npm install
# 放置 JDBC 驱动
# 将 DmJdbcDriver18.jar 复制到 lib/ 目录
# 编译 Java 桥接类
npm run compile:java
# 编译 TypeScript
npm run build
# 开发模式(热重载)
npm run dev项目结构
mcp-server-dameng/
├── src/
│ ├── index.ts # MCP Server 入口
│ ├── lib/
│ │ └── java-bridge.ts # Java JDBC 桥接
│ └── tools/
│ ├── query.ts # query_dameng 工具
│ ├── tables.ts # list_tables 工具
│ └── schema.ts # describe_table 工具
├── java/
│ └── DamengJdbcBridge.java # Java JDBC 桥接实现
├── lib/ # JDBC 驱动目录(需手动放置)
├── scripts/
│ ├── setup.js # 环境配置工具
│ └── postinstall.js # 安装后检查
├── dist/ # 编译输出
└── package.json许可证
MIT
Available Tools
3 toolsdescribe_tableA
查看达梦数据库表的列信息(列名、类型、是否为空、默认值、注释)
| Name | Required | Description | Default |
|---|---|---|---|
| tableName | Yes | 表名(不区分大小写) | |
| schema | No | 模式名(默认当前用户模式) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full behavioral disclosure. It specifies the returned fields (column name, type, nullable, default, comment), which is sufficient for a read-only metadata tool. It does not mention potential errors or performance, but the simplicity of the operation makes this acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence that encapsulates the tool's purpose and output, with no wasted words. It is front-loaded with the main action and outcome.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple metadata query tool with two parameters and no output schema, the description provides complete context: what the tool does, what parameters are needed, and what information is returned. No gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description adds extra semantic value: it notes that tableName is case-insensitive and that schema defaults to the current user's schema. This goes beyond the schema's basic description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: viewing column information (name, type, nullable, default, comment) of a Dameng database table. It effectively distinguishes from sibling tools 'list_tables' (lists tables) and 'query_dameng' (queries data).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for examining table schema, but does not explicitly state when to use it over siblings or provide alternative guidance. However, the context of sibling names makes the differentiation clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesA
列出达梦数据库中所有用户表(含表名、注释、行数估算)
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | 模式名(默认当前用户模式) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It discloses that the tool returns table names, comments, and row count estimates, which is helpful. However, it does not mention any side effects, prerequisites, or performance considerations. The disclosure is moderate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that captures the core functionality without any unnecessary words. It is front-loaded and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple listing tool without an output schema, the description adequately conveys what the tool returns (names, comments, row count estimates). It does not cover edge cases or error scenarios, but it is complete enough for its intended use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with one parameter (schema) already described clearly in the input schema. The tool description does not add further meaning beyond the schema, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all user tables in the Dameng database, including table names, comments, and estimated row counts. It uses a specific verb ('list') and resource ('tables'), and the purpose is distinct from sibling tools like describe_table (which likely describes a specific table) and query_dameng (for arbitrary queries).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide explicit guidance on when to use this tool versus alternatives like describe_table or query_dameng. The purpose is implied, but no exclusion criteria or usage context is given, making it adequate but not proactive.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_damengA
执行达梦数据库 SQL 查询(SELECT/DML),返回结构化结果
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | 要执行的 SQL 语句 | |
| limit | No | 最大返回行数(默认 200) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It mentions DML (modification), which hints at destructive potential, but does not disclose side effects, authentication requirements, or error behavior. This is adequate but not detailed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, concise sentence that includes the key elements: action, resource, supported operations, and output type. No superfluous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the low complexity (2 parameters, no output schema, no nested objects), the description is largely complete. It covers the essential purpose and return type. However, it could mention limit default or error handling for a truly complete picture.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so description adds value by clarifying the tool supports both SELECT and DML, which is not explicit in the schema's parameter descriptions. The description also notes the return type '结构化结果' (structured results), providing context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'execute' and resource 'Dameng database SQL queries', explicitly listing supported SQL types (SELECT/DML). This distinguishes it from sibling tools describe_table and list_tables, which focus on metadata.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus the sibling tools. For a tool that executes arbitrary SQL, it would be helpful to note that it's for general queries, while describe_table and list_tables are for schema inspection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v1.0.6- First observed
describe_table - First observed
list_tables - First observed
query_dameng
TDQS
Each tool has a distinct purpose: describe_table retrieves column details for a specific table, list_tables enumerates all user tables, and query_dameng executes arbitrary SQL. There is no overlap or ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case: describe_table, list_tables, query_dameng. The naming is uniform and predictable.
With 3 tools, the server is slightly lean but still well-scoped for its purpose of exploring a Dameng database. Each tool serves a necessary function without redundancy.
The tool set covers the core read operations for a database: listing tables, describing table structure, and executing queries. For a read-only exploration server, it is complete with no obvious gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables 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.1-
- AlicenseNot gradedqualityDmaintenanceMCP server for DaMeng database, enabling AI assistants to execute SQL queries, list tables, describe table structures, and retrieve schema information.697MIT
- AlicenseAqualityCmaintenanceMCP server for KingBase (PostgreSQL-compatible) databases, enabling AI assistants to query and manage database schemas, tables, and data with configurable access control.11255MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Dameng database that enables querying and managing database objects via JDBC, including tools for schemas, tables, views, indexes, and more.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SpringDamon/mcp-server-dameng'
If you have feedback or need assistance with the MCP directory API, please join our Discord server