Skip to main content
Glama

wpostgresql-mcp

用于 WPostgreSQL 架构设计的 MCP 服务器——教 AI 代理如何使用 wpostgresql 库构建高性能的 PostgreSQL 后端系统。

功能特性

  • 10 个架构工具:蓝图、手册、目录搜索、脚手架、连接验证、模式生成

  • 20 个离线模式:所有核心 wpostgresql 功能均附带模块引用目录

  • 脚手架生成器:部署完整的项目结构,包含配置、模型、仓库、迁移、main.py

  • 实时连接验证:通过 psycopg 3 测试 PostgreSQL 连接并返回健康状态

  • 基于模式的生成:从目录模式生成入门项目

Related MCP server: PostgreSQL MCP Server

安装

# Clone and install
cd wpostgresql-mcp
pip install -e .

或使用安装程序:

chmod +x installer.sh
./installer.sh

快速开始

# Run the MCP server in stdio mode (for agent integration)
wpostgresql-mcp run

# Get configuration for your AI agent
wpostgresql-mcp config

# Start as background SSE server
wpostgresql-mcp start

可用工具

工具

描述

get_wpostgresql_architect_blueprints

完整的 CRUD、异步、批量、事务、连接池、同步、查询构建器示例

get_wpostgresql_architect_manual

专家规则、模块映射、数据结构选择指南

search_wpostgresql_pattern

在官方/社区目录中搜索 20+ 个 PostgreSQL 模式

deploy_wpostgresql_scaffolding

生成包含配置/模型/仓库/迁移的完整项目结构

validate_postgresql_connection

对正在运行的 PostgreSQL 实例进行实时健康检查

generate_from_pattern

从特定目录模式生成项目 + 示例

代理集成

Gemini CLI

gemini mcp add wpostgresql-mcp python3 -m wpostgresql_mcp.server run

Claude Desktop / Cursor

{
  "mcpServers": {
    "wpostgresql-mcp": {
      "command": "python3",
      "args": ["-m", "wpostgresql_mcp.server", "run"]
    }
  }
}

OpenCode

添加到 .opencode/config.json:

{
  "mcpServers": {
    "wpostgresql-mcp": {
      "command": "python3",
      "args": ["-m", "wpostgresql_mcp.server", "run"]
    }
  }
}

命令

命令

描述

wpostgresql-mcp run

以 stdio 模式运行(默认)

wpostgresql-mcp run-sse

以 SSE 模式运行

wpostgresql-mcp start

作为后台 SSE 服务器启动

wpostgresql-mcp stop

停止后台服务器

wpostgresql-mcp config

打印/保存 JSON 配置

wpostgresql-mcp help

显示帮助


由 wisrovi 的 WPostgreSQL MCP 生成

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Enables AI agents to read and optionally write to PostgreSQL databases through a multi-project setup with schema inspection, query execution, and performance analysis tools.
    5
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to query and explore PostgreSQL databases with tools for executing SQL queries, listing tables, and describing table structures.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI agents to safely and audibly operate PostgreSQL databases and their Docker environments, offering schema inspection, guarded queries, migrations, performance diagnosis, and container management tools.
    59 PyPI
    MIT