semantic-warehouse-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- semantic_warehouse_mcp-0.1.0/.gitignore +224 -0
- semantic_warehouse_mcp-0.1.0/CHANGELOG.md +31 -0
- semantic_warehouse_mcp-0.1.0/LICENSE +201 -0
- semantic_warehouse_mcp-0.1.0/PKG-INFO +102 -0
- semantic_warehouse_mcp-0.1.0/README.md +70 -0
- semantic_warehouse_mcp-0.1.0/docs/README.md +33 -0
- semantic_warehouse_mcp-0.1.0/docs/getting-started.md +77 -0
- semantic_warehouse_mcp-0.1.0/docs/reference/configuration.md +158 -0
- semantic_warehouse_mcp-0.1.0/docs/reference/dbt-importer.md +149 -0
- semantic_warehouse_mcp-0.1.0/docs/reference/engines.md +104 -0
- semantic_warehouse_mcp-0.1.0/docs/reference/guard.md +118 -0
- semantic_warehouse_mcp-0.1.0/docs/reference/running.md +77 -0
- semantic_warehouse_mcp-0.1.0/docs/reference/semantic-models.md +193 -0
- semantic_warehouse_mcp-0.1.0/docs/reference/tools.md +159 -0
- semantic_warehouse_mcp-0.1.0/examples/config.clickhouse.example.yaml +19 -0
- semantic_warehouse_mcp-0.1.0/examples/config.dbt.example.yaml +17 -0
- semantic_warehouse_mcp-0.1.0/examples/config.example.yaml +29 -0
- semantic_warehouse_mcp-0.1.0/examples/context/shop.md +7 -0
- semantic_warehouse_mcp-0.1.0/examples/data/make_shop.py +159 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/import.yaml +19 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/make_manifest.py +36 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/manifest.json +1515 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/shop/dbt_project.yml +15 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/shop/macros/generate_schema_name.sql +4 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/shop/models/marts/_marts.yml +65 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/shop/models/marts/customers.sql +4 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/shop/models/marts/orders.sql +4 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/shop/models/sources.yml +49 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/shop/profiles.yml +7 -0
- semantic_warehouse_mcp-0.1.0/examples/dbt/shop-dbt.yaml +181 -0
- semantic_warehouse_mcp-0.1.0/examples/queries/weekly-sales.yaml +21 -0
- semantic_warehouse_mcp-0.1.0/examples/semantic/shop.yaml +163 -0
- semantic_warehouse_mcp-0.1.0/examples/skills/revenue-questions/SKILL.md +8 -0
- semantic_warehouse_mcp-0.1.0/examples/vocabulary/acme.yaml +33 -0
- semantic_warehouse_mcp-0.1.0/pyproject.toml +60 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/__init__.py +8 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/adapters/__init__.py +125 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/adapters/clickhouse.py +379 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/adapters/duckdb.py +140 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/answers.py +173 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/config.py +399 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/context.py +45 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/files.py +233 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/guard.py +460 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/importers/__init__.py +1 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/importers/dbt.py +738 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/schemas/README.md +11 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/schemas/osi-0.1.1.json +344 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/schemas/ossie-0.2.0.dev0.json +385 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/semantic.py +391 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/server.py +584 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/serving.py +88 -0
- semantic_warehouse_mcp-0.1.0/src/semantic_warehouse_mcp/vocabulary.py +172 -0
- semantic_warehouse_mcp-0.1.0/tests/clickhouse_server.py +140 -0
- semantic_warehouse_mcp-0.1.0/tests/conftest.py +93 -0
- semantic_warehouse_mcp-0.1.0/tests/test_clickhouse.py +362 -0
- semantic_warehouse_mcp-0.1.0/tests/test_clickhouse_reading.py +157 -0
- semantic_warehouse_mcp-0.1.0/tests/test_config.py +191 -0
- semantic_warehouse_mcp-0.1.0/tests/test_context.py +156 -0
- semantic_warehouse_mcp-0.1.0/tests/test_dbt_import.py +563 -0
- semantic_warehouse_mcp-0.1.0/tests/test_docs.py +92 -0
- semantic_warehouse_mcp-0.1.0/tests/test_duckdb.py +131 -0
- semantic_warehouse_mcp-0.1.0/tests/test_files.py +90 -0
- semantic_warehouse_mcp-0.1.0/tests/test_guard.py +334 -0
- semantic_warehouse_mcp-0.1.0/tests/test_semantic.py +638 -0
- semantic_warehouse_mcp-0.1.0/tests/test_server.py +225 -0
- semantic_warehouse_mcp-0.1.0/tests/test_serving.py +116 -0
- semantic_warehouse_mcp-0.1.0/tests/test_vocabulary.py +355 -0
- semantic_warehouse_mcp-0.1.0/uv.lock +924 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
|
|
222
|
+
# The made-up shop built by examples/data/make_shop.py
|
|
223
|
+
examples/data/*.duckdb
|
|
224
|
+
examples/data/*.duckdb.wal
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
One line per change, newest on top: `YYYY-MM-DD — what was done`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
2026-10-24 — **0.1.0**, the first release (pre-alpha): the package on PyPI by trusted publishing (`publish.yml`, for a tag that is the package's version) and the image on GHCR; the README rewritten for what works now
|
|
8
|
+
2026-10-24 — ClickHouse `readonly = 1` users served within their profile (the author: use the read-only user employees have): no limit sent, the answer read no further than one row past what is shown, the query stopped by its id once enough is read or past its time; a profile that cuts silently, or a user that could not stop a query and has no time limit, refused at start; errors met mid-answer in each version's form refused
|
|
9
|
+
2026-10-24 — ClickHouse 22.11 served: the resolved tree asked for (`EXPLAIN QUERY TREE run_passes = 1`), settings a server does not know not sent, 64-bit integers it quotes read back; `missing_tables: leave_out` for a model ahead of its database; checked live on two real warehouses with their read-only users
|
|
10
|
+
2026-10-24 — `--check --offline`: the configuration, its models and vocabularies checked without reaching a database or reading a secret, for CI
|
|
11
|
+
2026-10-24 — Streamable HTTP for a server a team shares: `--http`, a token every request carries (required off loopback), `/health` without a token or a database, stateless JSON answers; the container image (non-root, read-only root filesystem) built on every change and published to GHCR for a release tag; `docs/reference/running.md`; real Claude Code answered through the image over HTTP, its numbers checked
|
|
12
|
+
2026-10-24 — ClickHouse before 24.3 refused at start by checking that its query tree is resolved, and a query whose tree holds an unresolved name refused: such servers (22.11, 23.8 measured) explain a query naming no table, which would have passed for a reading that found none — until now they stopped only because they did not know a setting
|
|
13
|
+
2026-10-24 — ClickHouse: a user with `readonly = 1` (it may change no setting, so no limit reaches its queries) stops the server at start, naming the fix — `readonly = 2`; a user of each kind in the ClickHouse tests
|
|
14
|
+
2026-10-24 — the dbt importer: `semantic-warehouse-mcp import-dbt` writes a dbt project's tables, descriptions, `meta` and tags as an Ossie document (`--strict`: the strict export; `--check`: for CI), the team's mapping in its configuration (`tables`, `vendor_name`, `dbt_tags`, `places`), dbt's own primary keys, `event_time` and `relationships` tests read by code; a made-up dbt project, its real manifest and output in `examples/dbt/`; real Claude Code answered April revenue by country through it, numbers checked by a direct query
|
|
15
|
+
2026-10-24 — the importer checked on a large real catalog in a scratch copy (715 datasets, 8,092 fields, every tag against the team's own rules, a planted typo named), nothing committed; refuted by a second reader: 10 findings closed (quoted columns, another database, collapsing relationships, lone surrogates now refused everywhere, tracebacks, secrets in problems, NaN, NEL, `--strict` NaN, retyped JSON numbers, backslashes); every protection held by a test that fails when removed
|
|
16
|
+
2026-10-24 — semantic models in Apache Ossie per connection (0.2.0.dev0, 0.1.1 unwrapped), checked at start against the bundled schema of their version, Ossie's own rules and their connection (a source readable and existing, a query through the guard); `list_datasets`, `describe_dataset` (live columns beside), `list_metrics`, `describe_metric`, all served as written
|
|
17
|
+
2026-10-24 — vocabularies: your own metadata in `custom_extensions` (a YAML mapping or Ossie's JSON string) checked at start — keys, levels, types, closed values with the likely one for a typo — and served with the definitions of the values an answer uses
|
|
18
|
+
2026-10-24 — files read as written (YAML 1.2 booleans, dates as text, UTF-8, aliases capped, line and column only in an error, a URL's password redacted); answers shrunk in order and, last, their longest values cut; real Claude Code answered March revenue through the model, its numbers checked by a direct query
|
|
19
|
+
2026-10-24 — refuted by a second reader: 9 findings closed (answers past the cap, values JSON cannot hold, secrets in errors, tracebacks at start, a vendor's case slipping past its vocabulary, DuckDB's catalog lost, YAML 1.1 booleans and dates, alias explosion, sources neither a name nor a query); a cut of long values that could loop forever, found by removing protections, closed; 54 removals, 54 caught
|
|
20
|
+
|
|
21
|
+
2026-10-24 — the team's own `instructions` and `context` documents, for the whole server and per connection: instructions in the server's instructions and `list_connections`, documents by `list_context` / `get_context` (as written, read anew, in parts); real Claude Code cited each rule's source
|
|
22
|
+
2026-10-24 — milestone 2 done: the ClickHouse adapter (GET — read-only by ClickHouse's own rule; every overflow mode `throw`, a cutting profile overridden; the extra row that shows a cut; `EXPLAIN QUERY TREE` naming the tables read; dictionaries checked against `readable`), DuckDB's own reading naming tables, tests against a real ClickHouse (a container; CI's service), the made-up shop loadable into ClickHouse; real Claude Code answered over DuckDB and ClickHouse at once, numbers checked
|
|
23
|
+
2026-10-24 — your own metadata decided (option B: YAML in Ossie's `custom_extensions`, a vocabulary per vendor, nothing of one catalog in code); the plan reordered: ClickHouse, then the semantic layer with the dbt importer, then the site; a production dbt catalog's shapes studied (generalised in `dev/RESEARCH.md`)
|
|
24
|
+
|
|
25
|
+
2026-10-24 — milestone 1 done: the configuration and its check (every problem named at once, typos with the likely key, duplicate YAML keys refused, secrets never repeated), the adapter interface and DuckDB (read-only file, external access off, configuration locked, its own parser asked), the guard on sqlglot (one read-only SELECT, readable tables wherever read, large tables bounded from below, settings/table functions/denied function families refused — 12 refusal codes, each a test case), `list_connections`, `list_tables`, `describe_table`, `run_query` with provenance, exact numbers and capped answers; a made-up shop (`examples/data/make_shop.py`); the guide's reference for configuration, the guard and engines, and getting started, held by tests; real Claude Code answered over stdio, its numbers checked by a direct query
|
|
26
|
+
2026-10-24 — the guard refuted by a second reader: a table in parentheses (`FROM (secret.t) x`) and ClickHouse's `x IN db.table` read past it, then `dictGet*` / `joinGetOrNull` — all closed; every table node is now a table read unless proven a CTE's name
|
|
27
|
+
|
|
28
|
+
2026-10-24 — ready to start: the guide's rule with a test (every tool in `docs/reference/tools.md`), `/close` checks the guide; the site moved to milestone 2; the hosting (pipelab) and where a company's requirements come from written in `CLAUDE.md`; context and parallel-work rules
|
|
29
|
+
2026-10-24 — the metrics layer designed beside Ossie: populations, filters bound per population (every metric filtered through another entity), roll-up rules, templates, presets, scenarios — from a production registry studied
|
|
30
|
+
2026-10-24 — `docs/` is the public documentation's source (a site to come, Astro + Starlight like detectkit's, hosted through pipelab); design, plan, decisions, research moved to `dev/` ; renamed from `warehouse-mcp`
|
|
31
|
+
2026-10-24 — groundwork: the repository, README, design, plan, decisions (Apache Ossie as the semantic layer — the 0.2 shape, 0.1.1 read too), research, the session flow; examples (a made-up shop's Ossie model, context, a skill, a saved query set); a skeleton server (stdio, `about`) with tests, ruff and CI
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: semantic-warehouse-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A read-only MCP server for SQL databases with a semantic layer in an open format (Apache Ossie), metrics, your own context and skills — for any database and any MCP client.
|
|
5
|
+
Project-URL: Repository, https://github.com/alexeiveselov92/semantic-warehouse-mcp
|
|
6
|
+
Project-URL: Documentation, https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/docs/README.md
|
|
7
|
+
Project-URL: Changelog, https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/CHANGELOG.md
|
|
8
|
+
Project-URL: Issues, https://github.com/alexeiveselov92/semantic-warehouse-mcp/issues
|
|
9
|
+
Author: Aleksei Veselov
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai-agents,mcp,metrics,model-context-protocol,ossie,semantic-layer,sql
|
|
13
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Database
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Requires-Dist: duckdb>=1.3
|
|
24
|
+
Requires-Dist: httpx>=0.28
|
|
25
|
+
Requires-Dist: jsonschema>=4.23
|
|
26
|
+
Requires-Dist: mcp<3,>=2.3
|
|
27
|
+
Requires-Dist: pyyaml>=6
|
|
28
|
+
Requires-Dist: sqlglot>=27
|
|
29
|
+
Requires-Dist: starlette>=0.46
|
|
30
|
+
Requires-Dist: uvicorn>=0.34
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# semantic-warehouse-mcp
|
|
34
|
+
|
|
35
|
+
A read-only [MCP](https://modelcontextprotocol.io) server that lets any AI agent work with SQL databases
|
|
36
|
+
the way an analyst does: knowing what the data means. You give it your semantic model in an open format
|
|
37
|
+
([Apache Ossie](https://ossie.apache.org/), formerly OSI), your own metadata, context and documents — and
|
|
38
|
+
it lets agents find the right tables, read what they mean and query them, safely.
|
|
39
|
+
|
|
40
|
+
> **Status: pre-alpha** — working, and used on real warehouses; its interfaces may still change. Metrics, saved query
|
|
41
|
+
> sets, skills and more databases are on their way ([the plan](https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/dev/PLAN.md)).
|
|
42
|
+
|
|
43
|
+
## What it does now
|
|
44
|
+
|
|
45
|
+
- **ClickHouse and DuckDB**, configured in one YAML file: the tables agents may read, the large tables a query must
|
|
46
|
+
bound, limits per query; secrets by variable name, never written in it.
|
|
47
|
+
- **Read-only, checked twice**: one `SELECT` at a time, parsed for the database's own dialect by
|
|
48
|
+
[sqlglot](https://github.com/tobymao/sqlglot) and by the database itself; only the tables you allow, wherever they
|
|
49
|
+
are read; large tables bounded; rows and time capped, never cut without saying so — on top of a read-only database
|
|
50
|
+
user. Every answer carries the SQL as it ran and when.
|
|
51
|
+
- **A semantic layer in Apache Ossie**: datasets, fields, relationships and metrics, with `ai_context` for agents and
|
|
52
|
+
`custom_extensions` for anything of your own — categories, layers, links to code, owners — checked against a
|
|
53
|
+
vocabulary you declare and served with what each value means.
|
|
54
|
+
- **An importer from dbt**: `semantic-warehouse-mcp import-dbt` writes your dbt project's tables, descriptions, `meta`
|
|
55
|
+
and tags as an Ossie model — the mapping yours, in its configuration.
|
|
56
|
+
- **Your own context**: instructions and documents served to agents as written.
|
|
57
|
+
- **Any MCP client**: stdio for one person's agent, Streamable HTTP for a server a team shares (a token on every
|
|
58
|
+
request, `/health`, a container image).
|
|
59
|
+
|
|
60
|
+
## Install
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uvx semantic-warehouse-mcp --config config.yaml --check # check a configuration, reach every database
|
|
64
|
+
uvx semantic-warehouse-mcp --config config.yaml # serve over stdio
|
|
65
|
+
pip install semantic-warehouse-mcp # or install it
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Connect Claude Code (any client that runs stdio servers takes the same command):
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
claude mcp add warehouse -- uvx semantic-warehouse-mcp --config /path/to/config.yaml
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Documentation
|
|
75
|
+
|
|
76
|
+
- [Getting started](https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/docs/getting-started.md) — from
|
|
77
|
+
nothing to an agent answering about a made-up shop's data.
|
|
78
|
+
- [The guide](https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/docs/README.md): tools,
|
|
79
|
+
configuration, semantic models and vocabularies, the dbt importer, the guard, engines, running it.
|
|
80
|
+
|
|
81
|
+
## Why
|
|
82
|
+
|
|
83
|
+
An agent with a bare SQL connection writes plausible queries over the wrong tables. What makes its answers
|
|
84
|
+
right is semantics: what a table holds, which column is the date, how a metric is defined, what not to mix.
|
|
85
|
+
That knowledge already exists in teams — in dbt projects, semantic layers, wikis — but every tool wants it in
|
|
86
|
+
its own shape. This server reads it in an open, vendor-neutral format and serves it beside the data.
|
|
87
|
+
|
|
88
|
+
## Development
|
|
89
|
+
|
|
90
|
+
Python 3.12, [uv](https://docs.astral.sh/uv/), the official [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk).
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
uv sync
|
|
94
|
+
uv run pytest
|
|
95
|
+
uv run ruff check . && uv run ruff format --check .
|
|
96
|
+
uv run python examples/data/make_shop.py # the made-up shop the examples describe
|
|
97
|
+
uv run semantic-warehouse-mcp --config examples/config.example.yaml # the server over stdio
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
[Apache-2.0](https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/LICENSE).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# semantic-warehouse-mcp
|
|
2
|
+
|
|
3
|
+
A read-only [MCP](https://modelcontextprotocol.io) server that lets any AI agent work with SQL databases
|
|
4
|
+
the way an analyst does: knowing what the data means. You give it your semantic model in an open format
|
|
5
|
+
([Apache Ossie](https://ossie.apache.org/), formerly OSI), your own metadata, context and documents — and
|
|
6
|
+
it lets agents find the right tables, read what they mean and query them, safely.
|
|
7
|
+
|
|
8
|
+
> **Status: pre-alpha** — working, and used on real warehouses; its interfaces may still change. Metrics, saved query
|
|
9
|
+
> sets, skills and more databases are on their way ([the plan](https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/dev/PLAN.md)).
|
|
10
|
+
|
|
11
|
+
## What it does now
|
|
12
|
+
|
|
13
|
+
- **ClickHouse and DuckDB**, configured in one YAML file: the tables agents may read, the large tables a query must
|
|
14
|
+
bound, limits per query; secrets by variable name, never written in it.
|
|
15
|
+
- **Read-only, checked twice**: one `SELECT` at a time, parsed for the database's own dialect by
|
|
16
|
+
[sqlglot](https://github.com/tobymao/sqlglot) and by the database itself; only the tables you allow, wherever they
|
|
17
|
+
are read; large tables bounded; rows and time capped, never cut without saying so — on top of a read-only database
|
|
18
|
+
user. Every answer carries the SQL as it ran and when.
|
|
19
|
+
- **A semantic layer in Apache Ossie**: datasets, fields, relationships and metrics, with `ai_context` for agents and
|
|
20
|
+
`custom_extensions` for anything of your own — categories, layers, links to code, owners — checked against a
|
|
21
|
+
vocabulary you declare and served with what each value means.
|
|
22
|
+
- **An importer from dbt**: `semantic-warehouse-mcp import-dbt` writes your dbt project's tables, descriptions, `meta`
|
|
23
|
+
and tags as an Ossie model — the mapping yours, in its configuration.
|
|
24
|
+
- **Your own context**: instructions and documents served to agents as written.
|
|
25
|
+
- **Any MCP client**: stdio for one person's agent, Streamable HTTP for a server a team shares (a token on every
|
|
26
|
+
request, `/health`, a container image).
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uvx semantic-warehouse-mcp --config config.yaml --check # check a configuration, reach every database
|
|
32
|
+
uvx semantic-warehouse-mcp --config config.yaml # serve over stdio
|
|
33
|
+
pip install semantic-warehouse-mcp # or install it
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Connect Claude Code (any client that runs stdio servers takes the same command):
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
claude mcp add warehouse -- uvx semantic-warehouse-mcp --config /path/to/config.yaml
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Documentation
|
|
43
|
+
|
|
44
|
+
- [Getting started](https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/docs/getting-started.md) — from
|
|
45
|
+
nothing to an agent answering about a made-up shop's data.
|
|
46
|
+
- [The guide](https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/docs/README.md): tools,
|
|
47
|
+
configuration, semantic models and vocabularies, the dbt importer, the guard, engines, running it.
|
|
48
|
+
|
|
49
|
+
## Why
|
|
50
|
+
|
|
51
|
+
An agent with a bare SQL connection writes plausible queries over the wrong tables. What makes its answers
|
|
52
|
+
right is semantics: what a table holds, which column is the date, how a metric is defined, what not to mix.
|
|
53
|
+
That knowledge already exists in teams — in dbt projects, semantic layers, wikis — but every tool wants it in
|
|
54
|
+
its own shape. This server reads it in an open, vendor-neutral format and serves it beside the data.
|
|
55
|
+
|
|
56
|
+
## Development
|
|
57
|
+
|
|
58
|
+
Python 3.12, [uv](https://docs.astral.sh/uv/), the official [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk).
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
uv sync
|
|
62
|
+
uv run pytest
|
|
63
|
+
uv run ruff check . && uv run ruff format --check .
|
|
64
|
+
uv run python examples/data/make_shop.py # the made-up shop the examples describe
|
|
65
|
+
uv run semantic-warehouse-mcp --config examples/config.example.yaml # the server over stdio
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
[Apache-2.0](https://github.com/alexeiveselov92/semantic-warehouse-mcp/blob/main/LICENSE).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# semantic-warehouse-mcp documentation
|
|
2
|
+
|
|
3
|
+
The documentation for people who use and run semantic-warehouse-mcp. This folder is the **single source**: the
|
|
4
|
+
site (Astro + Starlight, planned — `dev/PLAN.md`) is built from these files; edit them here, never in the site.
|
|
5
|
+
|
|
6
|
+
How the project is built and planned is not here: that is `dev/` (design, plan, decisions, research).
|
|
7
|
+
|
|
8
|
+
## Pages
|
|
9
|
+
|
|
10
|
+
- [Getting started](getting-started.md) — from nothing to an agent answering about a made-up shop's data.
|
|
11
|
+
- **Reference**
|
|
12
|
+
- [Tools](reference/tools.md) — every tool, its inputs and answers.
|
|
13
|
+
- [Configuration](reference/configuration.md) — every key of the configuration file, and its check.
|
|
14
|
+
- [Semantic models and vocabularies](reference/semantic-models.md) — Apache Ossie documents, your own metadata
|
|
15
|
+
declared in a vocabulary, every check at start.
|
|
16
|
+
- [The dbt importer](reference/dbt-importer.md) — a dbt project's tables, descriptions, `meta` and tags as an Ossie
|
|
17
|
+
document, and its configuration.
|
|
18
|
+
- [The guard](reference/guard.md) — how a query is read, every refusal and why, the limits.
|
|
19
|
+
- [Engines](reference/engines.md) — the databases it reads, and how each is kept read-only.
|
|
20
|
+
- [Running it](reference/running.md) — the command, stdio or HTTP for a team (its token, the health check), the
|
|
21
|
+
container image.
|
|
22
|
+
|
|
23
|
+
Planned, each written with the change that makes it true:
|
|
24
|
+
|
|
25
|
+
- **Guides** — connecting databases (read-only users, `readable`, large tables, secrets by name); writing a semantic
|
|
26
|
+
model step by step (the reference is [semantic models and vocabularies](reference/semantic-models.md)); context
|
|
27
|
+
documents and skills; saved query sets; running it for a team.
|
|
28
|
+
- **Contributing** — how the project is built and tested.
|
|
29
|
+
|
|
30
|
+
Three readers: people who use it through their agent (getting started, guides), people who run it (guides,
|
|
31
|
+
reference), people who contribute (a contributing page). A page is written in the same commit as the change that makes
|
|
32
|
+
it true; a tool without its reference entry fails the tests, and so does a refusal, a configuration key or an engine
|
|
33
|
+
without its entry.
|