
Warehouse MCP
io.github.tantn89Published by GitHub account tantn89v0.1.0Updated Nov 1, 2026
Governed read-only warehouse access for agents: SQL guard, row policies, PII pseudonyms, audit log.
Overview
Warehouse's local MCP server; no sign-in required; STDIO.
No AI overview yet: these facts come from the registry entry and the server itself.
Installation
In SourceWeft
- Open Warehouse MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
warehouse-mcp
Give AI agents your warehouse without giving them your warehouse.
An MCP server that lets Claude, Cursor or any MCP client query DuckDB, Postgres or BigQuery through a governed, read-only layer:
- a semantic model, so agents ask in business terms;
- a SQL guard that an agent cannot talk into writing, reading files or leaving its lane;
- per-role row policies;
- pseudonymized personal data;
- an audit log;
- a cost cap.
Every claim below is backed by a test or a measured run.
[ci] [pypi] [mcp registry] [python] [mcp] [license]
Try it in one line
The bundled demo serves about 100k live Wikipedia edits, captured by realtime-lakehouse, from a local DuckDB file. No keys are needed.
Put that in Claude Desktop's config, or run claude mcp add warehouse -- uvx warehouse-mcp --demo.
Then ask "Which wikis had the most bot activity, and how many distinct editors did each have?"
What the agent sees, taken from real tool calls on the demo:
How it works
Pseudonymize at the source, not in the output. The guard rewrites every dataset reference into a subquery that replaces personal columns with a salted hash, inside the warehouse. As a result:
count(DISTINCT editor)stays exact;- joins on pseudonyms work across datasets;
- a probe like
WHERE editor = 'Alice'matches nothing, because the comparison runs against the hash; - names never cross the wire.
Masking the output after lineage analysis can be bypassed with aliases, expressions or functions. Here the raw column is simply not reachable.
Each layer is designed to hold if the layer before it fails. The guard is the first layer:
- single statements only;
- SELECT only;
- declared datasets only;
- function allowlist;
- CTE references resolved by scope, so
WITH t AS (SELECT * FROM t)cannot reach the real tablet; - capped LIMIT.
Behind it, each engine is locked down on its own, and the tests prove it with the guard bypassed.
The tools:
What the red team found
The adversarial suite found three real gaps outside the SQL guard. All three are fixed and kept as regression tests:
- ReDoS after the timeout. The email-redaction regex backtracked quadratically, and a
1 MB string from
repeat('x', 1000000)would have held the server for about 12 minutes. It ran after the warehouse timeout, so nothing stopped it. The fix bounds the regex repeats and cuts cells before redaction. - A single huge row skipped the result cap. The fix halves the longest text cells until the row fits.
- Pseudonyms could be linked back to names. An edit to one's own
User:page pairs a pseudonym with a title that contains the name. That re-identified 5.7% of editors in the snapshot where it was found. The fix adds conditional PII (pii_when: "namespace IN (2, 3)") for user-page titles and pseudonymizes edit summaries.
An independent review by a second model then found a gap the suite had missed, this time in the guard:
- An alias could disguise a real table as a CTE. In
WITH x AS (...) SELECT * FROM edits_raw x, x, the guard matched CTE references by alias, so the physical table skipped the policy rewrite. CTE references are now resolved by table name within each scope, and aliasing a real table to a visible CTE name is refused. - Engine errors quoted data. A message such as
Could not convert string '<value>'bypassed result redaction and reached both the agent and the audit log. Error messages now lose their quoted values and are redacted and capped.
Running the parity cases on BigQuery found one more problem, a correctness bug rather than a
leak: time literals were cast to DATETIME against TIMESTAMP columns. It is fixed.
Configure your own warehouse
Datasets declare their columns, which ones are pii or pii_when, which are free_text, and
named metrics. Undeclared columns do not exist for the agent. Over HTTP
(warehouse-mcp --config my.yaml --transport http) each bearer key selects a role. Keys come
from environment variables; the config holds no secrets.
Setup for each backend, Claude Desktop snippets and the eval workflow are in docs/deployment-guide.md. For rolling this out at a company (discovery, access model, staged rollout, success metrics, incident runbook), see docs/deployment-playbook.md.
Development
Architecture and threat model · codebase map · roadmap
Limits
- Phone-number redaction applies to columns tagged
free_text. An alias such ascomment AS closes the phone pass; it keeps email redaction, which applies everywhere. - HTTP uses static bearer keys and plain HTTP. Put TLS in front of it. OAuth resource-server mode is on the roadmap.
- Snowflake is on the roadmap.
Data
The demo data comes from Wikimedia's public recent-changes stream, licensed CC BY-SA 4.0. Code is MIT.
Source: README.md at commit ebefc49
Tools
0Version history
1- v0.1.0LatestNov 1, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts