Topology's DB Setup

product

Topology uses PostgreSQL for persistent storage in development. Currently connected to Neon.

Database Setup

Overview

Topology uses PostgreSQL for persistent storage in development. Currently connected to Neon.

Connection

The DATABASE_URL is configured in package.json under dev:gateway:

postgresql://neondb_owner:npg_jUyZFckXW2Q6@ep-falling-lab-af18uqdj-pooler.c-2.us-west-2.aws.neon.tech/neondb?sslmode=require

Initializing the Database

Run the init script to create/reset tables:

psql 'postgresql://neondb_owner:npg_jUyZFckXW2Q6@ep-falling-lab-af18uqdj-pooler.c-2.us-west-2.aws.neon.tech/neondb?sslmode=require' -f scripts/init-db.sql

Tables

  • nodes - MCP servers (custom or OpenAPI-based)
  • skills - Knowledge/workflow documents
  • boundaries - Access policies (IdP group → node/skill access)
  • traces - Audit log

Schema

See scripts/init-db.sql for the full schema including:

  • OpenAPI-related columns on nodes (type, openapi_spec, auth_type, auth_config, enabled_tools)
  • Skills table with tools/nodes references
  • Boundaries with allowed_tools for granular access

Without Neon

If Docker is running, you can use local PostgreSQL:

bun run dev:db      # Starts postgres:16-alpine on :5432
# Then modify DATABASE_URL in package.json to:
# postgresql://topology:topology@localhost:5432/topology

In-Memory Mode

If DATABASE_URL is not set, Gateway uses in-memory storage (data lost on restart).

Danger Zone