MCP.so
Sign In
O

Orionbelt Semantic Layer

@ralfbecher

About Orionbelt Semantic Layer

OrionBelt Semantic Layer is an API-first engine that transforms declarative YAML model definitions into optimized SQL for Postgres, Snowflake, ClickHouse, Dremio, and Databricks. It provides a unified abstraction over your data warehouse, so analysts and applications can query us

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "orionbelt": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://orionbelt.ralforion.com/mcp",
        "--transport",
        "http"
      ]
    }
  }
}

Tools

13

Get a published JSON Schema by name. Returns the raw JSON Schema document as a JSON string so callers can validate documents locally without round-tripping them to the API.

Describe the contents of the model. Shows data objects (with columns and joins), dimensions, measures, and metrics. In multi-model mode, use this after loading a model to explore its structure.

Generate a Mermaid ER diagram for the model. Returns a Mermaid diagram script that visualises the data objects, columns, and join relationships in the model.

Return the join graph as an adjacency list. Shows the data object nodes and join edges (with cardinality and join columns) in the model. Useful for understanding table relationships.

Resolve which artefacts can still be added to a query (ACR). Artefacts Composability Resolution: given an anchor — your in-progress query, or one or more named artefacts — returns the dimensions, measures, and metrics that remain composable with it and are guaranteed to compile into a valid, fanout-free result. It walks the same join graph the compiler uses, so anything it reports is safe to add. Supply the anchor exactly one of two ways: - ``query_json`` — an in-progress QueryObject as a JSON string (recommended). Its ``select`` dimensions and measures form the anchor. - ``anchors`` — one or more artefact names. Repeated names are intersected. Omit both for a fresh query, where everything composes. Directly composable artefacts share a fanout-safe root with the anchor. CFL measures/metrics come from an independent fact and compose only through the Composite Fact Layer (UNION ALL at the shared grain); they are reported separately.

Get the OBSL-Core RDF graph for the model as Turtle. Returns the semantic model's RDF graph serialized in Turtle format. The graph follows the OBSL-Core ontology and can be used for semantic web integration or further analysis.

Execute a read-only SPARQL query against the model's RDF graph. Supports SELECT and ASK queries only (no INSERT/DELETE/UPDATE). The graph uses the OBSL-Core ontology.

Look up model artefacts (dimensions, measures, metrics). Two modes, selected by whether you pass ``query``: - ``query`` set → fuzzy, ranked search. Matches names and synonyms (exact, synonym, and fuzzy/partial) and returns ranked candidates — for "I don't know the exact name". ``name`` is ignored in this mode. - ``query`` omitted → exact, deterministic, complete enumeration (the authoritative set). No args → every dimension, measure, and metric; ``kind`` only → the complete set of that one kind; ``name`` → that exact artefact (optionally constrained to ``kind``). ``kind`` narrows either mode to one artefact kind.

Explain the lineage of a dimension, measure, or metric. Traces the composition chain from the named artefact down to the underlying data objects and columns. Useful for understanding how a measure is computed or where a dimension originates.

List canonical example queries authored alongside the model. Returns each example's name, description, and intent tags. Use ``get_example`` for full detail (query payload + compiled SQL preview).

Get a single example by name with its query and compiled SQL preview.

Compile and execute a semantic query (QueryObject), returning SQL + results. Pass ``query_json`` — a QueryObject as a JSON string. If no ``limit`` is set, a server-side default row limit applies.

Get the pre-loaded OBML YAML model source. Returns the original OBML YAML that was loaded into the API at startup. Useful for understanding the model definition in the author's terms. (Single-model mode only.)

Overview

What is Orionbelt Semantic Layer?

OrionBelt Semantic Layer is an API-first engine that transforms declarative YAML semantic models into optimized SQL for Postgres, Snowflake, ClickHouse, Dremio, and Databricks. It provides a unified abstraction over data warehouses so analysts and applications can query using business concepts (dimensions, measures, metrics) instead of raw SQL.

How to use Orionbelt Semantic Layer?

Clone the repository, install dependencies with uv sync, then start the REST API with uv run orionbelt-api (available at http://127.0.0.1:8000) or the MCP server with uv run orionbelt-mcp. For Claude Desktop, add the server to claude_desktop_config.json. Optionally install the Gradio UI with uv sync --extra ui and access it at /ui.

Key features of Orionbelt Semantic Layer

  • 5 SQL dialects: Postgres, Snowflake, ClickHouse, Dremio, Databricks
  • AST‑based SQL generation (no string concatenation)
  • YAML semantic models with dimensions, measures, metrics, and joins
  • Automatic join path resolution with Composite Fact Layer support
  • Vendor‑specific SQL validation via sqlglot (non‑blocking)
  • Precise error reporting with YAML source positions and join graph analysis
  • TTL‑scoped session management via REST API and MCP
  • ER diagram generation (Mermaid) via API and Gradio UI
  • 9 MCP tools + 3 prompts for AI‑assisted model development
  • Gradio UI for interactive model editing and SQL compilation

Use cases of Orionbelt Semantic Layer

  • Compile business‑friendly queries (dimensions/measures) into dialect‑specific SQL
  • Integrate with AI assistants (Claude Desktop, Cursor) for semantic model authoring
  • Provide a unified semantic layer across multiple SQL databases
  • Validate and debug YAML model definitions with precise error messages
  • Generate ER diagrams from semantic models for documentation

FAQ from Orionbelt Semantic Layer

Which SQL dialects are supported?

Postgres, Snowflake, ClickHouse, Dremio, and Databricks SQL, each with dialect‑specific optimizations.

How do I run the MCP server?

Run uv run orionbelt-mcp for stdio mode (default, used with Claude Desktop) or set MCP_TRANSPORT=http for HTTP transport.

What tools and prompts does the MCP server expose?

9 tools: create_session, close_session, list_sessions, load_model, validate_model, describe_model, compile_query, list_models, list_dialects. 3 prompts: write_obml_model, write_query, debug_validation.

What are the prerequisites for installation?

Python 3.12+ and the uv package manager.

Is there a user interface besides the CLI and API?

Yes, a Gradio UI is available. Install with uv sync --extra ui and access it at /ui when the REST API server is running.

Frequently asked questions

Which SQL dialects are supported?

Postgres, Snowflake, ClickHouse, Dremio, and Databricks SQL, each with dialect‑specific optimizations.

How do I run the MCP server?

Run `uv run orionbelt-mcp` for stdio mode (default, used with Claude Desktop) or set `MCP_TRANSPORT=http` for HTTP transport.

What tools and prompts does the MCP server expose?

9 tools: `create_session`, `close_session`, `list_sessions`, `load_model`, `validate_model`, `describe_model`, `compile_query`, `list_models`, `list_dialects`. 3 prompts: `write_obml_model`, `write_query`, `debug_validation`.

What are the prerequisites for installation?

Python 3.12+ and the [uv](https://docs.astral.sh/uv/) package manager.

Is there a user interface besides the CLI and API?

Yes, a Gradio UI is available. Install with `uv sync --extra ui` and access it at `/ui` when the REST API server is running.

Comments

More Memory & Knowledge MCP servers