r3nz数据库mcp
用于AI驱动的数据库分析的现代Rust MCP服务器。使用自然语言将Claude连接到MSSQL和PostgreSQL数据库。
平台支持
| 平台 | 状态 |
|---|---|
| Windows x64 | ✅ 预构建二进制文件 |
| macOS/Linux | 🔧 从源代码构建 |
安装
Windows-插件(推荐)
# In Claude Code
/plugin marketplace add github:R3nzTheCodeGOD/r3nz-database-mcp
/plugin install r3nz-database-mcp@r3nz-database-tools --scope userWindows-直接MCP
# Download binary from GitHub Releases, then:
claude mcp add --transport stdio r3nz-database -- C:\path\to\r3nz-database-mcp-windows-x64.exemacOS/Linux-从源代码构建
# Prerequisites (Linux only)
# Ubuntu/Debian: sudo apt install libssl-dev pkg-config
# Fedora: sudo dnf install openssl-devel
git clone https://github.com/R3nzTheCodeGOD/r3nz-database-mcp.git
cd r3nz-database-mcp
cargo build --release
claude mcp add --transport stdio r3nz-database -- ./target/release/r3nz-database-mcp快速开始
无需配置。告诉克劳德你想要什么:
"Connect to my database: Server=192.168.1.100,1433;Database=MyDb;User Id=admin;Password=secret"
"Show me all tables"
"What are the top 10 orders by total amount?"运作原理
- 无连接启动 -服务器启动,准备接收命令
- 通过自然语言连接 -告诉克劳德你的联系方式
- 查询分析 -通过对话使用所有数据库工具
连接格式
阿多。净值:
Server=localhost,1433;Database=MyDb;User Id=sa;Password=secret网址:
mssql://user:pass@localhost:1433/database
postgres://user:pass@localhost:5432/database可用工具
连接
| 工具 | 说明 |
|---|---|
connect | 连接到数据库 |
disconnect | 关闭连接 |
connection_info | 检查状态 |
list_databases | 列出服务器上的数据库 |
switch_database | 切换数据库 |
模式
| 工具 | 说明 |
|---|---|
list_tables | 列出表/视图 |
get_schema | 列详细信息 |
get_relationships | 外键 |
查询
| 工具 | 说明 |
|---|---|
execute_query | 运行SELECT查询 |
演出
| 工具 | 说明 |
|---|---|
analyze_query | 执行计划 |
get_performance_stats | 指标 |
get_index_usage | 指数统计 |
find_blocking_queries | 阻止查询 |
安全
- 只读:只允许SELECT查询
- SQL验证:注射保护
- 速率限制:请求限制
- 无存储:从未存储凭据
许可证
麻省理工学院
