Is it safe to give an AI Agent access to your production database? Tiger Data, the company behind Tiger MCP and Tiger CLI, warns that giving an AI agent unrestricted access to a production database is unsafe, citing that client-side restrictions are 'security theater' and that enforcement must occur at the database layer via read-only access, scoped queries, and role-based controls. The warning follows a review of 36 popular MCP servers that found roughly a third scored a D or an F on usability and security testing, highlighting significant implementation quality variance across the MCP ecosystem. The direct answer No, giving an AI agent unrestricted access to a production database is not safe. Your AI agent has full production database access. Is it compromised yet, or just waiting to be? Most teams solve this with client-side restrictions: "We'll limit what the agent can request." But that's security theater. A determined or accidentally malicious agent bypasses it in minutes. The real answer is harder to implement but actually works: enforce access at the database layer. Read-only access. Scoped queries. Role-based controls. But only when the database itself enforces them; not your client. This article explores what that distinction means in practice. We use Tiger MCP and Tiger CLI as examples full disclosure, we built these tools , but the architecture applies across any database or MCP server, whether or not you ever touch a Tiger Cloud service. Nothing below should be read as a claim that any specific setup is fully secure or satisfies a particular compliance framework. What follows describes what specific controls do and where they're enforced, which is a more useful question than "is this safe" answered as a yes or no. Why this question is suddenly everywhere Until recently, connecting an AI coding agent to your stack meant giving it access to source code. Worst case, it wrote a bad function or introduced a bug that showed up in code review before it shipped. Now, through MCP servers, agents connect directly to live databases: reading production tables, running exploratory queries, sometimes writing back. The blast radius changed shape. A bad edit to a file gets caught in a pull request. A bad query against a production table can run immediately, against real data, with no review step unless someone built one in. As we see these shifts in AI coding agents, the developer conversation has shifted with it. A year ago, the dominant question was whether you could trust an agent's judgment: would it write reasonable code? Would it follow instructions correctly? Now there's a second, separate question layered on top: can you trust the MCP server itself, independent of how well-behaved the agent connecting to it happens to be? Those are two different failure modes. One is about agent behavior, and the other is about whether the tool sitting between the agent and your database enforces what it claims to enforce. That second question is harder to answer than it should be right now. A separate review that graded MCP servers on usability found that roughly a third scored a D or an F https://dev.to/tengbyte/i-lint-scanned-36-popular-mcp-servers-a-third-of-them-are-failing-your-agent-102d , meaning that a large share of MCP servers fail basic security testing when they run in isolated environments. Neither finding is about any single vendor, but together these findings say something simpler and more useful: implementation quality varies a lot across the current MCP ecosystem. "Is MCP safe" isn't a yes-or-no question, it rather depends on what a specific server's controls actually enforce, and where. Tiger Data's own engineers have talked through why that's true in general https://www.tigerdata.com/blog/three-tigerdata-engineers-told-us-the-truth-about-mcp-security-is-its-achilles-heel , separately from any single product's answer to it. The general consensus is that widespread adoption of MCP servers is inevitable, but there are still security concerns and implementation gaps to address. The real risk isn't the agent: it's unscoped access Most incident writeups involving an AI agent and a database don't describe a rogue or malicious agent. They describe an agent that was handed too much access in the first place, and eventually did something with it that nobody wanted. The pattern repeats because it's the path of least resistance. Someone connects an agent to a database for the first time, hits an authentication prompt, and reaches for whatever credentials are already sitting in an environment variable or a password manager entry. Often that's an admin account, or the same connection string the application itself uses. It works immediately. Nobody scopes it down later, because there's no obvious moment where that becomes urgent, until there is. Prompt injection happens when an agent reads untrusted text as part of its normal work: a support ticket, a value stored in a table, the contents of a webpage it fetched. That text contains instructions the agent wasn't supposed to follow, and the agent can't reliably distinguish "instructions from the person who set me up" from "text that happens to look like instructions." Unscoped access makes this worse: once injected, the agent runs queries against the whole database with broad permissions, far beyond what the injection would otherwise reach. The damage scales with the access you gave it. The subtlety here goes further than a suspicious sentence sitting in a support ticket. You can watch the whole session scroll by and see nothing unusual, because there's nothing for a human eye to see. It's a concrete example of why "I'll just watch what it does" or “human-in-the-loop” isn't a complete safeguard by itself. Manual review is the safeguard most teams reach for by default, and it has a real, measurable failure rate. A study of roughly 40,000 runs of a review exercise where humans were asked to approve or reject AI agent actions found that reviewers missed about one in three risky actions they were supposed to catch. https://www.theregister.com/ai-and-ml/2026/08/06/humans-in-the-loop-miss-a-third-of-dangerous-ai-coding-agent-requests/5284236 Human review helps. It is not sufficient on its own, and treating it as the primary safety net for a database-connected agent means building on a foundation already measured to fail a third of the time. Structural, database-level controls that don't depend on a human noticing something in the moment matter more. Safety requires a framework None of what follows is specific to Tiger Data. It applies to any developer connecting any AI agent to any database, on any vendor's infrastructure. Think of the six practices below as general AI agent guardrails: not a single switch, but a set of independent controls that hold even if one of them fails. 1. Never hand an agent the same raw admin or superuser credentials a human or the application already uses: This is the single most common mistake, and it's the one that turns every other risk in this article from contained to unbounded. If the agent's connection is compromised, tricked, or simply makes a mistake, the ceiling on what it can do should not be "everything." 2. Create a dedicated, purpose-scoped role for the agent: Least privilege means a role that can do exactly what the agent's task requires and nothing else, not "whatever's easiest to set up today." Scoping access to specific schemas, tables, and operations only takes a few extra minutes the first time and removes an entire category of risk permanently. 3. Default to read-only for anything exploratory: If the agent's job is answering questions, debugging, or analyzing data, it doesn't need write access to do that job. Treat write access as something you escalate to deliberately, for a specific reason, rather than something that's granted by default because it might be useful someday. 4. Use a fork or a read replica for anything destructive or experimental: Testing a migration, trying a risky query, or letting an agent iterate on a schema change is a different job than answering questions about production data. Point that work at a disposable copy, not the system you can't afford to lose. 5. Keep a human in the loop for anything that writes or changes schema : AI-generated reviews catch some mistakes, but not all. The 40,000-run study above https://www.theregister.com/ai-and-ml/2026/08/06/humans-in-the-loop-miss-a-third-of-dangerous-ai-coding-agent-requests/5284236 is a reasonable data point to keep in mind when deciding how much weight to put on it. As a best practice, introduce a human into the review cycle when the project involves using AI to write or change schema. 6. Log what the agent actually ran: Visibility after the fact won't prevent an incident, but it's the difference between knowing exactly what happened and reconstructing it from memory. The common thread running through all six of these: enforcement matters more than intent. Any client-side setting, whether a toggle, a configuration, or a restriction, only works if the agent follows it. Database-level enforcement is different: it applies no matter how the agent connects, which client it uses, or what it's trying to do. You don't have to trust the agent; the database enforces the restriction. How we implement safeguards with Tiger MCP and Tiger CLI Tiger MCP and Tiger CLI are an active implementation of the framework above. Here's what each layer does, and specifically where it's enforced. Read-only mode is a client-side switch with a server-side backstop. Turning it on, with tiger config set read only true , or TIGER READ ONLY=true for a single session, disables mutating CLI commands: service create , fork , start , stop , resize , update-password , and delete all return an error. The matching Tiger MCP tools for those actions aren't just blocked, they aren't registered at all, so an agent can't see them or call them in the first place. That’s the client-side half that answers the "what if the client doesn't cooperate" problem. Database sessions opened through Tiger MCP or Tiger CLI, whether via the db execute query tool, tiger db connect , or tiger db connection-string , run inside Tiger Cloud's immutable read-only mode at the server level. Writes and schema changes are rejected by the database itself, instead of relying on client-side restrictions alone. That's a meaningfully different restriction than a tool simply choosing not to offer a mutating action. The tool not offering an action means the tool has to keep behaving correctly. The database rejecting the write means it doesn't matter whether the tool behaves correctly, because the write will never land, regardless of how it was attempted. A dedicated read-only database role is a second, independent layer. Tiger Cloud's default tsdbadmin role has full read and write permissions it's not a superuser, but it can modify data . For agent access, you create a separate Postgres role scoped to read-only access https://www.tigerdata.com/docs/deploy/tiger-cloud/tiger-cloud-aws/security/read-only-role create-a-read-only-user , save its credentials with tiger db save-password