JDBC MCP Server

MCP server (stdio) that exposes read-only access to relational databases over JDBC: schema metadata, SELECT execution, execution plans, statistics and index analysis. Built-in dialects for…

Local serverstdio

What is the JDBC MCP Server?

jdbc-mcp-server is an MCP project maintained in the igorolv/jdbc-mcp-server repository. The maintainer describes its purpose as “MCP server (stdio) that exposes read-only access to relational databases over JDBC: schema metadata, SELECT execution, execution plans, statistics and index analysis. Built-in dialects for…”. Read the project documentation for the complete scope.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
structureSnapshotSchemasschemas to front-load on a full rebuild (empty → the default schema).
structureSnapshotOracleColumnQueryTimeoutSecondsOracle-only timeout for the
GroupFlag
MetadataJDBC_MCP_TOOLS_METADATA
QueryJDBC_MCP_TOOLS_QUERY
AdminJDBC_MCP_TOOLS_ADMIN
SampleJDBC_MCP_TOOLS_SAMPLE
DistributionJDBC_MCP_TOOLS_DISTRIBUTION
StatisticsJDBC_MCP_TOOLS_STATS
BenchmarkJDBC_MCP_TOOLS_BENCHMARK
ConnectionsJDBC_MCP_TOOLS_CONNECTIONS
executeQueryExecute a SELECT, WITH, or EXPLAIN statement. Parameters: sql, params (array for ?) or namedParams (object for :name), limit, timeoutSeconds. The result is…
explainQueryReturn the execution plan. PostgreSQL: EXPLAIN (FORMAT TEXT). Oracle: EXPLAIN PLAN FOR plus DBMS_XPLAN.DISPLAY. SQL Server: SET SHOWPLAN_TEXT ON on the same…
analyzePlanCompact LLM-oriented plan summary instead of a large raw plan dump: highest-cost nodes, full scans on large tables, estimate errors (planner vs. reality…
validateQueryValidate syntax without execution: read-only guard plus driver prepareStatement, with a JSqlParser-derived inspection summary when parsing succeeds. Parameters
inspectQueryParse SQL through JSqlParser without touching the database and return an AST summary: tables, aliases, CTEs, select items, joins, predicates, order by…
queryLintParse SQL and combine the AST with metadata, index, and FK checks. Returns advisory warnings such as unknown tables or columns, SELECT , joins without…
resolveQueryLineageResolve direct objects referenced by a query and recursively expand database views/materialized views to underlying physical tables. Function/procedure…
benchmarkQueryRun the query coldRuns + warmRuns times (defaults to 1 cold + 3 warm) and return wall-clock min, median, and max for warm runs; cold runs are reported…
timedQueryRegular executeQuery plus wall-clock elapsed_ms. Parameters can be passed as params (?) or namedParams (:name). On PostgreSQL, it also captures…
listSchemasList schemas. System schemas are hidden by default; use includeSystem=true to show all
listTablesList tables and views in a schema. Parameters: schema, namePattern (with % / _), types (comma-separated, for example TABLE,VIEW,MATERIALIZED VIEW)
describeTableFull object description in one call: columns, primary key, unique constraints, indexes, outgoing/incoming FKs, CHECK constraints and allowed values, plus…
getTriggerDefinitionTrigger body for one named trigger. Parameters: schema, table, trigger
getViewDefinitionSQL definition of a view
listRoutinesFunctions, procedures, and packages in a schema
getRoutineDefinitionFunction or procedure source code. On Oracle, all ALL_SOURCE lines are concatenated in order
listSequencesSequences in one schema, or across schemas when schema is omitted
searchObjectsCase-insensitive substring search across non-system tables, views, routines, sequences, and synonyms
tableContextContext around one table: the table itself, FK parents, and optionally child tables and relationship edges. FK traversal uses the requested depth (default 1…
findJoinPathsFind JOIN paths between two tables through FKs. The graph is traversed in both directions and each edge includes joinCondition and a typed evidence bundle (see
schemaBriefPlain-text full-schema map for SQL authoring: all matching tables/views with column counts, PK, incoming/outgoing relationship counts, key-like columns…
schemaGraphSchema relationship graph metrics: nodes with in/out degree and classification, edges, central tables, isolated tables, connected components, and cycle…
schemaLintSchema lint audit: missing primary keys, FKs without indexes, FK type mismatches, nullable unique constraints, status/type columns without CHECK constraints…
queryContextBuild compact SQL-authoring context from search terms and/or explicit tables. Finds relevant tables and columns using declared schema names/comments plus…
schemaGraphDotDOT/Graphviz representation of the schema relationship graph. Nodes are tables with all columns and types (PK and FK marked inline), edges include JOIN…
usageCatalogStatusCurrent catalog state (not_started, indexing, ready, failed, or invalidated), enabled flag, and configured sources
invalidateUsageCatalogCacheDrop the runtime index. The next lookup rebuilds it synchronously from configured files and database-native objects
getQueryFull record selected by sourceKind, sourcePath, and optional sourceUnit: header, parameters, parsed tables/columns/join pairs, outputs, and field usages
listQueriesPaginated listing with optional filters: sourcePath (LIKE — % / _ allowed), sourceKind, businessDomain, tag, parseStatus, searchText, limit, offset
findQueriesByTableAll catalog queries that reference a given table. Case-insensitive matching against alias-resolved, uppercased table names. Optional schema filter
findQueriesByColumnAll catalog queries that reference a given column, with the SQL context of the reference (select / where / join / order_by / having). Optional schema and table
observedRelationshipsAggregate observed equi-join pairs across stored queries, grouped by (left_table.left_column = right_table.right_column) with support count and contributing…
listKnownTagsTags currently used in the catalog, with query counts. Lets the agent reuse a stable vocabulary across ingest calls
listKnownDomainsSame for businessDomain values
listKnownKindsSource-kinds currently used in the catalog with their query counts. Helps the agent discover valid values for listQueries sourceKind filter
rebuildCatalogRebuild the persistent structure snapshot and usage index for comma-separated schemas (or the configured/default scope), checkpoint SQLite WAL, and return…
listConnectionsList the databases this server serves: name (the value to pass as connection), description, engine kind, default schema, whether a local catalog file already…
sampleRowsReturn a few rows from a table or view (LIMIT / FETCH FIRST / TOP depending on database). Parameters: schema, table, limit (default 10, max 100)
columnStatsBasic column statistics: total_rows, non_null_rows, distinct_values, min, max. A cheap one-shot aggregate when only extremes are needed
columnDistributionTop-N most frequent values of a column plus their share. Surfaces skew, for example 70% of rows with status='OK', where an index on status alone is not useful.
columnHistogramPercentiles P25 / P50 / P75 / P90 / P95 / P99 plus min, max, and null count. Uses SQL:2003 WITHIN GROUP: percentile_cont for numeric types and…
nullRatioOne scan for null / non-null counts across every table column. Columns are sorted by descending null_ratio. sparse=true marks columns where more than 50% of…
estimateSelectivityEstimate how many rows a predicate would return without executing the query, using EXPLAIN on SELECT 1 FROM t WHERE . Returns estimated rows, baseline row…
joinCardinalityEstimate the output row count of a JOIN without executing it. Returns planner estimate, per-side row counts, and selectivity_vs_cartesian. Supports INNER…
tableStatsTable and index sizes in bytes, estimated row count, dead tuples on PostgreSQL, last vacuum/analyze, and seq/idx scan counters. On Oracle, also includes…
indexStatsPer-index size, scan counter, columns, unique/primary flag, and index type. PostgreSQL extras: idx_tup_read/fetch, pg_get_indexdef. Oracle extras…
unusedIndexesIndexes with zero scans on PostgreSQL (pg_stat_user_indexes). PK and UNIQUE indexes are excluded. On Oracle, returns a diagnostic note because ALL_INDEXES does
redundantIndexesIndexes whose column list is a strict prefix of another index on the same table. Unique indexes are not reported because dropping them would remove a…
fkIndexCoverageForeign keys on the child side that lack a supporting index, a classic cause of slow DELETE / UPDATE CASCADE and slow JOINs. The result includes…