DataShield MCP Dataset Library

Configuration

Config file, environment variables, DB overrides, and how to safely change settings.

Where config comes from

There are three layers:

  1. Config file (recommended)
    • config/registry.config.local.json (preferred)
    • or set REGISTRY_CONFIG_PATH to a custom file
  2. Environment variables
    • DATABASE_URL, EMERGENCY_ADMIN_TOKEN, etc.
  3. DB override patch (optional)
    • Stored in registry.app_settings with key config.override

Important: DB connection settings are always taken from the bootstrap config (file/env) so the app can connect to Postgres to read overrides.

Editing config via UI

Go to /app/admin → DB connection:

  • Test DB settings
  • Optionally write them to config/registry.config.local.json

Go to /app/admin → Effective config:

  • View the merged config
  • Set/clear DB override patch (JSON)

Common settings

Database

Use either:

  • DATABASE_URL env var
  • OR the db.* fields in the config file

Security

  • EMERGENCY_ADMIN_TOKEN (admin UI)
  • API keys are stored in DB and scoped.

Filesystem crawler safety

The filesystem provider is disabled unless allowedRoots is set.

Config:

{
  "filesystem": {
    "allowedRoots": ["/mnt/data"],
    "maxFiles": 2000,
    "maxDepth": 6,
    "maxFileSizeBytes": 209715200,
    "allowedExtensions": [".csv", ".json", ".parquet", ".xlsx", ".tsv", ".geojson"]
  }
}

You can also set env vars:

  • FILESYSTEM_ALLOWED_ROOTS=/data,/mnt/share

Troubleshooting config

  • Run npm run doctor or open /api/health
  • If config file JSON is invalid, doctor will show warnings.