mcpbeat Sign in

Cost Guard MCP Server

local only

Cost Guard MCP runs on your own machine — the client starts it, so there is no endpoint to ping. 274 installs a week from pypi. Last commit 31 Oct 2026.

Pre-flight query cost and result-size guardrails for AI agents on BigQuery, Snowflake, Databricks

Installs per day peak 300 · avg 83 · -30% w/w
a month agotoday
274
Installs / week
pypi · cost-guard-mcp
1
Stars
6 open issues
31 Oct 2026
Last commit
from GitHub
MIT
License
Python

Nothing serious here today

Today is the operative word: we check Cost Guard MCP every 15 minutes and re-read its code on every release. Watch it and you find out the day that stops being true.

Three servers free · no card

Connect this server

This server runs on your own machine — install it with the package manager and the client starts it for you. Package name taken from the official registry entry.

run in your terminal
claude mcp add cost-guard-mcp -- uvx cost-guard-mcp
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "cost-guard-mcp": {
      "command": "uvx",
      "args": [
        "cost-guard-mcp"
      ]
    }
  }
}
~/.codex/config.toml
[mcp_servers.cost-guard-mcp]
command = "uvx"
args = ["cost-guard-mcp"]
.cursor/mcp.json
{
  "mcpServers": {
    "cost-guard-mcp": {
      "command": "uvx",
      "args": [
        "cost-guard-mcp"
      ]
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "cost-guard-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "cost-guard-mcp"
      ]
    }
  }
}

