Claude Code
Claude Code can work on your VAIF Studio project through the MCP server: read and write rows, create tables, manage storage, and deploy and invoke functions.
One-command setup
Section titled “One-command setup”Install the CLI, sign in, and run the setup in your app’s folder:
npm install -g @vaifstudio/clivaif loginvaif claude-setupvaif claude-setup writes two files in the current folder:
.mcp.jsonstartsnpx @vaifstudio/mcpfor your project. It holds no credentials: the API key is read fromVAIF_API_KEYin the environment Claude Code starts in, and the MCP server reads yourvaif loginsign-in from~/.vaif/auth.jsonon every call.CLAUDE.mdgives Claude Code your tables and columns, with SDK and REST examples that use your table names and read the key fromprocess.env.VAIF_API_KEY.
| Option | Meaning | Default |
|---|---|---|
-p, --project-id <id> |
The project | From vaif.config.json, VAIF_PROJECT_ID or your sign-in |
--skip-mcp |
Don’t write .mcp.json |
|
--skip-claude-md |
Don’t write CLAUDE.md |
|
-o, --output-dir <dir> |
Where to write the files | . |
An API key on the command line is refused, because other programs and your shell history could read it. Set VAIF_API_KEY in your shell instead. Run the setup again after schema changes, so CLAUDE.md lists the current tables. vaif init --claude writes a CLAUDE.md while it scaffolds a new app.
Set it up by hand
Section titled “Set it up by hand”Register the server from a terminal, with VAIF_API_KEY and VAIF_PROJECT_ID set in your environment:
claude mcp add vaif-studio -- npx @vaifstudio/mcp| Variable | Needed for | Where it comes from |
|---|---|---|
VAIF_PROJECT_ID |
Everything | Your project ID, from the console or vaif.config.json |
VAIF_API_KEY |
The row tools (query_rows, insert_row and the rest) and signed file links |
A project API key, from the project’s Overview or Project settings > API keys. get_signed_url needs a key with the storage scope |
VAIF_AUTH_TOKEN |
Schema, SQL, storage, functions and key tools | Optional. Without it, the server uses the sign-in that vaif login saved in ~/.vaif/auth.json, read again on every call |
VAIF_API_URL |
A local or self-hosted API only | Defaults to https://api.vaif.studio |
Keep API keys out of files you commit.
What it can do
Section titled “What it can do”The server has 27 tools, each with a title and safety labels, so Claude Code can tell a read from a change. See MCP server for what each one can change and how execute_sql stays read-only. Requests like these work:
- “Create a posts table with title, body and user_id columns”
- “Create a send_notification function and deploy it”
- “Enable realtime on the posts table”
- “Create a private avatars bucket”
Review what it changes, as you would a teammate’s change.