Skip to main content

semantic-warehouse-mcp

A read-only MCP server that lets any AI agent work with SQL databases the way an analyst does: knowing what the data means. You give it your semantic model in an open format (Apache Ossie, formerly OSI), your own metadata, context and documents — and it lets agents find the right tables, read what they mean and query them, safely.

Status: pre-alpha — working, and used on real warehouses; its interfaces may still change. Metrics, saved query sets and more databases are on their way (the plan).

What it does now

  • ClickHouse, PostgreSQL, MySQL and DuckDB, configured in one YAML file: the tables agents may read, the large tables a query must bound, limits per query; secrets by variable name, never written in it.
  • Read-only, checked twice: one SELECT at a time, parsed for the database's own dialect by sqlglot and by the database itself; only the tables you allow, wherever they are read; large tables bounded; rows and time capped, never cut without saying so — on top of a read-only database user. Every answer carries the SQL as it ran and when.
  • A semantic layer in Apache Ossie: datasets, fields, relationships and metrics, with ai_context for agents and custom_extensions for anything of your own — categories, layers, links to code, owners — checked against a vocabulary you declare and served with what each value means.
  • An importer from dbt: semantic-warehouse-mcp import-dbt writes your dbt project's tables, descriptions, meta and tags as an Ossie model — the mapping yours, in its configuration.
  • Your own context and skills: instructions, documents and skills (the Agent Skills format: a folder with a SKILL.md and the files it refers to) served to agents as written — from disk, or straight from a git repository, kept fresh.
  • Any MCP client: stdio for one person's agent, Streamable HTTP for a server a team shares (a token on every request, /health, a container image).

Install

Each engine's driver is an extra — postgres, mysql, duckdb, or all (ClickHouse needs none):

uvx --from 'semantic-warehouse-mcp[all]' semantic-warehouse-mcp --config config.yaml --check   # check, reach every database
uvx --from 'semantic-warehouse-mcp[all]' semantic-warehouse-mcp --config config.yaml           # serve over stdio
pip install 'semantic-warehouse-mcp[postgres]'                                                  # or install it

Connect Claude Code (any client that runs stdio servers takes the same command):

claude mcp add warehouse -- uvx --from 'semantic-warehouse-mcp[all]' semantic-warehouse-mcp --config /path/to/config.yaml

Documentation

swm.pipelab.dev — the guide, built from docs/:

  • Getting started — from nothing to an agent answering about a made-up shop's data.
  • The guide: tools, configuration, semantic models and vocabularies, the dbt importer, the guard, engines, running it.

Why

An agent with a bare SQL connection writes plausible queries over the wrong tables. What makes its answers right is semantics: what a table holds, which column is the date, how a metric is defined, what not to mix. That knowledge already exists in teams — in dbt projects, semantic layers, wikis — but every tool wants it in its own shape. This server reads it in an open, vendor-neutral format and serves it beside the data.

Development

Python 3.12, uv, the official MCP Python SDK.

uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run python examples/data/make_shop.py    # the made-up shop the examples describe
uv run semantic-warehouse-mcp --config examples/config.example.yaml   # the server over stdio

License

Apache-2.0.

Metadata

Release files for semantic-warehouse-mcp 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for semantic-warehouse-mcp 0.5.0
File Size Uploaded Provenance
semantic_warehouse_mcp-0.5.0.tar.gz 268.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for semantic-warehouse-mcp 0.5.0
File Interpreter ABI Platform
semantic_warehouse_mcp-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 367.9 kB

Release files / semantic_warehouse_mcp-0.5.0.tar.gz

Download URL semantic_warehouse_mcp-0.5.0.tar.gz
Size 268.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ce2cf3f1af51d60874ab06a4afb0fccc70a870e4161958d600fa4cc46b02066f
BLAKE2b-256 checksum
How to use checksums
157f21297c704af9e375f71f158d49f4a732c5ddfce99ff1055f59a5e9a84520
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / semantic_warehouse_mcp-0.5.0-py3-none-any.whl

Download URL semantic_warehouse_mcp-0.5.0-py3-none-any.whl
Size 99.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b6cd6f4d030e423000650b35d73a5c684b8ab1cdec8a897043fa6bb6739c837
BLAKE2b-256 checksum
How to use checksums
04e8a8b889d66ee5afdc14fdac939f9c7b16dcde30995035bfd52973e9b1ddb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for semantic-warehouse-mcp 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for semantic_warehouse_mcp-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page