mcp-postgres-wal-server
Supports CrewAI autonomous agent frameworks with checkpointed state persistence and compensating rollback transactions for agent sessions.
Provides deterministic state persistence, ACID WAL checkpoints, and Saga rollback transactions for LangGraph multi-agent StateGraph workflows.
Integrates with PostgreSQL and Neon to store ACID checkpoint tables, recover agent context, and execute Saga compensation transactions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-postgres-wal-server
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
checkpoint_state:Commits an agent node transition with complete variable states and registered compensating actions.
get_latest_checkpoint:Recovers agent context after process restarts, container eviction, or spot instance termination.
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"
}
}
}
}Related Research
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.
This server cannot be deployed
Maintenance
Related MCP Connectors
Agent checkpoints. Resume after context resets and handoffs with retry-safe, versioned saves.
Versioned agent memory in your own Postgres: portable context, permissioned, audit trail.
Resume-effect reconciliation for checkpointed agent runs. From $9/mo.
Immutable event logging and audit trail for agent transactions
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables durable agent session transfer between machines by serializing state, provisioning sandboxes, and metering costs via MCP tools over a Postgres-backed state machine.4 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides durable mission state for AI agents, enabling crash-safe recovery, verified completion, and explicit reconciliation of uncertain side effects without duplicate or blind retries.4Apache 2.0
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to persist and restore checkpoint state, supporting crash recovery and replay for LangGraph-based workflows.8-
- AlicenseAqualityCmaintenanceEnables 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.512 npmMIT