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.
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 traverse( from: billing.invoices, to: core.customers, db: prod, top_k: 3, )
→ 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
From pip install to MCP-served, in three steps.
- STEP 01
Install Pretensor
Single Python package on PyPI. Adds the `pretensor` CLI. Pick the extra for your database engine.
terminalpip install 'pretensor[postgres]'
- 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.
terminalpretensor init → found DATABASE_URL (postgres) → indexed prod: 342 tables · 8 clusters · 312 FKs → registered with Claude Code
- 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.
terminalpretensor serve --config-only { "mcpServers": { "pretensor": { "command": "pretensor", "args": ["serve", "--state-dir", ".pretensor"] } } }