Skip to main content
Glama
mcp-postgres-wal-server

mcp-postgres-wal-server

by botmartz

mcp-postgres-wal-server

License: Apache 2.0 Model Context Protocol Maintained by Botmartz Research Whitepaper

mcp-postgres-wal-server is a production Model Context Protocol (MCP) server engineered by Botmartz AI Solutions. It supplies autonomous agent frameworks (LangGraph, CrewAI, AutoGPT) with deterministic state persistence, ACID Write-Ahead Logging (WAL) checkpoints in PostgreSQL, and automated Saga pattern rollback transactions.


Architectural Pattern

┌─────────────────────────┐       JSON-RPC 2.0        ┌─────────────────────────┐
│  LangGraph Multi-Agent  │ <======================>  │   mcp-postgres-wal-     │
│  StateGraph Supervisor  │      (Tool Request)       │   server (MCP Daemon)   │
└─────────────────────────┘                           └─────────────────────────┘
             │                                                     │
             │ State Failure /                                     ▼
             │ Saga Compensation                      ┌─────────────────────────┐
             └──────────────────────────────────────> │  Neon / PostgreSQL      │
                                                      │  ACID Checkpoint Tables │
                                                      └─────────────────────────┘

Related MCP server: everrun

Exposed MCP Tools

  1. checkpoint_state:

    • Commits an agent node transition with complete variable states and registered compensating actions.

  2. get_latest_checkpoint:

    • Recovers agent context after process restarts, container eviction, or spot instance termination.

  3. rollback_session:

    • Reverses all executed state-changing database or API mutations in reverse chronological order via compensating transactions.


Installation & Running

git clone https://github.com/botmartz/mcp-postgres-wal-server.git
cd mcp-postgres-wal-server
pip install -e .

Claude Desktop / Antigravity MCP Configuration

Add this server block to your claude_desktop_config.json or Antigravity MCP server registry:

{
  "mcpServers": {
    "postgres-wal": {
      "command": "python3",
      "args": ["-m", "mcp_postgres_wal.server"],
      "env": {
        "DATABASE_URL": "postgresql://user:password@ep-forest-1234.us-east-2.aws.neon.tech/neondb?sslmode=require"
      }
    }
  }
}

Engineered to accompany the technical dissertation: Human-in-the-Loop for Multi-Agent Systems: Designing Deterministic State Machines with LangGraph & PostgreSQL WAL.


License

Licensed under the Apache License, Version 2.0. Copyright 2026 Botmartz AI Solutions Private Limited.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides durable mission state for AI agents, enabling crash-safe recovery, verified completion, and explicit reconciliation of uncertain side effects without duplicate or blind retries.
      4
      Apache 2.0
    • A
      license
      A
      quality
      C
      maintenance
      Enables long-horizon AI agents to replace append-only conversation history with a formal, bounded state tuple, supporting state initialization, step execution with transactional rollback, observation injection, and session inspection.
      5
      28 npm
      MIT