{
  "id": 18215948,
  "title": "LogCarverGuard, an MCP proxy between an AI agent and SQL Server",
  "url": "https://urgent.news/2026/11/05/logcarverguard-an-mcp-proxy-between-an-ai-agent-and-sql-server",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-05T00:48:10.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/caiderek/logcarverguard-an-mcp-proxy-between-an-ai-agent-and-sql-server-143n"
  },
  "original_language": "en",
  "account": "LogCarverGuard is a proxy that acts as a barrier between an AI coding agent, such as Claude Code or Cursor, and a SQL Server database. This free software, version 0.1, restricts the actions the agent can perform on the database. The proxy communicates with the AI agent using the Managed Connection Protocol (MCP) and an API key, which maps to a specific SQL login. The proxy impersonates the SQL login for each request, allowing the already set permissions to apply. The proxy does not add any extra permissions; it only restricts certain actions.\n\nThe software uses Microsoft's ScriptDom T-SQL parser to examine parsed statements, ignoring text within comments or string literals. Certain statements are always blocked, such as DROP TABLE, DROP DATABASE, RESTORE DATABASE, and RESTORE LOG. Additionally, statements like ALTER DATABASE ... SET, sp_executesql, and xp_cmdshell are restricted. The proxy blocks any attempt to revert to the service account (REVERT) or execute statements like GRANT, DENY, REVOKE, and BEGIN TRAN, COMMIT, ROLLBACK, or SAVE TRANSACTION.\n\nIn local mode, the AI tool runs on the user's machine, and every statement is blocked unless the environment variable LOGCARVERGUARD_READ_ONLY is set. The audit log records who, when, the SQL statement, and whether it was executed or blocked. The audit log is stored in a local SQLite file and has no tamper protection. Testing of LogCarverGuard included 200 test cases across five projects, all of which passed on November 5, 2026.",
  "summary": "I am a SQL Server DBA and I also write C# and .NET. Many people now let an AI coding agent like Claude Code or Cursor run SQL on a real database. I wanted something between the agent and the server, so I built LogCarverGuard. This post covers the free edition: what it blocks, how it decides, and what it does not do. It is early. The version is 0.1. Setup The agent talks MCP to the proxy, and the…",
  "key_points": [
    "LogCarverGuard acts as a proxy between AI coding agents and SQL Server databases.",
    "It restricts actions on the database using Managed Connection Protocol (MCP) and API key.",
    "The proxy blocks specific actions like DROP TABLE, ALTER DATABASE SET, and GRANT."
  ],
  "editors_take": "By restricting high-risk commands through a Managed Connection Protocol proxy, this tool provides a necessary safety layer for developers integrating autonomous coding agents with sensitive SQL Server databases.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}