Technical preview · v0.1 · Open source · Apache-2.0

ValkDB MCP Server

Connect MCP-compatible agents to PostgreSQL through ValkDB session budgets, without giving agents database credentials.

Open source. Stateless. stdio transport. PostgreSQL only. Read-only in v0.1. Built for technical preview against staging or disposable databases — not for production traffic without operator review.

Claude Desktop / Cursor / Kiro
        ↓  MCP stdio
ValkDB MCP Server
        ↓  HTTPS
ValkDB API
        ↓
PostgreSQL

Technical feedback: feedback@valkdb.dev

v0.1 flow
Agent  →  ValkDB MCP  →  ValkDB API  →  PostgreSQL
Agent Claude Desktop / Cursor / Kiro / any MCP client
ValkDB MCP stdio · injects agent_id, session_id · read-only guard
ValkDB API budgets · audit · circuit breaker · AST firewall
PostgreSQL your database, your credentials, never shared with the agent

What it does

A small, focused bridge between MCP clients and ValkDB's session control engine.

What it does NOT do

Honest scope. ValkDB MCP is a thin, focused layer in v0.1.

Status

Technical preview. Use it on staging, synthetic, or disposable databases first.

Transport
Local stdio MCP (no network listener required on the client side)
Database
PostgreSQL first. Other engines later.
Query mode
Read-only (SELECT) only. Multi-statement payloads rejected.
Budgets
ValkDB session budgets (rows, queries, window) enforced server-side
Audit
Hash-only. Raw SQL not stored. valk_audit tool gated by env var.
Compatibility
Claude Desktop, Cursor, Kiro, any MCP client over stdio
Distribution
npm package @valkdb/mcp-server prepared but not the primary install path yet
Recommended first use
Local test DB · fake data · staging · disposable Postgres

Install / Try locally

The MCP preview is distributed as a downloadable source tarball, with the same source mirrored at github.com/Valkdb-dev/valkdb. npm publication is held back on purpose until v0.1 is signed off by early users.

1. Download and run from the tarball

curl -LO https://valkdb.dev/downloads/valkdb-mcp-server-0.1.0.tar.gz
tar -xzf valkdb-mcp-server-0.1.0.tar.gz
cd valkdb-mcp-server
npm ci
npm run build
node dist/index.js   # smoke check; the process will exit with a clear error
                     # listing the missing env vars below

Verify the download checksum against downloads/valkdb-mcp-server-0.1.0.SHA256 if your environment requires it.

The downloadable preview package is optimized for local evaluation. The public repository includes tests and development assets.

2. Make it available to MCP clients

Either point clients at the absolute path to dist/index.js (recommended for the preview), or link it as a global valkdb-mcp binary:

npm link              # registers ./dist/index.js as `valkdb-mcp` on PATH
which valkdb-mcp      # confirm

3. Required environment

VariableRequiredDescription
VALKDB_API_URLyesBase URL of your ValkDB deployment (e.g. http://localhost:8081 for the local preview)
VALKDB_API_KEYyesBearer token issued by your ValkDB instance
VALKDB_AGENT_IDyesStable identifier for the agent. Used for budget scoping.
VALKDB_DEFAULT_DATABASEnoConnection name or UUID. Defaults to main.
VALKDB_AUDIT_ENABLEDno"true" to expose the valk_audit tool. Defaults to "false".
VALKDB_SESSION_MODEnoOnly per_process in v0.1.

When npx -y @valkdb/mcp-server becomes the official path, the same env vars apply, only the launch command changes.

Configure your MCP client

Each client expects an absolute path to dist/index.js while the package is unpublished.

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "valkdb": {
      "command": "node",
      "args": ["/absolute/path/to/supersonic/valkdb-mcp-server/dist/index.js"],
      "env": {
        "VALKDB_API_URL": "http://localhost:8081",
        "VALKDB_API_KEY": "sk-supersonic-...",
        "VALKDB_AGENT_ID": "claude-desktop-1"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for user-level).

{
  "mcpServers": {
    "valkdb": {
      "command": "node",
      "args": ["/absolute/path/to/supersonic/valkdb-mcp-server/dist/index.js"],
      "env": {
        "VALKDB_API_URL": "http://localhost:8081",
        "VALKDB_API_KEY": "sk-supersonic-...",
        "VALKDB_AGENT_ID": "cursor-1"
      }
    }
  }
}

Kiro

Add to ~/.kiro/settings/mcp.json (user) or .kiro/settings/mcp.json (workspace).

{
  "mcpServers": {
    "valkdb": {
      "command": "node",
      "args": ["/absolute/path/to/supersonic/valkdb-mcp-server/dist/index.js"],
      "env": {
        "VALKDB_API_URL": "http://localhost:8081",
        "VALKDB_API_KEY": "sk-supersonic-...",
        "VALKDB_AGENT_ID": "kiro-1"
      },
      "disabled": false,
      "autoApprove": ["valk_budget", "valk_schema"]
    }
  }
}

Tip: keep valk_query and valk_audit out of autoApprove while you are still validating the setup. Approve them by hand the first few times.

Tools exposed

Four tools. Closed input schemas. Server-side identity injection.

valk_query

Run a single read-only SELECT. Anything else (DML, DDL, multi-statement, EXECUTE, CALL) is rejected before the upstream call.

{ "query": "SELECT id, email FROM users WHERE active = true", "max_rows": 100 }
↓
{ "ok": true, "data": { "rows": [...], "row_count": 2 } }

valk_budget

Inspect remaining session capacity at any time. No input fields.

{} ↓
{ "status": "active",
  "queries": { "used": 3, "limit": 10 },
  "rows":    { "used": 120, "limit": 5000 },
  "window":  { "remaining_seconds": 47 } }

valk_schema

List tables and columns visible to the agent. Sensitive columns are stripped server-side, twice — once upstream, once by the MCP server.

{ "database": "main" } ↓
{ "database": "main",
  "tables": [
    { "name": "users",
      "columns": [
        { "name": "id",     "type": "integer" },
        { "name": "email",  "type": "text"    }
      ] }
  ] }

valk_audit

Recent audit events for the running session. Only registered when VALKDB_AUDIT_ENABLED=true; otherwise the tool returns PERMISSION_DENIED.

{ "limit": 5 } ↓
[ { "ts": "2026-05-25T12:00:00Z", "tool": "valk_query", "decision": "allowed" },
  { "ts": "2026-05-25T12:00:05Z", "tool": "valk_query", "decision": "blocked",
    "reason": "session_query_limit_exceeded" } ]

Security model

The server is the trust boundary between the agent and the database.

Background: 256 unit + property + integration tests pass. 22 adversarial tests (identity spoofing, SQL mutations, multi-statement, leakage, audit gating) pass. The detailed validation report (VALIDATION_REPORT.md) ships with the source tarball.

Known limitations in v0.1

If any of these are blockers for your use case, tell us. They're prioritized by real demand.

Technical preview — not production-ready without operator review

ValkDB MCP v0.1 is built for technical evaluation. Run it against synthetic data, staging, or a disposable Postgres before pointing it at anything real.

If you're a backend, security, or platform engineer evaluating it for a real workload: please talk to us first. The product is honest about what it does and doesn't do — we'd rather have that conversation up front than ship into surprise.

Try it locally and tell us what breaks

We're not selling ValkDB yet. We're looking for technical users to run the MCP locally and tell us whether the problem is real for them.

Technical feedback: feedback@valkdb.dev