Back to browse
GitHub Repository
0 starsJava

Safe database access for AI agents

by its-a-new-world·Jun 17, 2026·1 point·0 comments

AI Analysis

●●SolidBig BrainShip It

DML preview mode rolls back transactions so you see changes before approving them.

Strengths
  • Preview mode executes then rolls back transactions, showing exact changes before approval.
  • Dynamic SQL introspection determines required permissions and prompts users accordingly.
  • SSH tunneling support enables secure connections to production databases.
Weaknesses
  • Zero stars and 7 commits indicates very early stage with limited real-world testing.
  • MCP server ecosystem is emerging but still lacks standardization and adoption.
Category
Target Audience

Developers building AI agents that need database access

Similar To

LangChain SQL Agent · SQLAgent · MCP Registry

Post Description

Hey HN,

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.

Similar Projects

AI/ML●●Solid

CoreMCP – MCP Server for On-Prem DBs

Turkish collation awareness and NOLOCK support show real production thinking.

Ship ItNiche Gem
y11t0
411d ago
Security●●Solid

Agent Gate – Execution authority for AI agents, vault-backed rollback

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.

Big BrainNiche Gem
hammer32
114mo ago