微信扫码
添加专属顾问
我要投稿
探索如何安全地通过 MCP 访问 PostgreSQL 数据库,实现只读查询与数据保护。 核心内容: 1. 项目概述:实现 PostgreSQL 的只读访问功能 2. 核心功能:确保数据安全,支持大型语言模型进行只读查询 3. 配置使用方法:包括 Docker 和 NPX 两种配置方式的详细说明
提供对 PostgreSQL 数据库的只读访问功能。该服务器允许大型语言模型(LLMs)检查数据库的模式结构,并执行只读查询操作。
提供了两种配置方式:
{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/postgres",
"postgresql://host.docker.internal:5432/mydb"
]
}
}
}
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://localhost/mydb"
]
}
}
}
提供了 Docker 构建命令:
docker build -t mcp/postgres -f src/postgres/Dockerfile .
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费场景POC验证,效果验证后签署服务协议。零风险落地应用大模型,已交付160+中大型企业
2024-07-17
2025-01-02
2024-08-13
2024-08-27
2025-01-03
2024-07-11
2024-06-24
2024-07-13
2024-07-12
2024-06-10
2025-04-20
2025-04-15
2025-04-09
2025-03-29
2025-02-13
2025-01-14
2025-01-10
2025-01-06