Installation

Install Astapa Proxy and SDKs.

Components

Proxy

Core server that intercepts PostgreSQL traffic and stages mutations in shadow schemas

cargo install astapa-proxy
MCP Server

Model Context Protocol server for Claude Code integration

npm install -g @astapa/mcp-server
Node.js SDK

Session management, diffs, and approvals

npm install astapa
Python SDK

Session management, diffs, and approvals

pip install astapa
Go SDK

Session management, diffs, and approvals

go get github.com/namulaki/astapa

Proxy

Install the proxy server:

terminal
# Via crates.io (recommended)
cargo install astapa-proxy

# Via Docker
docker pull ghcr.io/aprdos/astapa-proxy

# From source
git clone https://github.com/namulaki/astapa.git
cd astapa-proxy
cargo build --release

SDKs

Install the SDK for your language:

terminal
# Node.js
npm install astapa

# Python
pip install astapa

# Go
go get github.com/namulaki/astapa/sdks/go/astapa

MCP Server

For Claude Code integration:

terminal
npm install -g @astapa/mcp-server

Prerequisites

  • • PostgreSQL 14+
  • • Rust 1.75+ (only if building from source)

Configuration

Configure Astapa Proxy using environment variables:

.env
# Required
DATABASE_URL=postgresql://user:pass@localhost:5432/astapa

# Optional (defaults shown)
PROXY_ADDR=0.0.0.0:5433        # Wire protocol listener
API_ADDR=0.0.0.0:8080          # HTTP API listener
SESSION_TTL_SECONDS=3600       # Session expiration

# Webhooks (optional)
WEBHOOK_URL=https://example.com/webhook
WEBHOOK_SECRET=your_hmac_secret

Run

terminal
# If installed via cargo
astapa-proxy

# If built from source
./target/release/astapa-proxy

# Via Docker
docker run -e DATABASE_URL=... -p 5433:5433 -p 8080:8080 ghcr.io/aprdos/astapa-proxy