Open sourceApache 2.0

Semantic layer

Open-source semantic layer tools, compared

Last updated

Eight open-source semantic layers and one open spec, compared by licence, how you write the model, which databases they reach, how you query them and whether AI agents can use them over MCP. Each claim was checked against the project’s own repository or docs on November 13, 2026.

Definition

What counts as an open-source semantic layer?

A semantic layer is where metrics, dimensions and joins are defined once, so every dashboard, API and agent computes “revenue” the same way. For this page, an open-source semantic layer is one whose model format and query engine are published under an open-source licence, so you can run it yourself.

Several projects are open at the core and commercial at the edges: hosted APIs, MCP servers or enterprise features. The table and the notes below say where that line falls for each one.

At a glance

Open-source semantic layers compared

GitHub stars as of November 13, 2026, rounded.

Open-source semantic layer tools compared, checked November 13, 2026
LicenceYou writeRuns asDatabasesQuery withMCP for agentsStars
Cube CoreApache 2.0 backend, MIT clientYAML or JavaScript model filesA serviceMany, including ClickHouseREST, GraphQL, SQL over the Postgres protocolHosted MCP server in Cube Cloud21.2k
Wren AIApache 2.0 (docs CC BY 4.0)MDL (Modeling Definition Language)A service and CLI, on Apache DataFusion22+ connectors, including ClickHouseGoverned text-to-SQL, CLIIncluded18.2k
LightdashMIT, except the commercial ee/ directorydbt YAML or standalone Lightdash YAMLA BI applicationBigQuery, Snowflake, Redshift, Databricks, Postgres, Trino, ClickHouse and moreThe Lightdash appLightdash Cloud, or self-hosted with an Enterprise licence6.2k
dbt MetricFlowApache 2.0 (from v0.209.0)YAML in a dbt projectA Python library and the mf CLIHosted Semantic Layer: Snowflake, BigQuery, Databricks, Redshift, Postgres, TrinoCLI locally; GraphQL, JDBC and Python SDK on paid dbt plansdbt MCP server (Apache 2.0)1.9k
MalloyMITMalloy, a modelling and query language that compiles to SQLA compiler, plus Malloy Publisher to serve modelsBigQuery, Snowflake, DuckDB, MotherDuck, PostgreSQL, MySQL, Trino, Presto, DatabricksMalloy queries; REST through PublisherMalloy Publisher (MIT)2.6k
hypequeryApache 2.0TypeScript or Python modules (Python in beta)A library inside your backendClickHouse onlyIn-process calls, HTTP with OpenAPI, React hooks@hypequery/mcp, no raw SQL tool105
Boring Semantic LayerMITPython models on IbisA Python libraryIbis backends such as DuckDB, Snowflake, BigQuery, PostgreSQLPython APIBuilt in490
AtScale SMLApache 2.0 (the language only)SML: YAML in GitA model format; the AtScale engine is commercialThrough AtScaleThrough AtScaleThrough AtScale (read-only tools)179

The tools

Eight open-source semantic layers

1. Cube Core

The most widely used open-source semantic layer. You define cubes, measures, dimensions and joins in YAML or JavaScript, and Cube serves them over REST, GraphQL and a SQL API that speaks the Postgres wire protocol, so Postgres-compatible BI tools can connect.

Strengths: Many data sources including ClickHouse, three query APIs, and the largest community on this list.

Limits: It is another service to deploy and run, and its MCP server is a Cube Cloud feature rather than part of Core.

Best for: One model serving several databases and many consumers, including BI tools.

2. Wren AI

Describes itself as a governed semantic layer expressed in MDL, its Modeling Definition Language, built on Apache DataFusion. The engine, which was a separate Wren Engine repository until May 2026, now lives in the WrenAI repository with a governed text-to-SQL service, an MCP server and a CLI.

Strengths: Built around natural-language questions and agents from the start; 22+ connectors, ClickHouse among them.

Limits: The project is centred on text-to-SQL. Wren AI Cloud and Enterprise Plus are commercial, and the licence file reserves future modules for AGPL.

