semantic-warehouse-mcp
Reads dbt semantic-layer metrics directly from a project's YAML (no dbt Cloud required), so agents can resolve business concepts like "points per game" into correct SQL; noted as in progress.
Provides guarded, read-only SQL access to a DuckDB warehouse file: tools to list tables and views, describe table schemas, and run a single row-capped, time-limited SELECT statement, with sandboxed engine settings and parser-based statement checks that block writes, file/network access, and multi-statement queries.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
semantic-warehouse-mcp
An MCP server that gives AI agents guarded, read-only SQL access to a data warehouse, plus (coming next) dbt semantic-layer metrics read straight from your project's YAML, with no dbt Cloud required.
Status: early. DuckDB works today. Semantic layer, Postgres, BigQuery, and a text-to-SQL eval are in progress.
Why
Pointing an agent at a warehouse raises two problems:
Safety. The agent must not be able to write, read local files, reach the network, or run a query that never finishes.
Correctness. Raw schemas don't tell an agent what "points per game" or "a player across seasons" means. A semantic layer does.
This project tackles both and measures the second: an eval of text-to-SQL accuracy with vs. without semantic-layer context (results to come).
Related MCP server: dbt-agents
Guardrails (DuckDB)
There are two layers, and each would stop the attacks below on its own:
Layer | What it does |
Engine sandbox | Opens the file |
Statement check | Uses DuckDB's own parser (not regexes): exactly one statement, and it must be |
Limits | Results stream with a row cap ( |
Every refusal goes back to the model as a readable tool error (Refused (multiple_statements): …), so it can fix its query and try again.
Tools
Tool | Description |
| Tables and views, with approximate row counts and comments |
| Columns, types, nullability, comments |
| One read-only SQL statement, row-capped and time-limited |
Use with Claude Code
npm install && npm run build
claude mcp add warehouse -- node /path/to/semantic-warehouse-mcp/dist/cli.js --duckdb /path/to/warehouse.duckdbOptions: --max-rows (default 200) and --timeout-ms (default 15000).
Development
npm test # vitest: guardrail attack suite + MCP surface tests
npm run buildLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
AI agents need permission before production SQL writes. Pilot $100 · Gateway $299. Lint≠authorize.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to query a Postgres data warehouse through a governed, read-only SQL interface with policy enforcement, row limits, schema-level PII isolation, and a full audit trail.1-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to inspect, query, test, and safely fix dbt projects and BigQuery warehouses under policy-enforced controls, with read-only direct queries and dbt-only allowlisted writes.Apache 2.0
- AlicenseBqualityBmaintenanceEnables AI agents to safely describe, query, and compute metrics across SQL databases using open-format semantic models, custom context, and skills, with read-only and dialect-checked execution.184 PyPIApache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query DuckDB, Postgres, and BigQuery through a governed, read-only layer with a semantic model, SQL guard, role-based row policies, PII pseudonymization, audit logging, and cost caps.40 PyPIMIT