Let coding agents query any SQL database safely. Read-only by default and scoped by your policies.
Connect Runs on your machine
claude mcp add mcp -e DATABASE_URL=<DATABASE_URL> -e VALV_PROVIDER=<VALV_PROVIDER> -e VALV_DATABASE=<VALV_DATABASE> -e VALV_TABLES=<VALV_TABLES> -e VALV_EXCLUDE=<VALV_EXCLUDE> -e VALV_POLICY_FILE=<VALV_POLICY_FILE> -e VALV_CONTEXT=<VALV_CONTEXT> -e VALV_HTTP_PORT=<VALV_HTTP_PORT> -- npx -y @valv/[email protected]
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@valv/[email protected]"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>",
"VALV_PROVIDER": "<VALV_PROVIDER>",
"VALV_DATABASE": "<VALV_DATABASE>",
"VALV_TABLES": "<VALV_TABLES>",
"VALV_EXCLUDE": "<VALV_EXCLUDE>",
"VALV_POLICY_FILE": "<VALV_POLICY_FILE>",
"VALV_CONTEXT": "<VALV_CONTEXT>",
"VALV_HTTP_PORT": "<VALV_HTTP_PORT>"
}
}
}
}
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@valv/[email protected]"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>",
"VALV_PROVIDER": "<VALV_PROVIDER>",
"VALV_DATABASE": "<VALV_DATABASE>",
"VALV_TABLES": "<VALV_TABLES>",
"VALV_EXCLUDE": "<VALV_EXCLUDE>",
"VALV_POLICY_FILE": "<VALV_POLICY_FILE>",
"VALV_CONTEXT": "<VALV_CONTEXT>",
"VALV_HTTP_PORT": "<VALV_HTTP_PORT>"
}
}
}
}
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@valv/[email protected]"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>",
"VALV_PROVIDER": "<VALV_PROVIDER>",
"VALV_DATABASE": "<VALV_DATABASE>",
"VALV_TABLES": "<VALV_TABLES>",
"VALV_EXCLUDE": "<VALV_EXCLUDE>",
"VALV_POLICY_FILE": "<VALV_POLICY_FILE>",
"VALV_CONTEXT": "<VALV_CONTEXT>",
"VALV_HTTP_PORT": "<VALV_HTTP_PORT>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
DATABASE_URLRequired, secret | Database connection string. PostgreSQL, MySQL, SQLite, CockroachDB, or a ClickHouse HTTP URL. |
VALV_PROVIDEROptional | Datasource provider: postgresql, mysql, sqlite, or clickhouse. Inferred from DATABASE_URL when omitted. |
VALV_DATABASEOptional | Database name. Required for ClickHouse, whose URL does not carry one. |
VALV_TABLESOptional | Comma-separated allow-list of tables. When set, only these are exposed to the agent. |
VALV_EXCLUDEOptional | Comma-separated deny-list of tables, applied after the allow-list. |
VALV_POLICY_FILEOptional | Path to a policy module that takes full control of access. Without it, the server is read-only across all tables. |
VALV_CONTEXTOptional | JSON context object the policy reads, e.g. {"tenant":{"id":"acme"}}. |
VALV_HTTP_PORTOptional | Serve over Streamable HTTP on this port instead of stdio. |
Details
| Package | @valv/[email protected] (NPM, stdio) |
| First published | 28 Jul 2026 |
| Last updated | 28 Jul 2026 |
| Registry name | sh.valv/mcp |
More databases servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
