Open your database to agents, safely
Point it at any Postgres and hand your agents access you stay in full control of.
No password sharing
Agents connect with a dedicated token, never your database credentials. Revoke it anytime without touching the database.
Sensitive data masked
Emails, phone numbers, secrets and free-text are masked before they ever leave the proxy. Raw values never reach the agent.
You decide what's visible
Choose exactly which tables and columns each agent can read, and how each one is masked. Everything else stays hidden.
Read-only by design
Agents can query, never write. No raw SQL is accepted — just safe, structured reads against the data you allow.
Any Postgres, install nothing
Point it at an existing connection string. No extensions, no replicas, no schema changes — your database is untouched.
Scoped tokens & full audit
Issue per-agent tokens with exactly the access they need, and every query is logged for a complete audit trail.
Real data in, masked data out
The same row, as it lives in your database versus what the agent actually receives.
| id | phone | api_key | |
|---|---|---|---|
| 1042 | ethan@vm0.ai | +1 213 555 0142 | sk_live_9f3a2b… |
| 1043 | lancy@vm0.ai | +1 213 555 7791 | sk_live_77c1de… |
| id | phone | api_key | |
|---|---|---|---|
| 1042 | e***@vm0.ai | +X XXX XXX 0142 | •••••••• |
| 1043 | l***@vm0.ai | +X XXX XXX 7791 | •••••••• |
Mask each column your way — partial reveal, redaction, hashing, or hidden entirely.
Live in three steps
Connect your database
Give maskdb a read-only connection string. Nothing is installed or changed on your side.
Choose what's visible
Pick the tables and columns agents may read, and set how each sensitive column is masked.
Hand out a token
Issue a scoped token to each agent. They query safe, masked data — you keep full control and audit.
Set it up with your AI — in one paste
maskdb is built for AI agents, so the setup is too. Paste this into your AI assistant (Claude Code, Cursor, …). It registers your account, reads your schema, proposes what to mask, and mints a read-only token for your agents — you just approve.
Set up maskdb (https://api.maskdb.ai) so my AI agents get safe, read-only, masked access to my Postgres database. Work step by step. Show me each token ONCE and tell me to store it in a secret manager — never log full tokens. API base https://api.maskdb.ai · auth header: Authorization: Bearer <token> 1. Register → admin token. POST /v1/accounts {"owner_email":"<MY_EMAIL>"} The returned token has scopes ["*"] — my root credential. Tell me to save it somewhere safe; it cannot be recovered. 2. Ask me for a READ-ONLY Postgres connection string (recommend a SELECT-only role, not an owner). If it has channel_binding=require, drop that and keep sslmode=require. POST /v1/databases {"name":"prod","connection_string":"<CONN>"} (Bearer admin) → save the db_id. It defaults to allowlist mode (only enabled columns show). 3. Read the raw schema and propose a masking policy. GET /v1/databases/<db_id>/schema (Bearer admin) For each column decide enable + mask: • ids / foreign keys / timestamps / enums / numbers → enable, mask "none" • emails → "email" · phone numbers → "phone" • secrets / tokens / api keys / encrypted_* → "redact" • free-text user content (prompts, messages, bodies, notes) → "null" • unsure if sensitive → mask it, or leave it disabled (it stays hidden) Show me the proposed policy and let me adjust before applying. 4. Apply the policy. PUT /v1/databases/<db_id>/policy (Bearer admin) {"tables":[{"table":"...","columns":[{"name":"...","enabled":true,"mask":"..."}]}]} 5. Mint the read-only agent token (this is what I hand to my agents). POST /v1/tokens (Bearer admin) {"name":"my-agent","scopes":["db:query","db:metadata"],"databases":["<db_id>"]} 6. Verify with the agent token: run a sample POST /v1/databases/<db_id>/query {"table":"...","select":["..."],"limit":3} and confirm sensitive columns come back masked, and that this token can neither change the policy nor reach other databases. Never give an agent token policy:write (it could unmask). Keep the admin token offline. Every query is audited.