Skip to main content

wpostgresql-mcp

MCP Server for WPostgreSQL Architecting — teaches AI agents how to build high-performance PostgreSQL-backed systems with the wpostgresql library.

Features

  • 10 Architect Tools: Blueprints, manual, catalog search, scaffolding, connection validation, pattern generation
  • 22 Offline Patterns: Core CRUD, async, batch, transaction, pooling, schema sync, wsqlite backup, and Forensic Audit (ForensicModel soft delete & status=99)
  • Scaffolding Generator: Deploys full project structure with config, models, repositories, migrations, main.py
  • Live Connection Validation: Tests PostgreSQL connectivity via psycopg 3 and returns health status
  • Pattern-based Generation: Generates starter projects from catalog patterns

Relevant Technologies & Key Libraries

  • Model Context Protocol (MCP): mcp[cli]>=1.0.0 for AI agent interaction
  • Python 3.10+: Type hints and async I/O
  • wpostgresql: Type-safe PostgreSQL ORM with Pydantic integration and ForensicModel support
  • Pydantic v2: Data model validation and schema generation

Installation

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

Or use the installer:

chmod +x installer.sh
./installer.sh

Quick Start

# 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

Available Tools

Tool Description
get_wpostgresql_architect_blueprints Complete CRUD, async, batch, transaction, pool, sync, query builder, SQLite backup, and Forensic Audit (ForensicModel) examples
get_wpostgresql_architect_manual Expert rules, module map, data structure selection guide
search_wpostgresql_pattern Search 22+ PostgreSQL patterns in official/community catalogs
deploy_wpostgresql_scaffolding Generate full project structure with config/models/repos/migrations
validate_postgresql_connection Live health check against a running PostgreSQL instance
generate_from_pattern Generate project + example from a specific catalog pattern

Agent Integration

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

Add to .opencode/config.json:

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

Commands

Command Description
wpostgresql-mcp run Run in stdio mode (default)
wpostgresql-mcp run-sse Run in SSE mode
wpostgresql-mcp start Start as background SSE server
wpostgresql-mcp stop Stop background server
wpostgresql-mcp config Print/save JSON configuration
wpostgresql-mcp help Show help

Generated by WPostgreSQL MCP by wisrovi

Release files for wpostgresql-mcp 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wpostgresql-mcp 0.5.0
File Size Uploaded
wpostgresql_mcp-0.5.0.tar.gz 38.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wpostgresql-mcp 0.5.0
File Interpreter ABI Platform
wpostgresql_mcp-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 72.0 kB

Release files / wpostgresql_mcp-0.5.0.tar.gz

Download URL wpostgresql_mcp-0.5.0.tar.gz
Size 38.3 kB
Tags Source
SHA-256 checksum
How to use checksums
abfdeafa1cff7463ce3fb0eee4defb930a8f54496f3910045cf796e79e260118
BLAKE2b-256 checksum
How to use checksums
bb79933b5b08e3d3c0dab214a4eb731479ddc91e95c86d7be29b17c6a73eab7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / wpostgresql_mcp-0.5.0-py3-none-any.whl

Download URL wpostgresql_mcp-0.5.0-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac29900b17bceb6c550452bd1dd58b0e10aaccd7987cf4d95f93eda0fe019561
BLAKE2b-256 checksum
How to use checksums
eb557c5e2c77297079715bc4af931f156f777dc982e1497ec8cba217bb1e5ee3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page