Purpose
quarkiverse/mcp-server-jdbc is a Model Context Protocol (MCP) server for JDBC. Its goal is to enable large language models (LLMs) to inspect, query, create, and modify database contents when only a Java Database Connectivity (JDBC) URL is provided.
Main capabilities
The server supports PostgreSQL, Oracle, MariaDB, SQLite, and many other JDBC-compatible databases. It provides the following MCP components:
- read_query: executes SELECT queries on the database
- write_query: executes INSERT, UPDATE, and DELETE queries on the database
- create_table: creates tables in the database
- list_tables: lists all tables in the database
- describe_table: describes table structures
- jdbc_demo: an example prompt for starting to explore the server (similar to the example in SQLite MCP)
Usage
The MCP client needs to be configured to run the server, for example by adding configuration in claude_desktop_config.json or server_config.json. The documentation provides several command-line examples, including:
- starting with an empty database (in-memory H2 database)
- connecting to a running database (any common JDBC-compatible database), such as an already running Oracle database
- specifying the username and password separately, for example when connecting to a PostgreSQL database
JBang can download files from the network and provide them directly to databases such as H2 and SQLite; this is done through the %{url} syntax. The documentation provides an example of connecting to the Chinook SQLite database file on GitHub.
The documentation also lists some known example databases that can be used directly (without additional configuration), including music store example data (artists, albums, tracks, invoices, etc.), Microsoft's classic example database (customers, orders, products, etc.), and movie example data based on the Netflix catalog.
Implementation and runtime
The MCP server is implemented using Quarkus (Supersonic Subatomic Java Framework) and its Model Context Protocol support. It uses jbang to launch the server and handle automatic configuration of the JDBC URL, setting up Java and running the .jar as transparently as possible, working similarly to tools such as uvx, pipx, and npmx, but for Java.
Limitations and notes
Although the server can be compiled into a native executable, the documentation explicitly does not recommend doing so because the relevant JDBC drivers cannot be dynamically loaded that way. It is possible to compile a server for a specific JDBC driver, but the documentation says this is currently left to the reader to try.
If you encounter jbang not found, make sure jbang is installed and available in the PATH, or use the full path to the jbang executable. If you need more detailed logs, add the corresponding parameters to the jbang command line.