local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Provides tools for exploring and querying a PostgreSQL database, including executing read-only SQL queries, listing tables, and obtaining schema information for specific tables.
MCP Postgres 服务器
该服务器为 Cursor 实现了模型上下文协议 (MCP),允许使用 PostgreSQL 数据库作为模型上下文的存储。
先决条件
- Docker
- Docker Compose
安装和启动
- 克隆此存储库
- 使用 Docker Compose 启动服务器:
Copy
光标中的配置
- 打开游标
- 前往“设置”>“MCP”
- 使用以下设置添加新连接:
- 名称:MCP Postgres 服务器
- 类型:命令
- 命令:
docker exec -i mcp-postgres-server node dist/index.js
故障排除
如果服务器没有正确启动:
- 检查容器日志:Copy
- 要重新启动服务器:Copy
MCP 服务器功能
MCP PostgreSQL 服务器为 Cursor 提供了以下工具:
postgres_query
- 执行只读 SQL 查询postgres_list_tables
列出数据库中的所有表postgres_describe_table
- 获取特定表的模式
这些工具允许 Cursor 安全地探索和查询数据库。
This server cannot be installed
为 Cursor 实现模型上下文协议 (MCP) 的服务器,允许使用 PostgreSQL 数据库作为模型上下文的存储,从而实现安全的数据库探索和查询。
- Prérequis
- Installation et démarrage
- Configuration dans Cursor
- Résolution des problèmes
- Fonctionnalités du serveur MCP