Developer Builds Open-Source Cost Guard Tool to Stop AI Agents From Running Expensive Warehouse Queries

A developer released cost-guard-mcp, a lightweight Model Context Protocol server designed to prevent AI agents from accidentally running costly or oversized queries against cloud data warehouses like BigQuery and Snowflake. The tool addresses a gap where no existing warehouse MCP server provides agents with cost or data-volume estimates before a query executes, unlike a human DBA who would typically review a query first. It offers three tools: one to describe engine capabilities, one to estimate query cost and byte usage before execution, and one to run queries with enforced cost and row limits. The project, comprising just 715 lines of Python across 15 files, was built and hardened within roughly 18 hours, with version 0.1.1 shipping on September 13, 2026. A key design choice is that cost estimates always include a mandatory accuracy tier — PRECISE, UPPER_BOUND, or HEURISTIC — enforced structurally via Pydantic rather than left to developer convention.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in