About rdb-mcp-server
rdb-mcp-server is an experimental Spring AI server for low-level JDBC operations on MySQL, PostgreSQL, and SQLite. It exposes query and SQL execution tools to MCP clients over stdio.
Key features
- 01JDBC access to three databases
- 02Read-only SQL queries
- 03Raw SQL execution with password protection
- 04Parameterized SQL with PreparedStatement
Use cases
- 01Run read-only database queries from an MCP client
- 02Execute parameterized SQL operations
- 03Perform protected write operations against supported databases
MCP support
It uses stdio transport and exposes SQL query and execution tools to MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMErdb-mcp-server
Experimental MCP server based on Spring AI for low-level SQL operations using JDBC.
Uses stdio as the transport mechanism.
Project prototype is AI generated.
Supported Databases
- MySQL
- PostgreSQL
- SQLite
Requirements
- Java 17 or later
How to Use
Installation
Download the JAR from the GitHub releases page.
Configuration
Available environment variables:
DB_URL: Database connection URL (default:jdbc:sqlite:./sqlite.db)DB_USER: Database usernameDB_PASSWORD: Database passwordAPI_PASSWORD: Password for non-read-only operations (optional)LOG_FILE: Log file path (optional, default:./rdb-mcp-server.log)
Running Standalone
java -jar x.x.x.jar
MCP Client Integration
Cline
{
"mcpServers": {
"rdb_mcp_server": {
"command": "java",
"args": [
"-jar",
"/path/to/jar"
],
"env": {
"DB_URL": "jdbc:mysql://localhost:3306/your_database",
"DB_USER": "your_username",
"DB_PASSWORD": "your_password",
"API_PASSWORD": "your_password_here",
"LOG_FILE": "./rdb-mcp-server.log"
},
"disabled": false,
"autoApprove": []
}
}
}
Cursor
{
"mcpServers": {
"rdb_mcp_server": {
"command": "java",
"args": [
"-jar",
"/path/to/jar"
],
"env": {
"DB_URL": "jdbc:mysql://localhost:3306/your_database",
"DB_USER": "your_username",
"DB_PASSWORD": "your_password",
"API_PASSWORD": "your_password_here",
"LOG_FILE": "./rdb-mcp-server.log"
}
}
}
}
Available Tools
executeQuery
Executes read-only SQL queries. No authentication required.
Vulnerable to SQL injection。
executeRawSql
Executes raw SQL statements. Requires password for non-read-only operations.
executePreparedSql
Executes parameterized SQL operations using PreparedStatement.
Adding Other Relational Databases
Add the appropriate database driver to the pom.xml file and rebuild.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.