QueryMoat Guides
AI agents and your database
How to give Claude Code, Cursor, Copilot and Windsurf the context they need from your database, without giving them the power to break it.
- Security
- PostgreSQL
- Claude Code
- SQLite
- MCP
Featured · SecurityAn AI agent deleted the database. Here's how to make sure it can't delete yoursReplit's agent and a Claude-powered Cursor agent both deleted production databases. Here's why, and seven layers that stop an AI deleting yours.Read the guide →
PostgreSQLHow to create a read-only user in PostgreSQLCreate a read-only PostgreSQL user that can read every table, including new ones: default privileges, pg_read_all_data, testing, MySQL and SQL Server.
Claude CodeHow to connect Claude Code to your database (safely)Give Claude Code your real schema and data with one command, keep it read-only, and approve any change it proposes. PostgreSQL, MySQL, SQLite, SQL Server.
SQLiteHow to view a SQLite database in VS CodeOpen a .sqlite or .db file in VS Code: a free data grid and SQL editor, the sqlite3 command line, or your AI agent. Plus a fix for missing rows.
MCPPostgreSQL MCP server: connect Cursor, Copilot, Claude and Windsurf to PostgresWhat a PostgreSQL MCP server does, what to check before you trust one, and copy-paste setup for Cursor, Copilot, Claude Code and Windsurf.