Skip to main content

schemabrain init

The activation wizard. Pulls the seven stages of getting from “I have a Postgres URL” to “Claude Desktop sees the schemabrain MCP server” into one command. Each stage auto-skips when its work is already done, so re-runs are safe and cheap.
The seven stages, in order:
  1. Source check — validates the URL is reachable and the session is read-only on Postgres.
  2. Index schema — DDL introspection into the SQLite store.
  3. Curate entities — LLM-suggested domain entities (or dbt manifest if found).
  4. Curate metrics — LLM-suggested aggregations (or dbt metrics if found).
  5. Curate joins — FK + pg_stat_statements mining; deterministic, no LLM.
  6. Wire host — writes the schemabrain block into the chosen MCP host’s config.
  7. Next step — prints what to ask the agent first.
Stages 3, 4, 5 are best-effort — a failure records the issue and prints a guided next step, but does not abort the wizard. Stages 1, 2, 6, 7 abort on failure. See the Setup page for the narrative walkthrough.

Source

Stages

Turn individual wizard stages on or off:

Host

Cost

Behaviour


Examples

First-time setup for Claude Desktop

CI smoke (non-interactive, deterministic)

dbt-driven curation

The wizard detects the manifest and routes stages 3 + 4 through the dbt importer instead of the LLM.

Apple Silicon + Python 3.12+


Setup walkthrough

Narrative for first-time users.

schemabrain index

The underlying indexer the wizard calls.

schemabrain doctor

Health-check what init wired up.

schemabrain apply

Re-apply the YAMLs --emit-yaml-dir produced.