Best for: Teams building a natural-language or agent interface over several databases.

3. Lightdash

A BI tool with a semantic layer. Metrics and dimensions are defined in your dbt project’s YAML or in standalone Lightdash YAML, and Lightdash builds charts and dashboards on top.

Strengths: One place for the metric definitions and the dashboards that use them; ClickHouse is a supported adapter.

Limits: It is a BI application rather than a layer other apps query. Code under ee/, including the MCP server, is under a commercial licence: MCP is on Lightdash Cloud, or self-hosted with an Enterprise licence.

Best for: dbt teams who want open-source BI that reads their metric definitions.

4. dbt MetricFlow

The engine behind the dbt Semantic Layer. It reads metrics defined in YAML in a dbt project and compiles metric requests into SQL. It moved to Apache 2.0 at version 0.209.0, after earlier AGPL and BSL releases. See the dbt MetricFlow guide.

Strengths: Fits straight into an existing dbt project; you can define and query metrics locally with the mf CLI.

Limits: Locally you get the CLI only: the APIs and integrations need a paid dbt plan, and the hosted Semantic Layer does not list ClickHouse.

Best for: Analytics engineering teams already modelling in dbt on a supported warehouse.

5. Malloy

A semantic modelling and query language built on SQL. You write models and queries in Malloy, and it compiles them to SQL for the engine you already run. Malloy Publisher serves models over REST and MCP.

Strengths: A full modelling and query language rather than YAML plus an API, and it runs on the engine you already have.

Limits: Readers have to learn a new language. ClickHouse is not among its supported engines.

Best for: Analysts who want a modelling language that is more expressive than SQL.

6. hypequery

Our project. Datasets with dimensions, measures, metrics and a tenant key are TypeScript or Python modules (Python in beta) that your application imports. The same definitions serve in-process queries, HTTP endpoints with OpenAPI, typed React hooks and an MCP server for agents. See the ClickHouse semantic layer page.

Strengths: Metric names are type-checked with the app, tenant scope fails closed, and the MCP server has no raw SQL tool.

Limits: ClickHouse only, and it is a library, not a standalone service for BI tools. The hosted option is not live yet.

Best for: Product teams on ClickHouse building customer-facing analytics, APIs or in-app agents.

7. Boring Semantic Layer

A small Python semantic layer on Ibis, from boringdata and xorq-labs. Models are Python objects, and a built-in MCP server exposes them as tools.

Strengths: Light to adopt in a Python or notebook workflow; runs on the engines Ibis supports. Version 0.3.19 shipped on November 11, 2026.

Limits: Young and pre-1.0. Its docs do not name ClickHouse or cover per-user access rules.

Best for: Python data teams who want metrics and an MCP server without a service.

8. AtScale SML

The Semantic Modeling Language: an Apache 2.0, YAML-based format for semantic models, kept in Git. It is the open part of AtScale; the engine that queries SML models is AtScale’s commercial platform.

Strengths: An open, Git-friendly format for teams on AtScale, with versions up to 1.7.

Limits: A model format, not a runnable semantic layer on its own.

Best for: AtScale customers who want their models in an open format.

A spec, not a tool

Apache Ossie (Open Semantic Interchange)

Apache Ossie, formerly Open Semantic Interchange, is an Apache 2.0 specification for semantic models in YAML or JSON, so a model written for one tool can be read by another. It is incubating at the Apache Software Foundation, with Snowflake, dbt Labs, Salesforce, Databricks, Cube and others taking part. The latest released spec is 0.1.1, from December 2025. It describes models but does not query them, so it sits beside the tools above rather than replacing one. The Ossie guide covers what the spec includes.

How to choose

Which open-source semantic layer fits

  • Many databases and BI tools on one model: Cube Core.
  • Already modelling in dbt: dbt MetricFlow, or Lightdash if you also want open-source dashboards.
  • Natural-language questions across several databases: Wren AI.
  • A richer language than SQL for analysts: Malloy.
  • Python notebooks and a quick MCP server: Boring Semantic Layer.
  • ClickHouse, inside your product, with agents: hypequery. See semantic layers for AI agents for what to check before connecting one.

