Connect Claude Code to your database.

Use the Claude Code CLI already signed in on your machine. Valv detects it, gives it read-only tools for your database, and shows every query and result in a desktop client.

Book a demo

Already have Valv? Go to the setup steps.

Work in Valv, or stay in your terminal.

Valv can run Claude Code inside the app, with tables, charts, files, and the current selection beside the chat. It can also expose the active workspace to Claude Code over a local MCP server.

Use Claude Code inside Valv.

Pick Claude Code during setup and ask in Valv's chat. The app starts the local CLI with your chosen model and gives it the current workspace's database tools for that turn.

Claude Code Installed

Existing Claude login · no API key in Valv

Use Valv from Claude Code.

Add Valv as an MCP server once. Claude Code in your terminal can then inspect and query whichever workspace is active in the open desktop app.

Valv MCP server running on localhost
claude mcp add --transport http \
  valv-desktop http://127.0.0.1:4319/mcp

Setup

From an installed CLI to your first database answer.

You connect Claude Code to Valv, not directly to a database password. The whole setup takes place on your machine.

  1. 1

    Install and sign in to Claude Code.

    Valv uses the local claude command and its existing login. Check that it is available before opening Valv.

    claude --version
    Claude Code installation guide
  2. 2

    Pick Claude Code in Valv.

    Valv scans the same shell environment you use in a terminal. Pick Claude Code during onboarding. If you installed it afterwards, open Settings, Providers, then select Re-scan.

  3. 3

    Add your database.

    Paste a PostgreSQL, MySQL, or ClickHouse connection string, try the experimental MongoDB support, or choose a local SQLite file. You can test the connection before saving. Valv stores the password with your OS keychain.

    postgres://user:password@host:5432/database
  4. 4

    Review AI access, then ask.

    Valv makes the schemas you selected available to Claude. Before the first question, hide any table or column it should not inspect. Then open Ask and try a question tied to a real decision.

    Which plans had the biggest increase in cancellations this month?

The database tools are read-only.

Claude can discover the allowed schema and compose structured queries. Valv validates each query before it reaches the database. Claude does not receive tools to insert, update, delete, or run raw SQL.

query Allowed
insert · update · delete · raw SQL Not exposed

Hide data before Claude discovers it.

AI access is separate from your own access in Valv. Hide a whole table or individual columns such as email and card number. You can still open that data yourself in the read-only table viewer.

AI access

orders Visible
subscriptions Visible
customers.email Hidden
payments.card_number Hidden

Claude Code MCP

Query the active Valv workspace from your terminal.

Open Settings, MCP Server, and copy the command Valv shows for Claude Code. Keep the app open. The MCP server binds to localhost and follows the workspace currently selected in Valv.

Port 4319 is the default. If it is already in use, Valv chooses another local port, so use the command shown in the app.

For scopes, .mcp.json, and other servers, see the Claude Code MCP guide.

Terminal
$ claude mcp add --transport http \
  valv-desktop http://127.0.0.1:4319/mcp

$ claude
> Which customer segments grew fastest this quarter?

Need setup details for other clients? Read the database MCP guide.

Claude Code and your database, answered

How do I connect Claude Code to a database?

Install and sign in to Claude Code, then open Valv Desktop. Valv detects the Claude CLI on your machine. Pick Claude Code as your agent, add a database, review its AI access, and ask your first question. You do not need to paste database credentials into Claude.

Can I use Valv from Claude Code in my terminal?

Yes. Valv runs a local MCP server while the desktop app is open. Copy the Claude Code command from Settings, MCP Server, and run it once in your terminal. Claude Code can then query the workspace that is active in Valv.

Can Claude Code write to my database?

No. The database tools Valv gives Claude Code are read-only. Claude can inspect the allowed schema and run structured queries, but it does not receive database write tools. Valv's own table viewer is read-only too, so nothing in Valv writes to your database.

Which databases work with Claude Code through Valv?

PostgreSQL, MySQL and MariaDB, SQLite, and ClickHouse are supported. MongoDB support is experimental. You can connect more than one database to the same workspace and ask Claude Code to work across them.

What data is sent to Claude?

Valv keeps database credentials in your OS keychain and never sends them to Claude. Valv queries the database directly on your machine. The schema and query results Claude needs are processed through your existing Claude Code account, under your Anthropic account settings and terms.

Do I need an Anthropic API key?

No API key goes into Valv. Claude Code must already be installed and signed in on your machine. Its usage follows the Anthropic account and plan you use with the Claude CLI.

Put Claude Code to work on your data.

Free for personal use, every feature included. Commercial use needs a seat at beta pricing. See pricing.

All downloads Other platforms and builds