Databases

Connect PostgreSQL, MySQL, MongoDB, and other databases to Ballast.

Ballast connects directly to your databases for semantic search over structured data. Database integrations support federated search—querying your database in real-time.

Supported Databases

DatabaseAuth TypeFeatures
PostgreSQLCredentialsTable selection, incremental sync, federated queries
MySQLCredentialsTable selection, incremental sync, federated queries
MongoDBCredentialsCollection selection
BigQueryOAuthDataset/table selection
SnowflakeCredentialsWarehouse/schema selection
OracleCredentialsTable selection
SQL ServerCredentialsTable selection

Connection Setup

PostgreSQL

  1. Add the PostgreSQL source to your collection
  2. Enter connection details:
    • Host and port
    • Database name
    • Username and password
    • SSL mode (recommended: require for production)
  3. Click Test Connection to verify
  4. Select tables to index

MySQL

  1. Add the MySQL source
  2. Enter host, port, database, and credentials
  3. Test and select tables

MongoDB

  1. Add the MongoDB source
  2. Enter connection string or individual parameters
  3. Select collections to index

Federated Search

Database integrations support federated search—querying your database in real-time instead of searching a pre-indexed cache.

When connected via MCP, Claude can:

  • list_tables - See available tables
  • describe_table - Get column names and types
  • query_data - Execute read-only SQL queries

This ensures results are always fresh, directly from your database.

Security

  • Credentials are encrypted at rest with AES-256-GCM
  • Connections use TLS when available
  • Only SELECT queries are allowed (read-only access)
  • Credentials are never logged or exposed in API responses

Configuration Options

OptionDescription
TablesWhich tables to include
Sync frequencyHow often to re-index (for cached search)
Row limitMaximum rows to index per table
SSL modeConnection security level

Best Practices

  • Use read-only credentials - Create a database user with SELECT-only permissions
  • Enable SSL - Always use encrypted connections in production
  • Limit tables - Only index tables you need to search
  • Consider row limits - For large tables, set reasonable limits