Skip to content
VS Code

valv for VS Code

sh.valv/mcp

Let coding agents query any SQL database safely. Read-only by default and scoped by your policies.

client:VS Code transport:stdio runtime:npm

Install valv in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "database-url",
      "description": "DATABASE_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "valv-provider",
      "description": "VALV_PROVIDER",
      "password": true
    },
    {
      "type": "promptString",
      "id": "valv-database",
      "description": "VALV_DATABASE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "valv-tables",
      "description": "VALV_TABLES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "valv-exclude",
      "description": "VALV_EXCLUDE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "valv-policy-file",
      "description": "VALV_POLICY_FILE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "valv-context",
      "description": "VALV_CONTEXT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "valv-http-port",
      "description": "VALV_HTTP_PORT",
      "password": true
    }
  ],
  "servers": {
    "mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@valv/mcp"
      ],
      "env": {
        "DATABASE_URL": "${input:database-url}",
        "VALV_PROVIDER": "${input:valv-provider}",
        "VALV_DATABASE": "${input:valv-database}",
        "VALV_TABLES": "${input:valv-tables}",
        "VALV_EXCLUDE": "${input:valv-exclude}",
        "VALV_POLICY_FILE": "${input:valv-policy-file}",
        "VALV_CONTEXT": "${input:valv-context}",
        "VALV_HTTP_PORT": "${input:valv-http-port}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

valv in other clients