Skip to main content

LinkedIn Portal ORCID License

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
  • Multi-Table Architecting: Teaches WPostgreSQL([User, Product, Order]) multi-table management, dictionary indexing db[User], attribute access db.product, and auto-routing
  • 24 Offline Patterns: Core CRUD, async, multi-table, 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


👤 Autor & Afiliación Oficial

Metadata

Release files for wpostgresql-mcp 0.8.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.8.0
File Size Uploaded Provenance
wpostgresql_mcp-0.8.0.tar.gz 40.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 75.2 kB

Release files / wpostgresql_mcp-0.8.0.tar.gz

Download URL wpostgresql_mcp-0.8.0.tar.gz
Size 40.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c4b40692fd9ad470e577b966f51197b361f377ce6dfefa00fc8c1de884be6099
BLAKE2b-256 checksum
How to use checksums
4f89df9b42be2e943c8afe09c6cb2bb2ff3391babcf3a73d2f8fce7ae7ce9e7d
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.8.0-py3-none-any.whl

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

Security for wpostgresql-mcp 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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