数据库
PostgreSQL
官方 PostgreSQL MCP 服务器,支持读写 SQL 查询、架构探索和表检查。
安装
npx -y @modelcontextprotocol/server-postgresPostgreSQL MCP 服务器是官方 Model Context Protocol 服务器 monorepo 的一部分。它将 LLM 连接到 PostgreSQL 数据库,用于读写 SQL 查询、架构探索和表检查。
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"POSTGRES_CONNECTION_STRING": "postgresql://user:password@localhost:5432/dbname"
}
}
}
}