Skip to main content
Glama

MCP Postgres Server

by MadeByNando

MCP Postgres 服务器

该服务器为 Cursor 实现了模型上下文协议 (MCP),允许使用 PostgreSQL 数据库作为模型上下文的存储。

先决条件

  • Docker
  • Docker Compose

安装和启动

  1. 克隆此存储库
  2. 使用 Docker Compose 启动服务器:
docker-compose up -d

光标中的配置

  1. 打开游标
  2. 前往“设置”>“MCP”
  3. 使用以下设置添加新连接:
    • 名称:MCP Postgres 服务器
    • 类型:命令
    • 命令: docker exec -i mcp-postgres-server node dist/index.js

故障排除

如果服务器没有正确启动:

  1. 检查容器日志:
    docker logs mcp-postgres-server
  2. 要重新启动服务器:
    docker-compose restart

MCP 服务器功能

MCP PostgreSQL 服务器为 Cursor 提供了以下工具:

  1. postgres_query - 执行只读 SQL 查询
  2. postgres_list_tables列出数据库中的所有表
  3. postgres_describe_table - 获取特定表的模式

这些工具允许 Cursor 安全地探索和查询数据库。

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

为 Cursor 实现模型上下文协议 (MCP) 的服务器,允许使用 PostgreSQL 数据库作为模型上下文的存储,从而实现安全的数据库探索和查询。

  1. 先决条件
    1. 安装和启动
      1. 光标中的配置
        1. 故障排除
          1. MCP 服务器功能

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A powerful Model Context Protocol (MCP) tool for exploring and managing different types of databases including PostgreSQL, MySQL, and Firestore.
              Last updated -
              9
              3
              TypeScript
              MIT License
            • A
              security
              A
              license
              A
              quality
              🗂️ A Model Context Protocol (MCP) server that provides integration with Turso databases for LLMs. This server implements a two-level authentication system to handle both organization-level and database-level operations, making it easy to manage and query Turso databases directly from LLMs.
              Last updated -
              8
              35
              6
              TypeScript
              MIT License
              • Linux
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol (MCP) server for Cursor IDE that simplifies the installation and configuration of other MCP servers.
              Last updated -
              882
              23
              JavaScript
              MIT License
              • Apple
              • Linux
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables performing PostgreSQL database operations (create, read, update, delete) on User and Post entities through MCP tools.
              Last updated -
              TypeScript

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/MadeByNando/mcp-postgres-server'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server