A database as an MCP server
Connect PostgreSQL, MySQL, MariaDB or SQL Server and each table becomes read-only tools your AI can query.
Connect your database
In the console, choose New server → Database, then paste a connection string or enter the host and login. Bridge gives you a ready-to-copy read-only login to create first. From a terminal, the connection string comes from stdin, not the command line:
printf %s "$DATABASE_URL" | npx @kaiva/bridge push shop-db --postgres --secret-stdin --read-only
What your AI gets
Every tool reads. Nothing your AI calls can change data.
Certificates
A database with a self-signed certificate can be checked against your provider's CA, or connected without checking (the connection is still encrypted). From the CLI: --ca-file <provider-ca.pem> or --no-verify-tls.
Postgres on your machine, no account
For Postgres used only from Claude Code, Cursor or Claude Desktop on your own machine, Kaiva Postgres MCP is a free, open-source MCP server that runs locally and only reads. It replaces the archived @modelcontextprotocol/server-postgres: change the package name and nothing else changes. Guide: kaiv.ai/bridge/guides/postgres-mcp-server.
claude mcp add postgres -- npx -y @kaiva/postgres-mcp postgresql://localhost/mydb