支持多模式的 PostgreSQL MCP 服务器
提供对 PostgreSQL 数据库的只读访问,增强多模式支持。
快速入门
- 安装并运行服务器: 使用以下命令启动服务:
npx -y mcp-server-postgres-multi-schema <数据库连接字符串> [模式列表]
-
示例:
- 默认公开模式: npx -y mcp-server-postgres-multi-schema postgresql://localhost/mydb
- 多模式示例: npx -y mcp-server-postgres-multi-schema postgresql://localhost/mydb public,analytics,staging
-
配置(Claude Desktop): 在配置文件中添加以下内容: { "mcpServers": { "postgres": { "command": "npx", "args": [ "-y", "mcp-server-postgres-multi-schema", "postgresql://localhost/mydb", "public,audit" ] } } }
-
主要功能:
- 支持多模式、模式隔离和跨模式发现。
- 提供表结构的元数据信息。