Connect Cursor to your database.

Use the Cursor CLI already signed in on your machine. Valv starts it through ACP and supplies read-only database tools for the current chat. Database credentials never enter Cursor's prompt.

Book a demo

Already have Valv? Go to the setup steps.

Cursor inside Valv uses ACP. The Cursor editor connects through MCP.

For in-app chat, Valv launches the local Cursor agent and controls the session over Agent Client Protocol. For editor use, Cursor calls Valv's local Model Context Protocol server. These are separate connections.

Use Cursor inside Valv.

Pick Cursor under Providers and ask in Valv's chat. For each turn, Valv starts the detected agent executable in ACP mode. The ACP session receives a bearer-token MCP connection pinned to the current workspace and chat.

Cursor Installed

agent --sandbox disabled acp

Use Valv from the Cursor editor.

Add Valv to Cursor's mcp.json. This connection does not launch Cursor from Valv or use ACP. It follows whichever workspace is active in the open desktop app.

Valv MCP server running on localhost
{
  "mcpServers": {
    "valv-desktop": {
      "type": "http",
      "url": "http://127.0.0.1:4319/mcp"
    }
  }
}

Setup

From an installed Cursor CLI to your first database answer.

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

  1. 1

    Install and sign in to the Cursor CLI.

    Valv launches Cursor's local agent executable and uses its existing login. Check that the command is available first.

    agent --version
    Cursor CLI installation guide
  2. 2

    Pick Cursor in Valv.

    Valv checks Cursor's standard install locations, then your shell's PATH. Pick Cursor during onboarding. If you installed it later, open Settings, choose Providers, and click 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 Cursor. Before the first question, hide any table or column it should not inspect. Then open Ask and try a question tied to your data.

    Which plans had the biggest increase in cancellations this month?

The database tools are read-only.

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

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

Hide data before Cursor 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

Cursor MCP

Query the active Valv workspace from Cursor.

In Valv, open Settings, choose MCP Server, then expand Other MCP clients. Copy the JSON into ~/.cursor/mcp.json for global access or .cursor/mcp.json for one project. Keep Valv open while Cursor uses the tools.

Port 4319 is the default. If it is already in use, Valv chooses another local port, so copy the current JSON from the app.

mcp.json
{
  "mcpServers": {
    "valv-desktop": {
      "type": "http",
      "url": "http://127.0.0.1:4319/mcp"
    }
  }
}

Need more detail? Read the database MCP guide or Cursor's MCP documentation.

Cursor and your database, answered

How do I connect Cursor to a database?

Install and sign in to the Cursor CLI, then open Valv Desktop. Valv detects Cursor's local agent command. Pick Cursor under Providers, add a database, review its AI access, and ask your first question. Valv starts Cursor through ACP and never puts your database credentials in the prompt.

Can I use Valv from the Cursor editor?

Yes. Valv runs a local MCP server while the desktop app is open. In Settings, open MCP Server, expand Other MCP clients, and copy the JSON into Cursor's MCP configuration. Cursor can then query the workspace that is active in Valv.

Can Cursor write to my database through Valv?

No. The database tools Valv gives Cursor are read-only. Cursor 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 Cursor 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 Cursor to work across them.

What database data is sent to Cursor?

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

Do I need a separate API key?

No API key goes into Valv. To use Cursor inside Valv, the Cursor CLI must already be installed and signed in on your machine. Usage follows the Cursor account you use with the local agent.

Put Cursor 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