npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dameng-mcp-server

v1.0.5

Published

MCP Server for DaMeng Database

Readme

DaMeng MCP Server

基于 Node.js 的达梦数据库 MCP (Model Context Protocol) 服务器实现。

功能特性

  • 执行 SQL 查询
  • 列出数据库表
  • 描述表结构
  • 获取数据库模式信息

安装

全局安装(推荐)

npm install -g dameng-mcp-server

使用 npx(无需安装)

npx dameng-mcp-server

本地安装

npm install dameng-mcp-server

配置

创建 .env 文件并配置数据库连接信息:

cp .env.example .env

编辑 .env 文件:

DAMENG_HOST=localhost
DAMENG_PORT=5236
DAMENG_USER=SYSDBA
DAMENG_PASSWORD=your_password
DAMENG_SCHEMA=SYSDBA
DAMENG_POOL_SIZE=10

使用

作为 MCP 服务器使用

启动服务器

dameng-mcp-server

npm start

开发模式

npm run dev

在 Trae IDE 中配置

  1. 打开 MCP 设置
  2. 添加新服务器
  3. 使用以下配置:
{
  "mcpServers": {
    "dameng-mcp-server": {
      "command": "dameng-mcp-server",
      "env": {
        "DAMENG_HOST": "localhost",
        "DAMENG_PORT": "5236",
        "DAMENG_USER": "SYSDBA",
        "DAMENG_PASSWORD": "your_password",
        "DAMENG_SCHEMA": "SYSDBA",
        "DAMENG_POOL_SIZE": "10"
      }
    }
  }
}

MCP 工具

execute_sql

执行 SQL 查询。

参数:

  • sql (string): 要执行的 SQL 语句

示例:

{
  "sql": "SELECT * FROM users LIMIT 10"
}

list_tables

列出数据库中的所有表。

参数:

示例:

{}

describe_table

描述指定表的结构。

参数:

  • table_name (string): 表名

示例:

{
  "table_name": "users"
}

get_schema_info

获取数据库模式信息。

参数:

示例:

{}

项目结构

dameng-mcp-server/
├── src/
│   ├── index.js          # MCP 服务器主入口
│   └── database.js       # 达梦数据库连接模块
├── .github/
│   └── workflows/
│       └── publish.yml    # NPM 发布工作流
├── package.json
├── .env.example
├── .npmignore
├── LICENSE
└── README.md

依赖

  • @modelcontextprotocol/sdk: MCP SDK
  • dmdb: 达梦数据库 Node.js 驱动
  • zod: 输入验证
  • dotenv: 环境变量管理

注意事项

  • 确保达梦数据库服务已启动
  • 确保 Node.js 版本 >= 18
  • 首次使用 dmdb 驱动可能需要编译,确保系统已安装必要的编译工具

开发

克隆仓库

git clone https://github.com/zqeast/dameng-mcp-server.git
cd dameng-mcp-server

安装依赖

npm install

运行测试

npm test

构建项目

npm run build

发布

手动发布到 NPM

npm publish

自动发布

推送到 GitHub 时,如果标签符合 v* 模式,会自动触发发布流程。

贡献

欢迎提交 Issue 和 Pull Request!

许可证

MIT

作者

zqeast [email protected]

链接