Skip to main content
  1. You ask a question in Claude: /db whats my ltv. The /db skill picks a tool — the question is ambiguous, so it uses /plan.
  2. /plan calls the Plan Agent, which returns a plan and SQL. Planning relies on the index — a precomputed summary of your database.
  3. /run executes SQL through the connection you configured at setup.
The CLI is for management only — connecting a database and rebuilding the Index. Questions and queries go through the MCP server. For encryption, credential storage, and retention, see Security. For how the Plan Agent works, see Planning.

Components

  • Claude Code plugin — a bundle of:
    • /db skill — your entry point.
    • MCP server link — a .mcp.json that points your client at our MCP server.
  • MCP server — hosted at mcp.datafrey.ai. A thin wrapper over the DataFrey API that exposes /plan and /run. Self-hostable.
  • CLI — the datafrey command. A thin wrapper over the DataFrey API that handles database connections, index management, and plugin install.
  • DataFrey API — our cloud backend:
    • Management API — credentials, database connections, and indexing.
    • Plan Agent — turns a natural-language question into a plan and SQL. Uses the index.
    • Index — a summary of your schema. Built by datafrey index, used by the Plan Agent. See Planning.
    • Query Runner — executes SQL against your database under read-only guardrails.

Lifecycles

CLI - Setup

The CLI covers auth, database credentials, and plugin install. Walkthrough: Quickstart.

CLI - Index

datafrey index builds a server-side summary of your schema. Used by Planning.

MCP - Plan

Turns an ambiguous question into SQL. The Plan Agent reads the index and your database to ground its answer.

MCP - Run

Passes your SQL through to your database.