
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
Zero-config MCP server for any database — point it at a DATABASE_URL and let coding agents (Claude Code) query it safely, no SQL and no code
Point it at a database URL. Claude talks to your data. No SQL, no code.
A zero-config MCP server for any database
valv supports through Prisma
(PostgreSQL, MySQL, SQLite, SQL Server). Give it a DATABASE_URL and it:
prisma db pull) — no schema.prisma needed,No SQL ever reaches the model, and it can only do what the policy allows.
Add it to your .mcp.json — nothing to install or write:
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "@valv/mcp"],
"env": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" }
}
}
}
That's it. Claude can now discover your tables (list_resources,
describe_resource) and read them (query, get, aggregate) — all
policy-gated, all without writing SQL.
You can also run it directly:
DATABASE_URL="postgresql://…" npx @valv/mcp
# or pass the URL as the first argument
npx @valv/mcp "postgresql://…"
query / get / aggregate are exposed —
never create / update / delete. Writes require a policy file (below).All via environment variables:
| Variable | Description |
|---|---|
DATABASE_URL | Connection string (required; or pass as the first arg). |
VALV_PROVIDER | postgresql | mysql | sqlite | sqlserver | mongodb. Inferred from the URL when omitted. |
VALV_TABLES | Comma-separated allow-list. Only these tables are exposed. |
VALV_EXCLUDE | Comma-separated deny-list, applied after the allow-list. |
VALV_POLICY_FILE | Path to a policy module that takes full control (enables writes — see below). |
VALV_CONTEXT | JSON policy context passed to your policy file. Defaults to {}. |
VALV_HTTP_PORT | Serve over Streamable HTTP on this port instead of stdio. |
For anything beyond read-only, point VALV_POLICY_FILE at a CommonJS module
that receives the configured valv instance and declares
policies. It takes full
control of access (the allow/deny lists are then ignored):
// db-policy.cjs
module.exports = (valv) => {
valv.policy("orders", () => ({ read: true, write: true, delete: false }))
valv.policy("users", () => ({ read: true, write: false, delete: false }))
}
{ "env": {
"DATABASE_URL": "postgresql://…",
"VALV_POLICY_FILE": "./db-policy.cjs"
} }
Use VALV_CONTEXT to feed runtime context (tenant, role, …) your policies read:
"VALV_CONTEXT": "{\"tenant\":{\"id\":\"acme\"}}".
Claude Code ─MCP─▶ @valv/mcp
│ prisma db pull + generate → live schema + typed client
│ @valv/core → policy engine (read-only default)
▼
@valv/prisma → PrismaClient → your database
The generated client lives in a temp directory and is removed on shutdown; your project is never modified. Requires network access to the database and the ability to run the bundled Prisma CLI.
If you'd rather define your adapter and policies yourself and embed an MCP server
in your own app, use @valv/mcp-sdk directly.
MIT
FAQs
Zero-config MCP server for any database — point it at a DATABASE_URL and let coding agents (Claude Code) query it safely, no SQL and no code
The npm package @valv/mcp receives a total of 58 weekly downloads. As such, @valv/mcp popularity was classified as not popular.
We found that @valv/mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.