v0.2.0 pip install pretensor
Pretensor
Grounding data layer for AI agents

A wrong number from an agent
doesn't look wrong.

It looks like a number. Pretensor indexes your databases and pipelines into a knowledge graph of relationships, join paths, blast radius, and drift, then serves it over MCP so agents stop guessing at production. MIT-licensed, runs on your laptop.

v0.2.0 · python 3.11 / 3.12
pip install 'pretensor[postgres]'
read-only MCP tools
12
rows leave the DB
0
engines supported
4
schema::public
kuzu · graph
agent↳ traversing identity → billing
node
orgs · identity
path
orgs → users → orders → invoices → payments
Pretensor speaks MCP. Wires into the agents and databases you already run.
ClaudeCursorContinueClineZedGooseLangGraphPostgresSnowflakeBigQueryClaudeCursorContinueClineZedGooseLangGraphPostgresSnowflakeBigQuery
04 · MCP

One tool call,  structured answers.

Drop Pretensor into any MCP client. The agent calls a typed tool and gets precomputed context back: search, semantic retrieval, schema, traversal, impact, code consumers, validation, and metric compilation. Twelve read-only tools. Pretensor never lets a model improvise a query against production.

Find a join path between two tables. Building SQL joins across tables.
tool traverse →
agent
// find a join path
traverse(
  from:   billing.invoices,
  to:     core.customers,
  db:     prod,
  top_k:  3,
)
pretensor
→ 3 paths · confidence 0.92 · fk-backed

  invoices  --(order_id)→     orders
  orders    --(customer_id)→  customers

sql_hint:
  JOIN orders     ON invoices.order_id   = orders.id
  JOIN customers  ON orders.customer_id  = customers.id

semantic:  fk_chain_promoted
cached:    true
10 tools · MCP 1.0 · stdio · read-only
02 · How it works

From pip install to MCP-served, in three steps.

  1. STEP 01

    Install Pretensor

    Single Python package on PyPI. Adds the `pretensor` CLI. Pick the extra for your database engine.

    terminal
    pip install 'pretensor[postgres]'
  2. STEP 02

    Run the setup wizard

    `pretensor init` infers your DSN from the environment, indexes it, links a code repository, and registers with Claude Code, Claude Desktop, or Cursor, each with your confirmation.

    terminal
    pretensor init
    → found DATABASE_URL (postgres)
    → indexed prod: 342 tables · 8 clusters · 312 FKs
    → registered with Claude Code
  3. STEP 03

    Serve to your agent

    `--config-only` prints the `mcpServers` JSON for a client `init` doesn't auto-register. Drop it into your client's MCP settings and the IDE launches the server automatically.

    terminal
    pretensor serve --config-only
    {
      "mcpServers": {
        "pretensor": {
          "command": "pretensor",
          "args": ["serve", "--state-dir", ".pretensor"]
        }
      }
    }
05 · FAQ

Frequently Asked:

Can't find what you need? hello@pretensor.ai

+ Does Pretensor run queries against my database?
Only at index time, and only against the catalog (information_schema, pg_catalog...). After that, the graph serves every agent call. Your rows never leave the database.
+ Can an agent run its own SQL through Pretensor?
No. There is no `run_sql` tool, on any tier, ever. Pretensor never lets a model improvise a query against production. `validate_sql` checks a statement against the graph and `compile_metric` compiles one without executing it. The agent gets a verdict, not a result set.
+ How do I know the answer my agent gave me is right?
Today Pretensor removes the guessing: the agent reads FK-backed join paths instead of inferring them, `validate_sql` catches unknown tables and broken joins before the query runs, and `detect_changes` reports schema drift since the last index. Certified metrics and per-answer trust verdicts are the Pretensor Cloud direction. Join the waitlist and we'll tell you when they open.
+ Which clients can call it?
Anything that speaks MCP: Claude Desktop, Claude Code, Cursor, Cline, Zed, Continue, Goose, and any LangGraph or custom agent that wires up the MCP transport. `pretensor init` auto-registers Claude Code, Claude Desktop, and Cursor for you, with your confirmation. The server is stdio-local, so the client launches it directly.
+ Where does the graph live?
On disk, in a local Kuzu store under .pretensor/ (override with --state-dir). No cloud roundtrip, no network call at query time.
+ What about sensitive columns and PII?
Visibility profiles allow- or block-list schemas, tables, and columns, and can sync from database GRANTs. Pretensor returns shape, never values, you decide what shape is visible.
+ Is it open source?
Yes. MIT-licensed. All twelve MCP tools, the Kuzu graph builder, the connectors, and the CLI are OSS today on PyPI as `pretensor`. Pretensor Cloud is in development. Join the waitlist to become a design partner.
+ How do you handle schema drift?
Run `pretensor reindex`. It diffs the live catalog against the last snapshot and patches only what changed. The `detect_changes` MCP tool also lets agents check drift without mutating the graph.
+ What databases do you support?
Postgres, MySQL, Snowflake, and BigQuery, each through an optional extra: `pip install 'pretensor[postgres]'` or `pip install 'pretensor[snowflake]'`. Others by request. Connectors live behind a small interface.
+ How is this different from a data catalog?
A catalog is built for humans browsing tables. Pretensor is built for agents resolving them. The graph is read-only, deterministic, and accessed through twelve typed tools. Not a UI, not a search box, not a wiki.
06 · Get access

Ground truth for your data platform.
Pretensor Cloud.

↳ One more step

Quick human check.

One automated check before we add to the list.

↳ Hosted, with certified metrics, trust verdicts, and cross-database resolution. Design-partner access when it opens.