Optional settings from the registry entry, left out of the block above: GOOGLE_APPLICATION_CREDENTIALS (BigQuery: path to a service-account key file (Application Default Credentials). Required to use the bigquery engine), SNOWFLAKE_ACCOUNT (Snowflake: account identifier. Required to use the snowflake engine), SNOWFLAKE_USER (Snowflake: username. Required to use the snowflake engine), SNOWFLAKE_ROLE (Snowflake: role to assume. Required to use the snowflake engine; has no default and must never be ACCOUNTADMIN (ACCOUNTADMIN, SECURITYADMIN and ORGADMIN are rejected before any Snowflake connection is opened - the check runs when the Snowflake configuration is first loaded, on the first Snowflake tool call; the server process itself starts regardless, so a bad role surfaces as a failed check_credentials or a tool error, not as a startup exit)), SNOWFLAKE_SECONDARY_ROLES (Snowflake: secondary roles activated at login. NONE (default) means only SNOWFLAKE_ROLE is active in the session; ALL is the explicit opt-out that activates every role granted to SNOWFLAKE_USER), SNOWFLAKE_PRIVATE_KEY_PATH (Snowflake: path to an RSA private key file for key-pair auth (preferred over SNOWFLAKE_PASSWORD). Either this or SNOWFLAKE_PASSWORD is required to use the snowflake engine), SNOWFLAKE_PRIVATE_KEY_PASSPHRASE (Snowflake: passphrase for an encrypted SNOWFLAKE_PRIVATE_KEY_PATH key file, if the key is encrypted), SNOWFLAKE_PASSWORD (Snowflake: password (discouraged; prefer SNOWFLAKE_PRIVATE_KEY_PATH). Either this or SNOWFLAKE_PRIVATE_KEY_PATH is required to use the snowflake engine), SNOWFLAKE_EDITION (Snowflake: account edition that sets the USD/credit price of estimates - standard (default), enterprise, business_critical or vps. The per-call edition argument can only raise it), DATABRICKS_SERVER_HOSTNAME (Databricks: SQL warehouse server hostname (e.g. my-workspace.cloud.databricks.com, no scheme, no trailing slash). Required to use the databricks engine), DATABRICKS_HTTP_PATH (Databricks: SQL warehouse HTTP path (from the warehouse's Connection Details tab, e.g. /sql/1.0/warehouses/<warehouse-id>). Required to use the databricks engine), DATABRICKS_TOKEN (Databricks: personal access token (simplest auth option). Either this or DATABRICKS_CLIENT_ID + DATABRICKS_CLIENT_SECRET is required to use the databricks engine), DATABRICKS_CLIENT_ID (Databricks: OAuth machine-to-machine service-principal client ID (preferred for automated use). Requires DATABRICKS_CLIENT_SECRET as well), DATABRICKS_CLIENT_SECRET (Databricks: OAuth machine-to-machine service-principal client secret. Requires DATABRICKS_CLIENT_ID as well), COST_GUARD_ALLOW_MULTI_STATEMENT_SQL (Set to 1 to let estimate_query_cost/run_query_bounded accept text containing more than one SQL statement. Off by default: the cost cap is only known to cover the single statement the dry run/EXPLAIN priced. Skips only this server's scanner: Snowflake still rejects multi-statement text (sessions are pinned to MULTI_STATEMENT_COUNT=1), and only a single SELECT/WITH/VALUES statement is wrapped in a LIMIT subquery - a script runs unwrapped and its row cap (max_rows, default 1000) is enforced by the paged fetch), COST_GUARD_ALLOW_WRITE_STATEMENTS (Set to 1 (exactly that value) to let estimate_query_cost/run_query_bounded accept statements that are not reads. Off by default: only text whose first keyword (after comments and opening parentheses) is SELECT, WITH, VALUES, SHOW, DESCRIBE, DESC or EXPLAIN is estimated or run - a WITH must be followed by a SELECT or VALUES - because warehouse rows re-enter the model's context and can steer the next call. The gate is defence in depth: the authorisation boundary is the credential's grants (deploy a read-only principal). With COST_GUARD_ALLOW_MULTI_STATEMENT_SQL=1 every statement in the text must be a read, so BigQuery scripts (DECLARE/SET/BEGIN) need both opt-outs. Any other value leaves the gate on), COST_GUARD_MAX_IN_FLIGHT_QUERIES (Maximum number of run_query_bounded calls allowed in flight at once (positive integer, default 8). A cancelled call keeps its slot until its warehouse query completes or the 120 s watchdog fires; a call over the cap fails with a tool error naming this variable before any warehouse connection is opened), COST_GUARD_DATABRICKS_ALLOW_WAREHOUSE_START (Set to true (exactly that value) to let the read-only Databricks tools (check_credentials, estimate_query_cost) open a session on a SQL warehouse that is not RUNNING, which starts the warehouse and bills compute until it auto-stops. Off by default: the server first reads the warehouse's state through the Warehouses API (GET /api/2.0/sql/warehouses/<id>, CAN_VIEW/CAN_USE suffices) and, unless it is RUNNING - also when the state cannot be read - check_credentials returns ok=false and estimate_query_cost returns no byte or dollar figure, without opening a session. run_query_bounded is not gated: its own pre-execution estimate and the execution may start the warehouse. Any other value leaves the guard on), COST_GUARD_SNOWFLAKE_ALLOW_WAREHOUSE_RESUME (Set to true (exactly that value) to let the read-only Snowflake tools run SELECT CURRENT_REGION(), the INFORMATION_SCHEMA.QUERY_HISTORY read and check_credentials' session-context SELECT on a warehouse that is not STARTED, which can resume a suspended AUTO_RESUME warehouse and bill compute until it auto-suspends. Off by default: those statements are skipped unless the pinned warehouse's SHOW WAREHOUSES state is STARTED (also skipped when no warehouse is pinned or the state cannot be read), and the QUERY_HISTORY read is skipped whenever estimate_query_cost is called without a warehouse argument; estimate_query_cost then prices at Gen1 rates with the byte-tier heuristic and says so in a caveat, and check_credentials returns ok=true with a detail built from the SHOW WAREHOUSES row. USE WAREHOUSE, EXPLAIN USING JSON, SHOW WAREHOUSES and SELECT CURRENT_WAREHOUSE() always run; run_query_bounded is not gated. Any other value leaves the guard on).

Alternatives to Cost Guard MCP

same job, measured the same way
Camber - Remote Agentic Data Science
by cambercloud-camber-mcp

Remote data science agents for Snowflake, Databricks & BigQuery in Claude/Cursor via MCP

answering
A
Agent Guardrails
by logi-cmd

Merge gates and safety checks for AI coding agents via MCP.

99 installs/wk local only
Memini
by lumayapartners

Local-first project memory and mistake-prevention guardrails for AI coding agents.

89 installs/wk local only
Snowflake MCP Server
by nsphung

A Snowflake MCP server — SQL queries, schema exploration, and data insights for AI assistants

193 installs/wk local only
Agent Guard
by mdfifty50-boop

Constitutional guardrails and loop detection for AI agents

69 installs/wk local only
MCP Notion
by infoinlet-marketplace

Notion for AI agents — search, read pages/blocks, query databases, create pages.

46 installs/wk local only
Datris
by datris

The data control plane for AI agents — acquire, validate, land, and query data over MCP.

3 310 installs/wk local only
Vericto: database guardrails for AI agents
by vericto

Database guardrails for AI agents: check SQL against your Vericto rules before it runs.

answering

Cost Guard MCP — questions

Answers built from our own checks of this server.

Why is there no uptime for Cost Guard MCP?
Cost Guard MCP runs on your own machine over stdio — there is no network address to reach, so uptime cannot be measured for it by anyone. What can be measured is adoption: the pypi package cost-guard-mcp was installed 274 times last week.
How do I connect Cost Guard MCP?
Copy the ready config from this page. We generate it for Claude Code, Claude Desktop, Codex, Cursor and VS Code, each in the form that client actually reads. It runs locally, so the command pulls cost-guard-mcp straight from pypi; nothing to host, nothing to sign up for.
How many people use Cost Guard MCP?
The pypi package cost-guard-mcp was installed 274 times in the last week. Week over week that is -30%. We show installs rather than GitHub stars on purpose: a star is a bookmark, an install is someone actually running it.
Is Cost Guard MCP open source?
Yes — it is published under the MIT licence, written in Python, 1 stars on GitHub and 6 open issues. The source link is on this page, so you can read exactly what it does with your data before you connect it.