Model Context Protocol Server Streamable HTTP/SSE/STDIO for JDBC
2.8K
This Docker image extends quarkiverse/quarkus-mcp-servers/jdbc with additional configuration options, most notably the ability to enable or disable write SQL operations.
The Model Context Protocol (MCP) server enables Large Language Models (LLMs) to:
All of this functionality is accessible through a simple JDBC URL configuration.
The MCP server supports the following database operations:
database_info: Get information about the databasedescribe_table: Get detailed information about a specific tablelist_tables: List all tables in the databaseread_query: Execute a read-only SQL querywrite_query: Execute an SQL statement that modifies data (INSERT, UPDATE, DELETE)create_table: Execute an SQL statement that creates a new tabledocker run -d --name jdbc-mcp \
-p 8080:8080 \
-e enable.write.sql=false \
-e jdbc.user=db_user \
-e jdbc.password=db_password \
-e jdbc.url=jdbc:postgresql://host:port/database \
guang1/jdbc-mcp:latest
Create a .env file:
enable.write.sql=false
jdbc.user=db_user
jdbc.password=db_password
jdbc.url=jdbc:postgresql://host:port/database
Then run:
docker run -d --name jdbc-mcp \
-p 8080:8080 \
--env-file .env \
guang1/jdbc-mcp:latest
services:
jdbc-mcp:
container_name: jdbc-mcp
ports:
- 8080:8080
environment:
- enable.write.sql=false
- jdbc.user=db_user
- jdbc.password=db_password
- jdbc.url=jdbc:postgresql://host:port/database
restart: always
image: guang1/jdbc-mcp:latest
services:
jdbc-mcp:
container_name: jdbc-mcp
ports:
- 8080:8080
env_file:
- .env
restart: always
image: guang1/jdbc-mcp:latest
http://localhost:8080/mcp/sse
http://localhost:8080/mcp
Must pass quarkus.mcp.server.stdio.enabled=true, quarkus.log.console.enable=false and quarkus.log.console.stderr=false environment variables with -i interactive option.
docker run --rm \
-e enable.write.sql=false \
-e jdbc.user=db_user \
-e jdbc.password=db_password \
-e jdbc.url=jdbc:postgresql://host:port/database \
-e quarkus.mcp.server.stdio.enabled=true \
-e quarkus.log.console.enable=false \
-e quarkus.log.console.stderr=false \
guang1/jdbc-mcp:latest
docker run --rm
--env-file .env \
-e quarkus.mcp.server.stdio.enabled=true \
-e quarkus.log.console.enable=false \
-e quarkus.log.console.stderr=false \
guang1/jdbc-mcp:latest
To use the Docker version with Claude Desktop, add this to your claude_desktop_config.json or server_config.json file:
{
"mcpServers": {
"jdbc": {
"command": "docker",
"args": [
"run",
"--rm",
"-e",
"enable.write.sql=false",
"-e",
"jdbc.user=db_user",
"-e",
"jdbc.password=db_password",
"-e",
"jdbc.url=jdbc:postgresql://host:port/database",
"-e",
"quarkus.mcp.server.stdio.enabled=true",
"-e",
"quarkus.log.console.enable=false",
"-e",
"quarkus.log.console.stderr=false",
"-i",
"guang1/jdbc-mcp:latest"
]
}
}
}
{
"mcpServers": {
"jdbc": {
"command": "docker",
"args": [
"run",
"--rm",
"--env-file",
".env",
"-e",
"quarkus.mcp.server.stdio.enabled=true",
"-e",
"quarkus.log.console.enable=false",
"-e",
"quarkus.log.console.stderr=false",
"-i",
"guang1/jdbc-mcp:latest"
]
}
}
}
| Variable | Description | Default |
|---|---|---|
jdbc.url | JDBC connection URL (required) | - |
jdbc.user | Database username | - |
jdbc.password | Database password | - |
enable.write.sql | Enable SQL operations that modify data | false |
This MCP server supports multiple database types through JDBC. For detailed information on supported JDBC variants, please see the quarkus-mcp-servers/jdbc documentation.
⚠️ Warning: When enable.write.sql is set to true, the MCP server can execute SQL statements that modify data. Use with caution in production environments.
Consider these best practices:
The source code for this project is available on GitHub: https://github.com/guanghuang/jdbc-mcp
This project is a fork of the Quarkus MCP JDBC Server with added features:
This project is licensed under the Apache License 2.0. See the LICENSE file in the GitHub repository for details.
Contributions are welcome! Please feel free to submit a Pull Request or create an Issue on the GitHub repository.
Content type
Image
Digest
sha256:ea9ee2496…
Size
188.2 MB
Last updated
7 months ago
docker pull guang1/jdbc-mcp