Skip to main content
Glama
jdbc-mcp-guard

jdbc-mcp-guard

by lyb-java

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
JMG_HOMENoConfig root containing connections/, drivers/, audit.jsonl, and cache/.~/.jdbc-mcp-guard
JMG_ACTORNoActor recorded in the audit log.ai@<hostname>
JMG_MAX_DAEMONSNoMaximum number of pooled JVMs.4
JMG_SCHEMA_TTL_MSNoSchema cache TTL in milliseconds.600000
JMG_AUDIT_MAX_BYTESNoAudit rotation threshold in bytes.5242880

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

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
db_queryA

通用只读 SQL 查询(达梦/MySQL 协议族/PostgreSQL 协议族/SQL Server/Oracle/SQLite/DB2/ClickHouse/Trino/H2,任意库也可用 url+driverClass)。查表结构、字段、索引、数据核对、SQL 排查一律用它,禁止另写 Python/Java 查库脚本。只放行 SELECT/WITH/SHOW/DESC/EXPLAIN/VALUES。先用 db_connections 看连接。【重要】只要这次要查的东西不止一条 SQL,就把它们全部放进 sqls 数组一次提交(≤20 条),不要循环单条调用 sql ——每次单条调用都等于一轮完整的模型往返,是真正的时间大头;SQL 执行本身只要 10-30ms。

db_connectionsA

列出本机已配置的数据库连接及其驱动状态(只回显 dialect/host/port/database/user,永不回显密码)。

db_dialectsA

列出支持的数据库方言、各自驱动是否已就绪(本地/缓存/可自动下载),以及如何接入未内置的数据库。

db_schemaA

查表结构(列名/类型/可空/注释),带 10 分钟本地缓存;支持达梦/MySQL/PG/MSSQL/Oracle/SQLite/DB2/ClickHouse/Trino(Presto)/H2。比手写 information_schema 快且省 token。

db_search_columnsA

全库模糊搜索列名(回答「这个字段在哪些表」),带缓存。

db_executeA

【写操作,分级授权】只读→DML(allowWrite)→DDL(allowDdl)→破坏性(allowDestructive),默认全关;DML: insert/update/delete/merge/replace(UPDATE/DELETE 必须带 WHERE);DDL: create table|index、alter table add|modify、comment on、drop index;破坏性: drop table/truncate/drop column(需 allowDestructive);grant/revoke/call/exec 永远禁止;DML 不传 confirm 时「执行后回滚」报影响行数;DDL 因隐式提交不可回滚,预演只做静态校验不执行;传 confirm="YES" 才真正执行;DML 超 maxAffected(默认 1000)自动回滚;每次写都记审计。必须给 reason。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 6 tools

Disambiguation3/5

There are real overlaps: db_schema and db_search_columns both serve introspection, and db_query explicitly claims schema/field/index inspection '一律用它', directly undercutting db_schema. Likewise db_connections and db_dialects both report driver readiness, so an agent may hesitate between them. Descriptions give hints (caching, convenience), but the boundaries are not crisp.

Naming Consistency4/5

All tools share a predictable db_ snake_case prefix, which makes the family instantly recognizable. The suffixes mix verb forms (query, execute, search_columns) with plain nouns (connections, dialects, schema), a minor inconsistency but still readable.

Tool Count5/5

Six tools is well-scoped for a JDBC guard server: read path, write path, connections, dialects, schema, and column search each earn a slot. Nothing feels padded or missing at the count level.

Completeness4/5

Read-only querying, tiered writes, connection listing, dialect/driver readiness, schema introspection and column search cover the core lifecycle of guarded DB access. Gaps are minor: no tool to view the audit log or inspect/verify a single connection, but agents can work around these with db_query or db_connections.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues