# mcp-jdbc-server

> mcp-jdbc-server is an open-source MCP server for databases. MCP server giving AI clients read and query access to any JDBC-connected database. It is available on CLI and Self-hosted.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/openlinksoftware/mcp-jdbc-server
- **GitHub stars:** 17
- **License:** MIT
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-01

## About

Connects AI assistants to relational and RDF databases through the Java Database Connectivity layer, so a client can browse schemas, inspect table structures and run SQL without custom glue code. It is built on Quarkus and runs as a local process that the MCP client launches.

Beyond standard metadata lookups and query execution, the server returns results either as JSON Lines or as Markdown tables, which suits both programmatic use and direct reporting. Virtuoso-specific tools add SPARQL, SPASQL and stored procedure calls for that database engine.

It suits developers and data analysts who want an assistant to explore an unfamiliar database schema or answer questions against live data, and who can supply their own JDBC driver jars for the database they use.

## Features

- **Schema and table browsing:** Lists schemas, tables and name-based matches so a client can map out a database.
- **Table structure description:** Reports column names, types, nullability, primary keys and foreign keys for a table.
- **SQL query execution:** Runs SQL statements and returns rows as JSON Lines or Markdown tables.
- **Virtuoso SPARQL and SPASQL support:** Exposes SPARQL and hybrid SPASQL queries when connected to a Virtuoso instance.
- **Stored procedure calls:** Executes stored procedures on Virtuoso and returns their results.
- **Bring-your-own JDBC drivers:** Works with any database that offers a JDBC driver by adding its jar to the classpath.

## Good for

- Letting an assistant explore an unfamiliar database schema before writing queries
- Generating reports from live database tables as Markdown tables
- Querying Oracle or Informix databases from an MCP client using their JDBC drivers
- Describing table structures to document or review a data model
- Running SPARQL queries against a Virtuoso knowledge graph from an AI client

## Tools

From the tool list in its README, going by the names, 2 of 10 tools change data; 2 names don't say. From the server's own tool labels and tool names; not verified by us.

- `jdbc_get_schemas` (name suggests: reads): List database schemas accessible to connected DBMS.
- `jdbc_get_tables` (name suggests: reads): List tables associated with a selected database schema.
- `jdbc_describe_table` (name suggests: reads): Describe a table's columns, types, nulls, primary and foreign keys.
- `jdbc_filter_table_names`: List tables whose names match a substring pattern.
- `jdbc_query_database` (name suggests: reads): Execute a SQL query and return results in JSONL format.
- `jdbc_execute_query` (name suggests: changes): Execute a SQL query and return results in JSONL format.
- `jdbc_execute_query_md` (name suggests: changes): Execute a SQL query and return results in Markdown table format.
- `jdbc_spasql_query` (name suggests: reads): Execute a SPASQL query on Virtuoso and return results.
- `jdbc_sparql_query` (name suggests: reads): Execute a SPARQL query on Virtuoso and return results.
- `jdbc_virtuoso_support_ai`: Interact with LLMs through the Virtuoso Support Assistant.

## FAQ

### Which databases does mcp-jdbc-server support?

It is compatible with Virtuoso and any other DBMS that has a JDBC driver, with Oracle and Informix shown as examples.

### What Java version is required?

Java 21 or above.

### How are database credentials supplied?

Through environment variables for the JDBC URL, user and password, and most tools also accept these as optional inputs.

### What output formats do query tools return?

Query results can be returned as JSON Lines or as Markdown tables.

### Is mcp-jdbc-server free?

Yes. mcp-jdbc-server is open source, so you can use and self-host it for free.

### What are the best alternatives to mcp-jdbc-server?

The closest alternatives to mcp-jdbc-server are mcp-sqlalchemy-server, mcp-odbc-server, JDBC MCP Server, sql-query-mcp and DB MCP.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [mcp-sqlalchemy-server](https://ai-powered.com/mcp/mcp-sqlalchemy-server): mcp-sqlalchemy-server is an open-source MCP server for databases.
- [mcp-odbc-server](https://ai-powered.com/mcp/mcp-odbc-server): mcp-odbc-server is an open-source MCP server for databases.
- [JDBC MCP Server](https://ai-powered.com/mcp/jdbc-mcp-server): JDBC MCP Server is an open-source MCP server for databases.
- [sql-query-mcp](https://ai-powered.com/mcp/sql-query-mcp): sql-query-mcp is an open-source MCP server for databases.
- [DB MCP](https://ai-powered.com/mcp/db-mcp): DB MCP is an open-source MCP server for databases.
- [MCP Sparql](https://ai-powered.com/mcp/mcp-sparql): MCP Sparql is an open-source MCP server for databases.
- [mcp-server-bigquery](https://ai-powered.com/mcp/mcp-server-bigquery): mcp-server-bigquery is an open-source MCP server for databases.
- [legion-mcp](https://ai-powered.com/mcp/legion-mcp): legion-mcp is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/mcp-jdbc-server
