PostgreSQL MCP Server

Integrations

  • Required runtime environment for the MCP server, enabling the execution of database management operations through a Node.js application.

  • Provides PostgreSQL database management capabilities, including analyzing existing PostgreSQL setups, implementation guidance, debugging database issues, managing schemas, migrating data, and monitoring database performance.

PostgreSQL MCP 服务器

一个模型上下文协议 (MCP) 服务器,提供直接执行 PostgreSQL 数据库查询的功能。该服务器支持针对 PostgreSQL 数据库执行自定义 SQL 查询,并支持参数化查询和可配置的超时。该项目专为与 Cursor IDE 配合使用而设计。

先决条件

  • Node.js >= 18.0.0
  • PostgreSQL 服务器(用于目标数据库操作)
  • 对目标 PostgreSQL 实例的网络访问

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 PostgreSQL 数据库查询服务器:

npx -y @smithery/cli install @1Levick3/postgresql-mcp-server --client claude

手动安装

  1. 克隆存储库
  2. 安装依赖项:
    npm install
  3. 构建服务器:
    npm run build
  4. 添加到 MCP 设置文件:
    { "mcpServers": { "postgresql-mcp": { "command": "node", "args": ["/Users/1Levick3/Desktop/postgresql-mcp-server/build/index.js"], "disabled": false, "alwaysAllow": [], "env": { "POSTGRES_CONNECTION_STRING": "postgresUrl", "POSTGRES_SSL_CERT_PATH": "/Users/1levick3/Desktop/root.crt" } } } }

发展

  • npm run dev - 使用热重载启动开发服务器
  • npm run lint - 运行 ESLint
  • npm test运行测试

安全注意事项

  1. 连接安全
    • 使用连接池
    • 实现连接超时
    • 验证连接字符串
    • 支持 SSL/TLS 连接

贡献

  1. 分叉存储库
  2. 创建功能分支
  3. 提交你的更改
  4. 推送到分支
  5. 创建拉取请求
-
security - not tested
A
license - permissive license
-
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.

模型上下文协议服务器,可与 PostgreSQL 数据库交互,以分析设置、调试问题、管理模式、迁移数据和监控性能。

  1. 先决条件
    1. 安装
      1. 通过 Smithery 安装
      2. 手动安装
    2. 发展
      1. 安全注意事项
        1. 贡献

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server providing both read and write access to PostgreSQL databases, enabling LLMs to query data, modify records, and manage database schemas.
            Last updated -
            4
            JavaScript
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables powerful PostgreSQL database management capabilities including analysis, schema management, data migration, and monitoring through natural language interactions.
            Last updated -
            6
            19
            TypeScript
            AGPL 3.0
            • Linux
            • Apple
          • -
            security
            -
            license
            -
            quality
            A Model Context Protocol server that provides tools for connecting to and interacting with various database systems (SQLite, PostgreSQL, MySQL/MariaDB, SQL Server) through a unified interface.
            Last updated -
            Python
          • -
            security
            F
            license
            -
            quality
            A Model Context Protocol server that provides tools for interacting with databases, including PostgreSQL, DuckDB, and Google Cloud Storage Parquet files.
            Last updated -
            2
            TypeScript
            • Linux
            • Apple

          View all related MCP servers

          ID: kok5ghbt5a