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

vmoo-mcp-database-server

v1.3.10

Published

VMOO数据库MCP服务器集合 - 支持开发和生产环境的安全数据库访问

Downloads

200

Readme

vmoo-mcp-database-server

VMOO数据库MCP服务器 - 支持开发和生产环境的安全数据库访问

npm version License: MIT

快速开始

使用npx直接运行(推荐)

# 开发环境
npx vmoo-mcp-database-server@latest --env=dev

# 生产环境
npx vmoo-mcp-database-server@latest --env=prod

# 配送测试站
npx vmoo-mcp-database-server@latest --env=deliver

# 商户Cookie管理
npx vmoo-mcp-database-server@latest --env=merchant
```### 在Augment中配置

```json
{
  "mcpServers": {
    "vmoo-database-dev": {
      "command": "npx",
      "args": ["vmoo-mcp-database-server@latest", "--env=dev"],
      "env": {
        "V_MOO_PASSWORD": "xxxxxxxxxxxxx"}
    },
    "vmoo-database-prod": {
      "command": "npx",
      "args": ["vmoo-mcp-database-server@latest", "--env=prod"],
      "env": {
        "V_MOO_PASSWORD": "xxxxxxxxxxxxx"}
    },
    "vmoo-database-deliver": {
      "command": "npx",
      "args": ["vmoo-mcp-database-server@latest", "--env=deliver"],
      "env": {
        "DELIVER_PASSWORD": "xxxxxxxxxxxxx"}
    },
    "vmoo-database-merchant": {
      "command": "npx",
      "args": ["vmoo-mcp-database-server@latest", "--env=merchant"],
      "env": {
        "MERCHANT_PASSWORD": "xxxxxxxxxxxxx"}
    }
  }
}
```### 1. 安装依赖

```bash
npm install
```### 2. 测试数据库连接

```bash
npm test
```如果看到  连接成功,说明配置正确

### 3. 启动MCP服务器

```bash
npm start
```##  在Augment中配置

### 找到Augment配置文件

- **Windows**: `%APPDATA%\Augment\config.json`- **macOS**: `~/Library/Application Support/Augment/config.json`- **Linux**: `~/.config/Augment/config.json`### 添加MCP服务器配置

在配置文件中添加:

```json
{
  "mcpServers": {
    "vmoo-database-dev": {
      "command": "node",
      "args": ["D:\\代码库\\vmoo-mcp-server\\bin\\vmoo-mcp-dev.js"],
      "env": {
        "V_MOO_PASSWORD": "xxxxxxxxxxxxx"}
    },
    "vmoo-database-prod": {
      "command": "node",
      "args": ["D:\\代码库\\vmoo-mcp-server\\bin\\vmoo-mcp-prod.js"],
      "env": {
        "V_MOO_PASSWORD": "xxxxxxxxxxxxx"}
    },
    "vmoo-database-deliver": {
      "command": "node",
      "args": ["D:\\代码库\\vmoo-mcp-server\\bin\\vmoo-mcp-deliver.js"],
      "env": {
        "DELIVER_PASSWORD": "xxxxxxxxxxxxx"}
    },
    "vmoo-database-merchant": {
      "command": "node",
      "args": ["D:\\代码库\\vmoo-mcp-server\\bin\\vmoo-mcp-merchant.js"],
      "env": {
        "MERCHANT_PASSWORD": "xxxxxxxxxxxxx"}
    }
  }
}
```**注意**: 请将路径替换为你的实际路径

### 重启Augment

保存配置文件后,重启Augment应用

## ️ 可用工具

配置成功后,你可以在Augment中直接询问:

### 1. 查询数据库
- "列出所有fanwe_开头的表"- "查询最近注册的10个用户"- "显示fanwe_menu表中价格最高的商品"### 2. 查看表结构
- "fanwe_user表的结构是什么?"- "描述fanwe_order表的字段"### 3. 获取示例数据
- "显示fanwe_menu表的前5条记录"- "fanwe_user表的示例数据"### 4. 统计信息
- "fanwe_user表有多少条记录?"- "数据库中有多少个表?"##  数据库信息

### 开发环境 (dev) 和生产环境 (prod)
- **主机**: 118.25.190.11:3306
- **数据库**: ceshi_v_moo_com
- **用户**: ceshi_v_moo_com
- **字符集**: utf8mb4

### 配送测试站 (deliver)
- **主机**: 118.25.190.11:3306
- **数据库**: ceshi_deliver
- **用户**: ceshi_deliver
- **字符集**: utf8mb4

### 商户Cookie管理 (merchant)
- **主机**: 43.142.37.34:3306
- **数据库**: merchant_cookie_manager
- **用户**: merchant_cookie_manager
- **字符集**: utf8mb4

##  安全特性

### 允许的操作
- **查询操作**: SELECTSHOWDESCRIBEEXPLAIN
- **数据修改**: INSERTUPDATE(仅限新增和修改)
- **表结构**: CREATE TABLEALTER TABLE

### 安全防护
- **禁止所有删除操作**: 完全阻止DELETEDROP TABLEDROP DATABASE等删除操作
- **测试环境专用**: 专为测试环境设计,确保数据安全
- **查询限制**: 自动添加LIMIT防止大量数据返回
- **SQL注入防护**: 使用参数化查询
- **连接池管理**: 自动管理数据库连接
- **错误处理**: 完善的错误捕获和提示

##  使用示例

```用户: "VMOO数据库中有哪些用户相关的表?"AI: 调用list_tables工具,返回包含user的表列表

用户: "fanwe_user表的字段都有什么含义?"AI: 调用describe_table工具,返回表结构详情

用户: "最近一周注册的用户有多少?"AI: 调用query_database工具,执行相应SQL查询
```## ️ 开发调试

### 启用调试模式

```bash
npm run dev
```这将启用Node.js调试器,可以在Chrome DevTools中调试

### 查看日志

MCP服务器的日志会输出到stderr,可以通过以下方式查看:

```bash
node mcp-vmoo-database-server.js 2> debug.log
```##  故障排除

### 连接问题
- 检查网络连接
- 确认数据库服务器可访问
- 验证防火墙设置

### 权限问题
- 确保数据库用户有查询权限
- 检查表访问权限

### 配置问题
- 验证Augment配置文件路径正确
- 确保Node.js版本 >= 18.0.0

## 🚀 自动发布

本项目已配置 GitHub Actions CI/CD,推送到 `main` 分支时会自动发布新版本到 npm。

### 发版流程

```bash
# 1. 修改 package.json 中的 version
# 2. 提交并推送
git add .
git commit -m "bump: 版本 x.x.x - 变更说明"
git push origin main
  • ✅ 自动检测版本号变化,仅在版本号更新时触发发布
  • ✅ 仅核心文件变更时触发(shared/vmoo-database-*/bin/index.jspackage.json
  • ⏭️ 版本号未变化时自动跳过

首次配置请参考 NPM 自动发布配置指南

许可证

MIT License