Open-source database CLI that doubles as an MCP server for agents
MCP server lets Claude Code query databases when existing tools don't integrate.
DML preview mode rolls back transactions so you see changes before approving them.
Developers building AI agents that need database access
LangChain SQL Agent · SQLAgent · MCP Registry
I created an MCP server aimed at giving LLM agents safe access to a database. It's part of the broader Polymr platform (https://polymr-platform.github.io/).
I generally allow the LLM to perform selects as it wishes to establish context, but once it comes down to modifying data, especially in a sensitive environment, I want to retain absolute control and understanding of what it's trying to do.
That's why I built mcp-sql.
Some of the features:
- DML Previews: Queries can be run in preview mode where the server executes the transaction and immediately rolls it back. This lets you see exactly what will happen if you allow the change.
- Dynamic Permission Prompts: The server dynamically introspects SQL to determine required permissions. If an agent tries to execute a query it doesn't have auto-approval for, it prompts the user. You retain full control over the agent's autonomy level.
- Environment Routing: You can use policies to dynamically switch the connection a query is run on, allowing you to easily switch between environments.
I'd love feedback, especially from people using MCP servers with production databases.
MCP server lets Claude Code query databases when existing tools don't integrate.
Turkish collation awareness and NOLOCK support show real production thinking.
Git for agent memory beats Letta's file-level versioning with zero-copy branching.
The idea of inserting a deterministic 'gate' between proposed tool calls and execution is smart and practical: precomputed classification plus an agent-unreachable vault means destructive operations become reversible by default. The README calls out clear mechanics (envelope checks, vault backup, tiered responses and structured denials) which suggests this is more than a thought experiment — it's a focused infra piece for teams that actually let agents touch production.
Yet another AI-codebase-chat tool when Cursor and Cody already dominate.
Beam over DuckDB unites type safety with OLAP, but only solves Haskell teams' analytics problem.