Spring boot Starter for Postgresql MCP Servers With Spring AI
A Spring Boot application implementing an MCP (Model Context Protocol) server that provides read-only access to a PostgreSQL database via STDIO transport.
接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
來自發布者
A Spring Boot application implementing an MCP (Model Context Protocol) server that provides read-only access to a PostgreSQL database via STDIO transport.
A Spring Boot application implementing an MCP (Model Context Protocol) server that provides read-only access to a PostgreSQL database via STDIO transport.
postgres://<host>/<table>/schema)
mvn clean package
There are two type Docker image for Spring MCP server for this projecy
podman build -f dockers/sse/Dockerfile -t postgresql-mcp-server:latest .
podman build -f dockers/stdio/Dockerfile -t postgresql-mcp-server:latest .
podman build -t postgresql-mcp-server .
-- change host to database host, change 5432 to database port
podman run -i --rm -e DATABASE_URL=jdbc:postgresql://host:5432/db -e DATABASE_USERNAME=user -e DATABASE_PASSWORD=pass -e APP_CURRENT_SCHEMA=public mcp-postgres-spring
this configuration should be added to claude_desktop_config.json
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URL=${input:pg_url}",
"-e",
"DATABASE_USERNAME=${input:pg_user}",
"-e",
"DATABASE_PASSWORD=${input:pg_password}",
"-e",
"APP_CURRENT_SCHEMA=${input:pg_schema:public}",
"mcp-postgres-spring"
]
}
}
}
For manual installation, add the following JSON block to your Preferences (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).
Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This allows you to share the configuration with others.
Note that the mcp key is not required in the .vscode/mcp.json file.
{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "pg_url",
"description": "PostgreSQL URL (e.g. jdbc:postgresql://host:5432/db)"
},
{
"type": "promptString",
"id": "pg_user",
"description": "Database username"
},
{
"type": "promptString",
"id": "pg_password",
"description": "Database password"
},
{
"type": "promptString",
"id": "pg_schema",
"description": "Database schema (default: public)",
"default": "public"
}
],
"servers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URL=${input:pg_url}",
"-e",
"DATABASE_USERNAME=${input:pg_user}",
"-e",
"DATABASE_PASSWORD=${input:pg_password}",
"mcp-postgres-spring"
]
}
}
}
}
A Spring Boot application implementing an MCP (Model Context Protocol) server that provides read-only access to a PostgreSQL database via STDIO transport.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Postgresql 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 A Spring Boot application implementing an MCP (Model Context Protocol) server that provides read-only access to a PostgreSQL database via STDIO transport.