Db Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Db Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
English | 中文
一个基于 TypeScript 实现的 Model Context Protocol 服务,让 Claude Code 可以直接查询 Oracle、PostgreSQL 和 MySQL 数据库。
oracledb 驱动,默认 thin 模式)pg 驱动)mysql2 驱动)list_tables:列出指定 schema / 数据库下的表describe_table:查看表结构、字段类型和约束execute_query:执行只读的 SELECT 查询execute_dml:执行 INSERT/UPDATE/DELETE/DDL 语句每个工具都支持可选参数 dataSource("oracle"、"postgres" 或 "mysql")。如果只配置了一种数据库,会默认使用该数据库。
本项目强制使用 pnpm 管理依赖。
cd C:\Users\ASUS\db-mcp-server
pnpm install
pnpm run build如果你用 npm install 或 yarn install,preinstall 脚本会报错并阻止安装。
.env 文件支持两种配置方式,优先级如下:
示例 .env:
# Oracle 配置
ORACLE_USER=your_user
ORACLE_PASSWORD=your_password
ORACLE_DSN=localhost:1521/ORCLPDB1
# PostgreSQL 配置
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=your_user
POSTGRES_PASSWORD=your_password
POSTGRES_DATABASE=your_db
# MySQL 配置
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=your_user
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_db也可以在启动 Claude Code 前用 PowerShell 设置:
$env:ORACLE_USER = "your_user"
$env:ORACLE_PASSWORD = "your_password"
$env:ORACLE_DSN = "localhost:1521/ORCLPDB1"
$env:POSTGRES_HOST = "localhost"
$env:POSTGRES_PORT = "5432"
$env:POSTGRES_USER = "your_user"
$env:POSTGRES_PASSWORD = "your_password"
$env:POSTGRES_DATABASE = "your_db"
$env:MYSQL_HOST = "localhost"
$env:MYSQL_PORT = "3306"
$env:MYSQL_USER = "your_user"
$env:MYSQL_PASSWORD = "your_password"
$env:MYSQL_DATABASE = "your_db"
claude在 C:\Users\ASUS\.mcp.json 中添加:
{
"mcpServers": {
"db-mcp-server": {
"command": "cmd",
"args": [
"/c",
"cd /d C:\\Users\\ASUS\\db-mcp-server && node dist\\index.js"
]
}
}
}在 C:\Users\ASUS\.claude\settings.local.json 中启用:
{
"enabledMcpjsonServers": [
"db-mcp-server"
]
}修改环境变量、.mcp.json 或重新构建后,请重启 Claude Code 使配置生效。
pnpm run build
node dist/index.js无需编译,直接使用 tsx 运行:
pnpm tsx src/index.ts如果数据库需要使用 thick 模式,请设置:
$env:ORACLE_THICK_MODE = "1"
$env:ORACLE_LIB_DIR = "C:\Users\ASUS\Desktop\instantclient_19_28"重启 Claude Code 后,可以尝试:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.