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 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

uvx semantic-warehouse-mcp --config config.yaml --check     # check a configuration, reach every database
uvx semantic-warehouse-mcp --config config.yaml             # serve over stdio
pip install semantic-warehouse-mcp                          # or install it

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

claude mcp add warehouse -- uvx 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.2.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.2.0
File Size Uploaded Provenance
semantic_warehouse_mcp-0.2.0.tar.gz 238.6 kB With provenance Details

Built distribution (wheel)

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

Total release size: 324.3 kB

Release files / semantic_warehouse_mcp-0.2.0.tar.gz

Download URL semantic_warehouse_mcp-0.2.0.tar.gz
Size 238.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4b5d3a82b7b62b56e4ab0a1adbe9c5378ca43394f270379f08a9170c65d8c5a4
BLAKE2b-256 checksum
How to use checksums
3ce06c367bfd2ab46dc19bcb45486a1dd158a084e8c6de0029d71bde7d8c9785
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 24, 2026.

Transparency log

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

Download URL semantic_warehouse_mcp-0.2.0-py3-none-any.whl
Size 85.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d99ad1a4dbff98d81426088dd472afa21c22533893ed54428e46848dd0eff0ac
BLAKE2b-256 checksum
How to use checksums
4f155da9e27a1401d6342fd78678e6f94f37689c6a5d4edb8beee0774c0e334b
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 24, 2026.

Transparency log

Security for semantic-warehouse-mcp 0.2.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.2.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 24, 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