Model Context Protocol (MCP) Server for PostgreSQL with Spring Boot and Spring AI
MCPpedia last refreshed this data
MCP Server Postgres is an MCP server that model Context Protocol (MCP) Server for PostgreSQL with Spring Boot and Spring AI. Its tool list has not been published yet over stdio, sse and http, requires no API key, and scores 55/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"postgres": {
"args": [
"-jar",
"target/mcp-server-postgres-1.0.0-SNAPSHOT.jar"
],
"command": "java"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol (MCP) server for PostgreSQL built with Spring Boot and Spring AI. This server provides read-only access to PostgreSQL databases through dynamic connections.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in data
Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite
Manage Supabase projects — databases, auth, storage, and edge functions
Firecrawl, the context API for AI agents: search, scrape, interact with the web, plus paper search.
A cross-platform desktop application for managing AI Agents and MCP Servers. 一款用于管理AI智能体与MCP服务器的跨平台桌面应用程序。
MCP Security Weekly
Get CVE alerts and security updates for Mcp Server Postgres and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol (MCP) server for PostgreSQL built with Spring Boot and Spring AI. This server provides read-only access to PostgreSQL databases through dynamic connections.
COMPLETED: The MCP server is fully functional with the following features:
list_schemas: List all schemas in a databaselist_tables: List all tables in a specific schemaselect: Select rows from a table with optional conditions and orderingexecute_query: Execute read-only SQL queriesClone and build the project:
git clone https://github.com/luanvuhlu/mcp-server-postgres.git
cd mcp-server-postgres
mvn clean compile
Start test PostgreSQL database:
docker-compose up -d
Run the MCP server:
mvn spring-boot:run
The MCP server will start and be ready to accept connections via the Model Context Protocol.
The Docker Compose setup includes a PostgreSQL instance with sample data:
Sample schemas and tables are automatically created:
public schema: users, productssales schema: orders, order_itemsinventory schema: stockThis server can be used with any MCP-compatible client. Here are some examples:
Add the following to your Claude Desktop configuration file:
{
"mcpServers": {
"postgres": {
"command": "java",
"args": ["-jar", "target/mcp-server-postgres-1.0.0-SNAPSHOT.jar"]
}
}
}
The server implements the standard MCP protocol and can be used with any compatible client by running:
java -jar target/mcp-server-postgres-1.0.0-SNAPSHOT.jar
List all schemas in a PostgreSQL database:
{
"name": "list_schemas",
"arguments": {
"host": "localhost",
"database": "postgres",
"username": "postgres",
"password": "your_name"
}
}
List all tables in a specific schema:
{
"name": "list_tables",
"arguments": {
"host": "localhost",
"database": "postgres",
"username": "postgres",
"password": "your_name",
"schema": "public"
}
}
Select rows from a table with optional conditions and ordering:
{
"name": "select",
"arguments": {
"host": "localhost",
"database": "postgres",
"username": "postgres",
"password": "your_name",
"table": "users",
"schema": "public",
"conditions": "id > 1",
"orderBy": "username ASC",
"limit": 10
}
}
Execute a read-only SQL query:
{
"name": "execute_query",
... [View full README on GitHub](https://github.com/luanvuhlu/mcp-server-postgres#readme)