MCP server that exposes any JDBC database to MCP clients with per-operation permissions
dbMCP demonstrates solid tool design with 14 well-named, verb-prefixed tools (list_, describe_, run_, read_, store_, export_, fetch_). All tools have descriptions (avg 180 chars, within 10-1024 baseline). Input schemas are present and typed for all tools. However, output schemas are not documented in the source code, LLMs cannot see what fields to expect from responses. Parameter descriptions are present but some lack detail on constraints (e.g., run_query's 'limit' lacks min/max bounds). Error handling is minimal, no recovery guidance or actionable error messages visible. Security is strong (no secrets in params, permission checks enforced), but composition could be tighter (run_statement and run_batch overlap; no batch variants for read operations).
Shows information about the connected database: product name, version, JDBC URL and driver.
Describes the whole database in one call: every table with its columns, primary keys, foreign-key relationships and indexes. The fastest way to understand an unknown database - prefer it over calling describe_table once per table. Set includeRowCounts to also get row counts (needs the SELECT permission). On databases with very many tables the response is large; then use list_tables and describe_table selectively instead.
Shows the full structure of a table: columns (type, nullability, primary key, auto-increment, default), foreign keys to other tables, foreign keys of other tables pointing here (referencedBy), and indexes. Call it before writing to a table. The name may be qualified as schema.table, which is required when the same table name exists in several schemas. Set includeRowCount to also count its rows (needs the SELECT permission).
Runs a SELECT query and writes the result to a CSV file in the configured export directory.
Reads a file from the configured export directory and returns it base64-encoded.
Output schemas not documented. LLMs cannot see what fields responses contain (e.g., does list_tables return table_name, row_count, schema, type?). This forces agents to guess field names and risks failed downstream tool calls.
Parameter constraints missing. run_query's 'limit' parameter lacks min/max bounds (baseline: 1 - 100 or similar). 'offset' lacks guidance. LLMs may pass absurd values (limit=999999) causing timeouts or memory exhaustion.
No error recovery guidance. Tools lack descriptions of what errors can occur and how to recover (e.g., 'If permission denied, call show_permissions() first'). Agents cannot self-correct on failures.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 65 | <=2025-11-25 | v2 |
Lists all tables and views of the database with schema and type. Call this first to discover the available tables and their exact names. Set includeRowCounts to also get the number of rows of every table (needs the SELECT permission).
Reads a single binary value from the database and returns it base64-encoded.
Runs a batch of SQL statements, each on its own line, optionally inside a single transaction.
Runs a single read-only SELECT query and returns one window of its rows.
Runs a single INSERT, UPDATE, DELETE, CREATE, ALTER, DROP or TRUNCATE statement, optionally with ? placeholders for values.
Shows what this server allows and where its boundaries are, in one call: the connected database, the granted permissions, the row limit of run_query (and the cap on its limit parameter), the size limits for binary values and files, the query timeout, whether store_file and export_query/fetch_file are enabled and which directories they use, and any tables or columns the operator put out of reach. Call it once at the start instead of discovering the limits by running into them.
Shows which database operations are currently allowed. Call it before a change to check whether the change is permitted. server_info reports the same set together with the limits and restrictions.
Stores a binary value into the database via a single INSERT or UPDATE statement with one ? placeholder.
Stores a file from the configured directory into the database via a single INSERT or UPDATE statement with one ? placeholder.
Overlapping tool responsibilities. run_statement and run_batch both execute SQL statements; no clear guidance on when to use each. Agents may pick the wrong one, wasting tokens and risking transaction semantics confusion.
No pagination guidance for large result sets. describe_schema can return 'large' responses on databases with many tables, but no limit or streaming mechanism is documented. LLMs may exhaust context window.