mcp-server-rdbms
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_RDBMS_USER | No | Database login user. Also supported as DB_USER or DB_USERNAME. | |
| MCP_RDBMS_CONFIG | No | Absolute path to multi-database YAML/JSON configuration file. Also supported as CONFIG_FILE. | |
| MCP_RDBMS_DB_URL | No | Full RFC 1738 connection URL (e.g., sqlite:///:memory:, postgresql+psycopg://user:password@localhost:5432/mydb). Also supported as DATABASE_URL. | |
| MCP_RDBMS_PARAMS | No | Additional connection query parameters (e.g., charset=utf8mb4). Also supported as DB_PARAMS. | |
| MCP_RDBMS_DB_HOST | No | Database host IP or domain. Default: 127.0.0.1. Also supported as DB_HOST. | 127.0.0.1 |
| MCP_RDBMS_DB_PORT | No | Database port. Default derived from dialect (e.g., MySQL 3306, PostgreSQL 5432). Also supported as DB_PORT. | |
| MCP_RDBMS_DIALECT | No | Database dialect (mysql, postgresql, oracle, mssql, sqlite, etc.). Also supported as DB_DIALECT. | |
| MCP_RDBMS_DATABASE | No | Target database/schema name. Also supported as DB_NAME or DB_DATABASE. | |
| MCP_RDBMS_PASSWORD | No | Database password (plain text, auto URL-encoded). Also supported as DB_PASSWORD or DB_PASS. | |
| MCP_RDBMS_ALLOW_DDL | No | Enable DDL operations (boolean string: 1, true, yes, on, t). Default: false. Also supported as MCP_ALLOW_DDL. | false |
| MCP_RDBMS_ALLOW_DML | No | Enable DML operations (boolean string: 1, true, yes, on, t). Default: false. Also supported as MCP_ALLOW_DML. | false |
| MCP_RDBMS_TRANSPORT | No | Transport protocol: stdio (default), sse, streamable-http. Also supported as MCP_TRANSPORT. | stdio |
| MCP_RDBMS_SERVER_HOST | No | SSE/HTTP server listen address. Default: 127.0.0.1. Also supported as HOST. | 127.0.0.1 |
| MCP_RDBMS_SERVER_PORT | No | SSE/HTTP server listen port. Default: 8000. Also supported as PORT. | 8000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| db_infoA | 获取数据库基础环境元数据与连接清单。支持多数据库环境:缺省调用时返回包含全量脱敏连接清单(connections)与默认连接状态;传入 db='' 参数时精准探查指定连接详情。在操作多数据库时,可先调用此工具获取可用连接别名列表。 |
| schema_list_tablesA | 获取指定模式下的数据表/视图清单与表注释。支持多数据库路由(通过 db 参数指定连接别名,缺省时路由至默认库);支持基于通配符(如 user_*)的 pattern 内存过滤;默认不加载外键以保障大库极速响应,显式指定 include_foreign_keys=True 时聚合全库外键拓扑。 |
| schema_describe_tableB | 一站式获取指定数据表的列定义明细(类型、可空性、默认值)、主键约束、外键约束与全部索引。支持多数据库路由(通过 db 参数指定目标数据库连接别名,缺省时路由至默认库)。 |
| sql_queryA | 安全执行只读 SQL 查询或获取执行计划。支持多数据库路由(通过 db 参数指定目标数据库连接别名,缺省时路由至默认库)。在初次探索未知业务表时,强烈建议显式指定 limit=3~5 获取结构样本;未显式指定 limit 时系统底层将安全截断至 100 行。支持 json、markdown 表格与 csv 格式输出,具备 AST 校验及慢查询熔断防护;支持 explain=True 获取执行计划分析慢查询。 |
| sql_dmlA | 在单一数据库原子事务中执行单条或批量数据增删改 (DML) 操作。支持多数据库路由(通过 db 参数指定目标数据库连接别名,缺省时路由至默认库)。受 --allow-dml 权限门禁保护,任何单步失败全量自动回滚,并在 AST 语法树层强制拦截无 WHERE 条件的 UPDATE 与 DELETE。 |
| sql_ddlA | 执行表结构定义变更 (DDL),包含建表、改表、删表与表截断。支持多数据库路由(通过 db 参数指定目标数据库连接别名,缺省时路由至默认库)。受 --allow-ddl 权限门禁与 confirm=True 显式确认双重保护,并全量落盘独立审计流水。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| connections | 获取所有已配置数据库连接别名、方言、默认库标记与只读状态 |
| recent_audit_logs | 获取服务近期执行的 SQL 与数据变更审计流水记录(默认最多 50 条) |
TDQS
Scored across 6 tools
Each tool targets a clearly distinct action: DDL vs DML vs read-only query vs schema introspection (describe vs list) vs environment info. There is no meaningful overlap, and an agent can reliably select the correct tool.
Names fall into coherent prefix groups (sql_*, schema_*, db_*), and within each group the convention is consistent. However the set mixes verb_noun (schema_list_tables) with noun_abbreviation (sql_ddl, sql_query, db_info), so it is not one unified pattern.
Six tools is a well-scoped surface for a database server, covering exactly the core categories (DDL, DML, query, describe, list, info) with no redundant entries.
The surface covers the full data lifecycle: schema inspection, listing, DDL for structure, DML for writes, and read queries. Minor gaps remain (no explicit transaction-control or user/permission management tool), but core workflows are fully supported.