Connect any MCP client to your database.
Valv Desktop starts a local MCP server when the app opens. Your agent can discover and query the databases in the active workspace, while database credentials stay out of its config and prompt.
Already have Valv? Copy the setup for your client.
One local endpoint follows the workspace on screen.
Valv binds a Streamable HTTP server to loopback at app startup. External clients use the workspace currently selected in Valv, so switching workspaces changes which databases and tools they receive.
The server starts with Valv.
Port 4319 is preferred. If another process already uses it, Valv asks the operating system for a free port. Copy the current URL from Settings instead of assuming the default.
Settings / MCP Server / MCP server URL
External clients follow the active workspace.
The URL stays the same when you switch workspaces. The tools do not. Valv resolves each external request against the workspace active at that moment. With no active workspace, it returns an error.
Active workspace
Copy the command Valv shows for your client.
Open Settings, choose MCP Server, then expand the matching setup guide. These examples use the default port. If Valv shows a different URL, copy that value instead.
Claude Code
CLIclaude mcp add --transport http valv-desktop http://127.0.0.1:4319/mcp Codex
CLIcodex mcp add valv-desktop --url http://127.0.0.1:4319/mcp GitHub Copilot
CLIcopilot mcp add --transport http valv-desktop http://127.0.0.1:4319/mcp Cursor, VS Code, and other clients
JSON{
"mcpServers": {
"valv-desktop": {
"type": "http",
"url": "http://127.0.0.1:4319/mcp"
}
}
} Database access is read-only.
MCP clients get schema discovery and structured query tools. Valv validates the query before it reaches the database. It does not expose database tools for raw SQL, inserts, updates, or deletes.
Review AI access before you connect a client.
New datasources start with their selected schemas visible to AI tools. Hide columns in AI access, or hide every column to remove a table. Valv then filters both discovery and query results for every client.
AI access
The desktop endpoint accepts local requests only.
Valv listens on 127.0.0.1. It rejects requests whose Host is not
loopback and browser requests whose Origin is not loopback. That
blocks remote connections and DNS rebinding through a web page.
External clients do not use a bearer token. Any process running on your machine can call the endpoint while Valv is open, so review AI access before connecting a production database.
Need a standalone server instead of the desktop app?
@valv/mcp points directly at one database. It runs over stdio by
default and exposes four read tools across all tables. Its guided setup
can limit tables or create a policy file for column and row rules.
This package is separate from Valv Desktop. It does not follow the
active workspace or inherit AI access choices from the app. HTTP mode
is available through VALV_HTTP_PORT for deployments you secure.
$ npx @valv/mcp init
Choose access
Read-only across all tables
Pick tables
Create a policy file Database MCP, answered
What is a database MCP server?
A database MCP server gives an agent tools for schema discovery and queries. Valv Desktop runs one over local HTTP, so Claude Code, Codex, Cursor, Copilot, or another MCP client can query the databases in your active workspace without receiving their connection strings.
How do I expose my database through Valv Desktop?
Add the database to a Valv workspace and review AI access. The MCP server starts automatically with the app. Open Settings, choose MCP Server, then copy the guide for your client. Keep Valv open while the client uses the tools.
Which MCP clients can connect?
Any client that supports Streamable HTTP MCP can use the local endpoint. Valv shows exact commands for Claude Code, Codex, and GitHub Copilot, plus JSON for Cursor, VS Code, and other clients.
Can an MCP client write to my database through Valv?
No. Valv Desktop exposes database discovery and structured query tools, not insert, update, delete, or raw SQL tools. Manual changes in Valv's table and SQL views are separate from the MCP client.
What can an MCP client see by default?
A new datasource starts with its selected schemas and columns available to AI tools. Use the AI access screen to hide individual columns or every column in a table. Hidden data is removed from discovery and queries for both in-app agents and external MCP clients.
Can I run a database MCP server without Valv Desktop?
@valv/mcp is a separate package that runs over stdio by default and exposes four read tools. It starts read-only across all tables, so use its table filters or a policy file when you need narrower access. It does not inherit Valv Desktop's workspaces or AI access settings.
Connect your agent to your database.
Free for personal use, every feature included. Commercial use needs a seat at beta pricing. See pricing.