orionbelt-semantic-layer — Claude Code MCP server: what it does
MCP server that compiles YAML models into SQL for BigQuery, Snowflake, DuckDB and five more dialects. An agent defines metrics and dimensions once, then asks questions in plain language.
claude mcp add orionbelt-semantic-layer -- uvx orionbelt-semantic-layerWhat orionbelt-semantic-layer does
You define dimensions, measures and metrics in YAML. OrionBelt translates them into dialect-specific SQL through an AST. Supports BigQuery, ClickHouse, Databricks, Dremio, DuckDB, MotherDuck, MySQL, PostgreSQL and Snowflake. An agent can send a throwaway model and multiple queries in one /v1/oneshot/batch call: the server validates the YAML, runs the queries and returns results with explanations and warnings.
The server exposes PostgreSQL wire, Arrow Flight SQL, REST and MCP interfaces. Fixed grain (grain: {mode: FIXED}) pins a measure's aggregation level independently of the query grain — it becomes OVER (PARTITION BY ...) in the compiled SQL.
Requires Python 3.12 or later and uvx for installation. Licensed under BUSL-1.1.
What it helps with
- Compile a YAML model into SQL for nine dialects
- Set fixed aggregation grain for a metric
- Send multiple queries with a temporary model in one call
- Connect a BI tool via PostgreSQL wire or Arrow Flight SQL
Example prompts for the agent
- Compile YAML model
tpcds.obml.ymland queryQ98.ymlto DuckDB SQL - Run a query: revenue by country and average order value for February
- Load model
sales_model.obml.ymland list all measures
How to install orionbelt-semantic-layer
Platform CLI
claude mcp add orionbelt-semantic-layer -- uvx orionbelt-semantic-layeruvx runs the command named after the package; if the README names another one, use uvx --from orionbelt-semantic-layer <command>
Platform CLI
codex mcp add orionbelt-semantic-layer -- uvx orionbelt-semantic-layeruvx runs the command named after the package; if the README names another one, use uvx --from orionbelt-semantic-layer <command>
Config file
{
"mcpServers": {
"orionbelt-semantic-layer": {
"command": "uvx",
"args": [
"orionbelt-semantic-layer"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from orionbelt-semantic-layer <command>
Config file
{
"servers": {
"orionbelt-semantic-layer": {
"type": "stdio",
"command": "uvx",
"args": [
"orionbelt-semantic-layer"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from orionbelt-semantic-layer <command>
Platform CLI
gemini mcp add orionbelt-semantic-layer uvx orionbelt-semantic-layeruvx runs the command named after the package; if the README names another one, use uvx --from orionbelt-semantic-layer <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about orionbelt-semantic-layer
How do I install orionbelt-semantic-layer in Claude Code?
Run claude mcp add orionbelt-semantic-layer -- uvx orionbelt-semantic-layer. For Cursor, add an MCP config block: "command": "uvx", "args": ["orionbelt-semantic-layer"].
What does orionbelt-semantic-layer do?
Compiles YAML descriptions of metrics and dimensions into SQL for nine dialects. An agent defines the model once, then asks questions in plain language — the server translates them into warehouse queries.
Which databases does orionbelt-semantic-layer support?
BigQuery, ClickHouse, Databricks, Dremio, DuckDB, MotherDuck, MySQL, PostgreSQL and Snowflake. One YAML compiles to any of these dialects.