Questions

Open-source semantic layer FAQ

What is the best open-source semantic layer?

It depends on where your metrics need to go. Cube Core is the most widely used and serves many databases and BI tools. dbt MetricFlow suits teams already on dbt. Wren AI and Malloy suit natural-language and language-first workflows. hypequery suits ClickHouse product teams building customer-facing analytics and agents.

Is Cube open source?

Cube Core is: its backend is Apache 2.0 and its client libraries are MIT. Cube Cloud, which runs the hosted MCP server, is a commercial service.

Is the dbt Semantic Layer open source?

MetricFlow, the engine, is Apache 2.0 from version 0.209.0, and you can query metrics locally with its CLI. The hosted dbt Semantic Layer, with its GraphQL, JDBC and Python APIs and integrations, needs a dbt Starter, Enterprise or Enterprise+ plan.

Which open-source semantic layers support ClickHouse?

Of the tools on this page, Cube Core, Wren AI, Lightdash and hypequery document ClickHouse support. The hosted dbt Semantic Layer and Malloy do not list it, and Boring Semantic Layer’s docs do not name it.

Which open-source semantic layers have an MCP server for AI agents?

Wren AI, Malloy (through Malloy Publisher), Boring Semantic Layer and hypequery ship MCP servers under open-source licences. dbt’s MCP server is Apache 2.0, though its Semantic Layer tools need a paid plan. Cube’s MCP server is part of Cube Cloud, and Lightdash’s needs Lightdash Cloud or an Enterprise licence.

What is Apache Ossie (Open Semantic Interchange)?

Apache Ossie, formerly Open Semantic Interchange (OSI), is an Apache 2.0 specification for writing down semantic models so tools can exchange them. It is in the Apache Incubator. The latest released spec is 0.1.1, from December 2025. It is a format, not a semantic layer you can query.

Sources

Vendor pages used for this page, all read on November 13, 2026.

Cube
github.com/cube-js/cube
github.com/cube-js/cube/blob/master/docs-mintlify/docs/data-modeling/concepts/syntax.mdx
github.com/cube-js/cube/blob/master/docs-mintlify/reference/core-data-apis/sql-api/index.mdx
github.com/cube-js/cube/blob/master/docs-mintlify/admin/connect-to-data/data-sources/clickhouse.mdx
github.com/cube-js/cube/blob/master/docs-mintlify/docs/integrations/mcp-server.mdx
Wren AI
github.com/Canner/WrenAI
github.com/Canner/WrenAI/blob/main/LICENSE
github.com/Canner/wren-engine
Lightdash
github.com/lightdash/lightdash
github.com/lightdash/lightdash/blob/main/LICENSE
docs.lightdash.com/references/integrations/lightdash-mcp
dbt Labs
github.com/dbt-labs/metricflow
docs.getdbt.com/docs/use-dbt-semantic-layer/sl-faqs
github.com/dbt-labs/dbt-mcp
Malloy
github.com/malloydata/malloy
github.com/malloydata/publisher
Boring Semantic Layer
github.com/boringdata/boring-semantic-layer
github.com/boringdata/boring-semantic-layer/blob/main/docs/md/doc/query-agent-mcp.md
pypi.org/project/boring-semantic-layer/
AtScale
github.com/semanticdatalayer/SML
www.atscale.com/use-cases/semantic-context-ai-mcp/
Apache Ossie
github.com/apache/ossie
ossie.apache.org/

Next step

Define a semantic layer in your own codebase

hypequery datasets are TypeScript or Python files: dimensions, measures, joins and a tenant key, served to your API, React hooks and AI agents over MCP. Open source, for ClickHouse.

Get early access to hypequery cloud.

Cloud hosts the same model you run in your backend, with a managed API and MCP server, versions, and rollback. We're letting teams in a few at a time. Join the waitlist and we'll reach out when your project can go live.

How do you want to build your analytics layer? (Optional)
What features do you most need? (Optional)

Pick as many as you like.

Only your email is required. All other questions are optional.