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 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, 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.3.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.3.0
File Size Uploaded Provenance
semantic_warehouse_mcp-0.3.0.tar.gz 256.8 kB With provenance Details

Built distribution (wheel)

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

Total release size: 349.1 kB

Release files / semantic_warehouse_mcp-0.3.0.tar.gz

Download URL semantic_warehouse_mcp-0.3.0.tar.gz
Size 256.8 kB
Tags Source
SHA-256 checksum
How to use checksums
67883876e67324f12f2bbcb99d408353a55acd7b50c0164ea7b8c5e588be7e27
BLAKE2b-256 checksum
How to use checksums
4a46b4083298251510047e01871f8e57e6d8149b7aac019b4bab235c416d4288
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.3.0-py3-none-any.whl

Download URL semantic_warehouse_mcp-0.3.0-py3-none-any.whl
Size 92.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d310dcef063e3f08546995bcb77aca48c6272bb8461b4534c4867c136b1df9f
BLAKE2b-256 checksum
How to use checksums
7f60904370b607a3091c42e55f9be5b39aa96d13f4fec02904145245e9ffbb4b
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.3.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.3.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