A coding agent (Claude Code, Cursor or another) can set VaultKit up for you. It installs vkit, connects your database, installs and deploys policies, and configures VaultKit’s MCP server so it can query your data through VaultKit. It never sees your database password or the agent token.
The easiest way to start is from your VaultKit console (control plane 0.14.0-alpha or later):
The prompt names your control plane, so the agent connects to the right one even if vkit was used with another control plane before:
Set up VaultKit for this project by following https://docs.vaultkit.io/setup.md. Control plane: https://vaultkit.example.com
The card shows until your organization has a datasource and an active policy bundle. After that, Overview has a smaller Set up again with your agent link that opens the same card. Members don’t see either.
Paste this into your agent, in the project you want it to query from:
Set up VaultKit for this project by following https://docs.vaultkit.io/setup.md
The agent asks for your control plane URL, or, if vkit already has one saved, checks with you that it’s the right one before it connects. You can also add Control plane: <URL> to the end of the prompt yourself. The URL is usually the address you open the VaultKit console at.
setup.md is written for the agent: a checklist, the exact commands, what their --format json output looks like, and what to do for each error. It’s served as plain markdown so an agent can read it as it is.
vkit (2.0.0 or later), and Python 3.10 or later for the MCP server. The agent checks both and asks before installing anything.The agent does the setup. A few steps are yours, and it stops and asks at each one:
vkit login --setup and shows you a code and a link. Open the link signed in as an admin, check that the code matches, and approve it.
vkit datasource add … --password-prompt command for you to run in your own terminal. The password goes from your keyboard to VaultKit.starter is always installed. The agent explains ai_safety and financial_compliance, and you decide.export lines (VAULTKIT_TOKEN, VAULTKIT_BASE_URL, VAULTKIT_ORG) to put in your shell profile or secret manager.
.env file in the repository, never paste it into the agent’s chat, and never put it in VKIT_TOKEN: the vkit CLI reads that, so vkit itself would act as the agent.vkit agents tokens create in your own terminal instead, sign out with vkit logout, and approve a second setup session. The agent walks you through it.Setup is done when vkit doctor reports no failures. Two things are normal to see:
The agent finishes by telling you what it set up and running one safe query, such as a count grouped by a column that isn’t sensitive.
You end up with:
vaultkit-policies by default) in git, with the reviewed datasets/registry.yaml;.mcp.json for Claude Code, .cursor/mcp.json for Cursor). It refers to the three environment variables and holds no secrets.setup_scope_forbidden. Either the step needs an admin signed in normally, or your organization was already set up and the session wasn’t allowed to replace it. The agent tells you which one, and what you can do.vkit doctor first and continues from the first step that isn’t done.See also: CLI reference, MCP Usage Guide, Schema Discovery, Policy Packs.