Cost Guard MCP
Pre-flight query cost and result-size guardrails for AI agents on BigQuery, Snowflake, Databricks
Connector by mcpsmiths · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/mcpsmiths-cost-guard-mcp
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.
- Tools
- 4 read · 0 write · 0 deleteRead-only
- Secrets
- 6 (API keys, tokens or passwords)
- Install scripts
- None found
- Runs as
- Python package
Tools by what they do 4
Read from the source code; the running server may list different tools.
Read 4 · Look things up without changing anything.
check_credentialsdescribe_engine_capabilitiesestimate_query_costrun_query_bounded
Secrets and settings it asks for
Secrets: values you paste in that let it act as you.
DATABRICKS_CLIENT_SECRETDATABRICKS_TOKENGOOGLE_APPLICATION_CREDENTIALSSNOWFLAKE_PASSWORDSNOWFLAKE_PRIVATE_KEY_PASSPHRASESNOWFLAKE_PRIVATE_KEY_PATH
Other settings (environment variables or headers).
COST_GUARD_ALLOW_MULTI_STATEMENT_SQLCOST_GUARD_ALLOW_WRITE_STATEMENTSCOST_GUARD_DATABRICKS_ALLOW_WAREHOUSE_STARTCOST_GUARD_MAX_IN_FLIGHT_QUERIESCOST_GUARD_SNOWFLAKE_ALLOW_WAREHOUSE_RESUMEDATABRICKS_CLIENT_IDDATABRICKS_HTTP_PATHDATABRICKS_SERVER_HOSTNAMESNOWFLAKE_ACCOUNTSNOWFLAKE_EDITIONSNOWFLAKE_ROLESNOWFLAKE_SECONDARY_ROLES
Show 1 more settings
SNOWFLAKE_USER
Network hosts it talks to 6
azure.microsoft.com· found in codecloud.google.com· found in codedatabricks.com· found in codedocs.databricks.com· found in codegithub.com· found in codesnowflake.com· found in code
Tools (4)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
check_credentialsVerify credentials/connectivity for an engine without running a real query or a dry-run estimate. What runs: BigQuery - one metadata call (the service-account lookup). Snowflake - login, USE WAREHOUSE when a warehouse is given, SELECT CURRENT_WAREHOUSE() when none is, SHOW WAREHOUSES LIKE for the pinned warehouse, and only when that row says STARTED one session-context SELECT. Databricks - one control-plane GET of the configured SQL warehouse (Warehouses API), and only when it is RUNNING a session running SELECT current_user(). Call this once after configuring a new engine (or when a real tool…
describe_engine_capabilitiesDeclare which cost signals are exact vs. approximate for the given warehouse engine. Call this before estimate_query_cost or run_query_bounded to understand how much to trust the accuracy_tier on their responses for this engine.
estimate_query_costEstimate the cost of a SQL query before running it. ALWAYS call this before running an expensive-looking query. The response's accuracy_tier tells you how much to trust the number: PRECISE (exact), UPPER_BOUND (real cap, may overstate), HEURISTIC (rough). Accepts exactly one SQL statement per call (a single trailing ';' is fine) - text with more statements is refused before anything is estimated. This tool accepts only read statements (first keyword SELECT, WITH, VALUES, SHOW, DESCRIBE, DESC or EXPLAIN; a WITH must lead to a SELECT or VALUES) - others are refused before anything is estimated. …
run_query_boundedRun a query only if its pre-flight cost estimate is within your given bounds; refuses otherwise. Check result.status and result.executed: "refused" with reason "cost_cap_exceeded" or "byte_cap_exceeded" means the query did NOT run (executed=false) and result.hint explains why; "refused" with reason "row_cap_exceeded" or "result_size_exceeded" means the query RAN and was billed (executed=true) and rows holds a truncated prefix of its result - do not re-run it to get more rows, narrow it instead. NOTE: unlike estimate_query_cost, any call with executed=true has a real monetary/quota side effect …
Compare and alternatives
Featured in
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 6
- Weekly downloads
- 216
- Last commit
- Oct 19, 2026 (9 days ago)
- Last release
- Oct 19, 2026 (9 days ago)
- Last package publish
- Oct 19, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026) and the package registry.
Details
- Registry name
io.github.mcpsmiths/cost-guard-mcp- Version
- 0.6.0
- Auth
- API key
- Packages
- pypi cost-guard-mcp
- License
- MIT
- Repository
- github.com/mcpsmiths/cost-guard-mcp
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
More from mcpsmiths
Cite this page
Cost Guard MCP. Agent Mart. https://agentmart.dev/connectors/mcpsmiths-cost-guard-mcp (last updated 2026-10-24)