Allows coding agents to query SQL and NoSQL databases safely using read-only tools and policy-based access control.
다른 이름 valv-dev/valv, mcp, @valv/mcp
- 스타
- 5
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- 0.6.2
- 마지막 커밋
- 2026년 10월 2일
- 라이선스
- MIT
valv MCP란?
valv은(는) MCP server입니다. Allows coding agents to query SQL and NoSQL databases safely using read-only tools and policy-based access control.
프로젝트 README에서 생성된 요약
valv MCP server 정보
Querying live databases through coding agents without exposing raw SQL or risking data modification is what valv enables. Developers can connect this server to PostgreSQL, MySQL, SQLite, CockroachDB, ClickHouse, or MongoDB using a connection string. It functions as a read-only bridge that introspects your schema and provides four specific tools: list_resources, search_resources, describe_resource, and query.
Setup is handled via npx or manual configuration in files like .mcp.json for clients such as Claude Desktop, Claude Code, Cursor, or Codex. You can control access through environment variables like VALV_TABLES to allow-list specific tables or VALV_EXCLUDE to deny-list them. For more granular security, a policy file can hide specific columns or restrict row access based on a provided JSON context. This ensures the model only interacts with the data you explicitly permit while preventing it from ever seeing or executing raw SQL commands.
활용 사례
- 1Secure database schema explorationAsk an AI agent to discover the structure and available tables within a production database.
- 2Restricted data retrievalInstruct an agent to fetch specific records while ensuring sensitive columns remain hidden from the model.
- 3Automated data reportingHave a coding agent transform database query results into interactive HTML charts and reports.
- 4Multi-tenant data isolationUse policy files to ensure an agent only accesses data belonging to a specific tenant or user.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
valv MCP 설치 방법
형식 확인: 2026년 11월 10일Claude Code에 valv MCP 설치
$ claude mcp add --env DATABASE_URL=<YOUR_DATABASE_URL> mcp -- npx -y @valv/mcpCursor에 valv MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@valv/mcp"
],
"env": {
"DATABASE_URL": "<YOUR_DATABASE_URL>"
}
}
}
}VS Code에 valv MCP 설치
.vscode/mcp.json
{
"servers": {
"mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@valv/mcp"
],
"env": {
"DATABASE_URL": "<YOUR_DATABASE_URL>"
}
}
}
}Claude Desktop에 valv MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@valv/mcp"
],
"env": {
"DATABASE_URL": "<YOUR_DATABASE_URL>"
}
}
}
}Codex에 valv MCP 설치
~/.codex/config.toml
[mcp_servers.mcp] command = "npx" args = ["-y", "@valv/mcp"] [mcp_servers.mcp.env] DATABASE_URL = "<YOUR_DATABASE_URL>"
Gemini CLI에 valv MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@valv/mcp"
],
"env": {
"DATABASE_URL": "<YOUR_DATABASE_URL>"
}
}
}
}구성
DATABASE_URL필수비밀Database connection string. PostgreSQL, MySQL, SQLite, CockroachDB, or a ClickHouse HTTP URL.
VALV_CONTEXTJSON context object the policy reads, e.g. {"tenant":{"id":"acme"}}.
VALV_DATABASEDatabase name. Required for ClickHouse, whose URL does not carry one.
VALV_EXCLUDEComma-separated deny-list of tables, applied after the allow-list.
VALV_HTTP_PORTServe over Streamable HTTP on this port instead of stdio.
VALV_POLICY_FILEPath to a policy module that takes full control of access. Without it, the server is read-only across all tables.
VALV_PROVIDERDatasource provider: postgresql, mysql, sqlite, or clickhouse. Inferred from DATABASE_URL when omitted.
VALV_TABLESComma-separated allow-list of tables. When set, only these are exposed to the agent.
| 이름 | 설명 | 유형 |
|---|---|---|
| DATABASE_URL | Database connection string. PostgreSQL, MySQL, SQLite, CockroachDB, or a ClickHouse HTTP URL. | 필수비밀 |
| VALV_CONTEXT | JSON context object the policy reads, e.g. {"tenant":{"id":"acme"}}. | |
| VALV_DATABASE | Database name. Required for ClickHouse, whose URL does not carry one. | |
| VALV_EXCLUDE | Comma-separated deny-list of tables, applied after the allow-list. | |
| VALV_HTTP_PORT | Serve over Streamable HTTP on this port instead of stdio. | |
| VALV_POLICY_FILE | Path to a policy module that takes full control of access. Without it, the server is read-only across all tables. | |
| VALV_PROVIDER | Datasource provider: postgresql, mysql, sqlite, or clickhouse. Inferred from DATABASE_URL when omitted. | |
| VALV_TABLES | Comma-separated allow-list of tables. When set, only these are exposed to the agent. |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능valv-dev/valv is public and reachablegithub.com/valv-dev/valv ↗통과
- 패키지가 이 저장소를 소스로 지정@valv/mcp names valv-dev/valv as sourcenpmjs.com/package/@valv/mcp ↗통과
- 빌드 출처(Sigstore 증명)No build attestation published for this release검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-02github.com/valv-dev/valv ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from @valv/mcp통과
- 패키지와 의존성에 심각한 보안 권고 없음130 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 endpoint가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기@valv/mcp
Point it at a database URL. Your agent queries it safely. No SQL, no code.
A zero-config MCP server built on valv. Give it a connection string and it introspects your live schema, serves four tools (list_resources, search_resources, describe_resource, query) read-only by default, and enforces your policies — no SQL ever reaches the model, and it can only read what you allow.
Works with PostgreSQL, MySQL, SQLite, CockroachDB, ClickHouse, and MongoDB.
Guided setup
The fastest way in — it probes your database, lets you choose access, and writes the config:
npx @valv/mcp init
It takes either a connection string or individual fields (host, port, user, password, database), confirms the dialect, connects and shows your tables, then offers read-only / pick-tables / a policy-file stub. It then merges the server entry into the client of your choice — Claude Code, Claude Desktop, Cursor, or Codex — at project or global scope, leaving any existing config in place. Lastly it offers to install the valv skill, which teaches the agent how to query valv and turn results into interactive chart-report HTML files — as a skill for Claude Code (.claude/skills), Codex (.agents/skills), or Cursor (.cursor/skills), at project or global scope. Finally it can copy a kickstart prompt to your clipboard — paste it into your agent to explore the schema (seeding .valv/notes.md for future queries) and generate a single interactive valv-map.html overview of the database.
Manual setup
Add it to your .mcp.json (or Claude Desktop config):
{
"mcpServers": {
"db": {
"command": "npx",
"args": ["-y", "@valv/mcp"],
"env": { "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb" }
}
}
}
For ClickHouse, use its HTTP URL and a database name:
"env": { "DATABASE_URL": "http://localhost:8123", "VALV_DATABASE": "analytics" }
For MongoDB, use a standard connection string. Set VALV_DATABASE when the
URL does not select a database:
"env": { "DATABASE_URL": "mongodb://localhost:27017", "VALV_DATABASE": "analytics" }
Configuration
All via environment variables:
| Variable | Description |
|---|---|
DATABASE_URL |
Connection string (required; or pass as the first CLI arg). |
VALV_PROVIDER |
postgresql | mysql | sqlite | mongodb | clickhouse. Inferred from the URL when omitted. |
VALV_DATABASE |
Database name for ClickHouse or MongoDB. |
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 (below) for tenant scoping / hidden fields. |
VALV_CONTEXT |
JSON context the policy reads (e.g. {"tenant":{"id":"acme"}}). |
VALV_HTTP_PORT |
Serve over Streamable HTTP on this port instead of stdio. |
Policy file
Without one, access is read-only across all tables. To restrict what the agent can see — which tables, which columns — point VALV_POLICY_FILE at a module that receives the configured valv instance:
// valv.policy.cjs
module.exports = (valv) => {
valv.policy("orders", () => ({
read: true, // allow reads (or { column: value } to filter rows)
fields: { deny: ["internal_notes"] }, // hide columns from the agent
}))
// Tables without a policy are denied (deny-all).
}
Need per-request row scoping by tenant/user? That belongs in the app-controlled path, where your code supplies real identity per request — use @valv/mcp-sdk (or pass a fixed VALV_CONTEXT and read it in the policy here).
License
MIT
valv MCP 질문
valv MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add --env DATABASE_URL=<YOUR_DATABASE_URL> mcp -- npx -y @valv/mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
valv MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
Which databases are supported?
The server works with PostgreSQL, MySQL, SQLite, CockroachDB, ClickHouse, and MongoDB.
Is the database access read-only?
Yes, the server provides tools that are read-only by default to ensure safety.
How can I restrict which tables or columns an agent can see?
You can use a policy file to define specific access rules, such as allowing reads on certain tables or denying specific columns.
Can I use this with MongoDB?
Yes, you can use a standard connection string for MongoDB and set the VALV_DATABASE variable if the URL does not select a database.