Cost Guard MCP Server
by mcpsmithsio.github.mcpsmiths/cost-guard-mcpv0.5.0
Pre-flight query cost and result-size guardrails for AI agents on BigQuery, Snowflake, Databricks
context tax
pending
security
100/100
cold start
pending
freshness
Active28d ago
Our reading of Cost Guard, from the data
Cost Guard is a database MCP server from mcpsmiths, listed in the official MCP Registry.
We haven't measured its tool list yet, so its token cost is unknown.
Maintenance is active: the last public signal was 28 days ago (2026-10-16). For comparison, 63% of database servers are active or maintained.
With 1 GitHub stars it ranks #532 of 1,397 database servers we index.
It runs locally on your machine over stdio and needs 6 secrets (GOOGLE_APPLICATION_CREDENTIALS, SNOWFLAKE_PRIVATE_KEY_PATH, SNOWFLAKE_PRIVATE_KEY_PASSPHRASE, …); use a scoped, least-privilege key.
Install Cost Guard MCP server
Install in Claude Code
claude mcp add cost-guard -e GOOGLE_APPLICATION_CREDENTIALS='<google-application-credentials>' -e SNOWFLAKE_PRIVATE_KEY_PATH='<snowflake-private-key-path>' -e SNOWFLAKE_PRIVATE_KEY_PASSPHRASE='<snowflake-private-key-passphrase>' -e SNOWFLAKE_PASSWORD='<snowflake-password>' -e DATABRICKS_TOKEN='<databricks-token>' -e DATABRICKS_CLIENT_SECRET='<databricks-client-secret>' -- uvx cost-guard-mcpInstall in Cursor
{
"mcpServers": {
"cost-guard": {
"command": "uvx",
"args": [
"cost-guard-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"SNOWFLAKE_PRIVATE_KEY_PATH": "<snowflake-private-key-path>",
"SNOWFLAKE_PRIVATE_KEY_PASSPHRASE": "<snowflake-private-key-passphrase>",
"SNOWFLAKE_PASSWORD": "<snowflake-password>",
"DATABRICKS_TOKEN": "<databricks-token>",
"DATABRICKS_CLIENT_SECRET": "<databricks-client-secret>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"cost-guard": {
"command": "uvx",
"args": [
"cost-guard-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"SNOWFLAKE_PRIVATE_KEY_PATH": "<snowflake-private-key-path>",
"SNOWFLAKE_PRIVATE_KEY_PASSPHRASE": "<snowflake-private-key-passphrase>",
"SNOWFLAKE_PASSWORD": "<snowflake-password>",
"DATABRICKS_TOKEN": "<databricks-token>",
"DATABRICKS_CLIENT_SECRET": "<databricks-client-secret>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"cost-guard": {
"type": "stdio",
"command": "uvx",
"args": [
"cost-guard-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"SNOWFLAKE_PRIVATE_KEY_PATH": "<snowflake-private-key-path>",
"SNOWFLAKE_PRIVATE_KEY_PASSPHRASE": "<snowflake-private-key-passphrase>",
"SNOWFLAKE_PASSWORD": "<snowflake-password>",
"DATABRICKS_TOKEN": "<databricks-token>",
"DATABRICKS_CLIENT_SECRET": "<databricks-client-secret>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"cost-guard": {
"command": "uvx",
"args": [
"cost-guard-mcp"
],
"env": {
"GOOGLE_APPLICATION_CREDENTIALS": "<google-application-credentials>",
"SNOWFLAKE_PRIVATE_KEY_PATH": "<snowflake-private-key-path>",
"SNOWFLAKE_PRIVATE_KEY_PASSPHRASE": "<snowflake-private-key-passphrase>",
"SNOWFLAKE_PASSWORD": "<snowflake-password>",
"DATABRICKS_TOKEN": "<databricks-token>",
"DATABRICKS_CLIENT_SECRET": "<databricks-client-secret>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Try it in a sandbox first: this installs it with scripts off and starts it with no network, then lists its tools and token cost. How it works
npx mcpskillhub test pypi:cost-guard-mcp
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| GOOGLE_APPLICATION_CREDENTIALS | — | yes | 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 | — | yes | 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 | — | yes | Snowflake: passphrase for an encrypted SNOWFLAKE_PRIVATE_KEY_PATH key file, if the key is encrypted. |
| SNOWFLAKE_PASSWORD | — | yes | 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 | — | yes | 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 | — | yes | 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 max_rows wraps the whole text in one LIMIT subquery, so use the opt-out without max_rows. |
| 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. |
Security signals
100/100 — no known issues found as of 2026-10-19, from the checks below. This is not a guarantee of safety; review what a server can do before connecting it.
Deductions
No findings from the checks that ran.
Checks
- ✓Repository hygiene (archived, activity, license, security policy)
- ○Package metadata (install scripts, provenance) — pending
- ○Tool descriptions (prompt-injection and hidden-text heuristics) — pending
- ○Source scan (secrets, CVEs, risky code) by vectra-guard — pending
Scan it yourself before installing with vectra-guard, the open-source agent security CLI (made by NavyaAI, which also runs MCPSkillHub). Scoring rules
Freshness
Active — last maintenance signal 28d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-16 · 28d ago · GitHub
Latest release
2026-10-15 · 28d ago · GitHub · v0.5.0
Package published
no data · npm/PyPI
Registry entry updated
2026-10-15 · 28d ago · official registry · v0.5.0
How it compares in Database
Against the most-starred database servers we index. Token cost is per model turn, measured from each server's live tool list.
| Server | Stars | Tools | Tokens / turn | Freshness | Runs |
|---|---|---|---|---|---|
| Cost Guard (this) | 1 | — | not measured | Active | local |
| Screenpipe | 21,982 | — | not measured | Active | — |
| Genai Toolbox | 16,679 | — | not measured | Active | hosted |
| Convex Backend | 12,716 | — | not measured | Active | — |
| Kubeshark | 12,100 | — | not measured | Active | local |
| Baserow | 6,174 | — | not measured | Active | — |
FAQ
›How do I install the Cost Guard MCP server in Claude Code?
Run: claude mcp add cost-guard -e GOOGLE_APPLICATION_CREDENTIALS='<google-application-credentials>' -e SNOWFLAKE_PRIVATE_KEY_PATH='<snowflake-private-key-path>' -e SNOWFLAKE_PRIVATE_KEY_PASSPHRASE='<snowflake-private-key-passphrase>' -e SNOWFLAKE_PASSWORD='<snowflake-password>' -e DATABRICKS_TOKEN='<databricks-token>' -e DATABRICKS_CLIENT_SECRET='<databricks-client-secret>' -- uvx cost-guard-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Cost Guard require an API key?
Yes. It expects GOOGLE_APPLICATION_CREDENTIALS, SNOWFLAKE_PRIVATE_KEY_PATH, SNOWFLAKE_PRIVATE_KEY_PASSPHRASE, SNOWFLAKE_PASSWORD, DATABRICKS_TOKEN, DATABRICKS_CLIENT_SECRET, of which 6 are secrets.
›Can I use Cost Guard as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Cost Guard in the official MCP registry?
Yes, as io.github.mcpsmiths/cost-guard-mcp.
Sources and method
- Official MCP Registry entry
- updated 2026-10-15
- GitHub repository
- fetched 2026-10-19
- Package registry (npm / PyPI)
- listed
- Security signals, computed by us
- 2026-10-19
- Last checked against all sources
- 2026-10-19
The description, packages and links come from the maintainer's own published metadata. Token cost, security signals, freshness and the reading above are MCPSkillHub's own measurements; see the methodology. Editorial standards are owned by Ramachandra Vikas Chamarthi, Founder & AI HPC Architect. Spot an error? Request a correction or claim the listing.
Alternatives to Cost Guard
Other database MCP servers.