SQL-QueryDSL-query-mcp-server
Verified Safeby divaxi
Overview
Serves as a Model Context Protocol (MCP) server for AI clients to query and filter data from a SQL database using QueryDSL.
Installation
java -Dspring.ai.mcp.server.stdio=true -jar /path/to/your/app/target/ai-0.0.1-SNAPSHOT.jarEnvironment Variables
- POSTGRES_DB
- POSTGRES_PASSWORD
- POSTGRES_USER
Security Notes
The server utilizes QueryDSL, which provides type-safe query building and helps prevent SQL injection by avoiding raw string concatenation in queries. Incoming queries are deserialized into a strictly defined JSON schema, limiting arbitrary input and operations. However, the provided `compose.yaml` for setting up the database includes hardcoded default credentials (e.g., `POSTGRES_PASSWORD=secret`), which are not suitable for production environments and must be changed by the user.
Similar Servers
hello-spring-mcp-server
This server provides a set of tools for AI agents to query employee skills and retrieve employees based on specific skills from an in-memory dataset.
springboot-mcp-server
An AI-powered Spring Boot server for student management, demonstrating tool-use capabilities with an external large language model.
my-mcp-server
Provides a schema-based API for AI clients to query and filter employee data from a SQL database using QueryDSL.
MCP_Server
Provides a natural language interface to query a relational database by generating and executing SQL through an AI model.