[hypequery](https://hypequery.com/) › Analytics MCP Server: Database SQL Tools vs Semantic Layer Tools (2026) | hypequery
Index for agents: https://hypequery.com/llms.txt
Canonical page: https://hypequery.com/semantic-layer/analytics-mcp-server

> What an analytics MCP server is, the two kinds (database servers that run SQL and semantic layer servers that query named metrics), how to evaluate one for production, and how ClickHouse, hypequery, Cube, dbt, Snowflake and AtScale servers compare.

[Open sourceApache 2.0](https://github.com/hypequery/hypequery)

Semantic layer

# Analytics MCP servers: SQL tools or metric tools

Last updated November 14, 2026

An analytics MCP server lets an AI agent answer data questions. The big choice is what its tools accept: SQL the agent writes, or the names of metrics you defined. This guide covers both kinds, what to check before production, and how the main servers compare.

[The two kinds ](#kinds)[Compare servers](#servers)

Definition

## What is an analytics MCP server?

MCP, the Model Context Protocol, is how agents discover and call tools. An analytics MCP server publishes tools for data: one to list what exists, one to describe it, and one or more to query it. The agent picks a tool, fills in the arguments and gets rows back.

A database MCP server’s query tool takes SQL. A semantic layer MCP server’s query tool takes a metric, dimensions, filters and a time grain, and the layer writes the SQL. That one difference decides how consistent the answers are and how far the agent can reach.

The two kinds

## Database servers and semantic layer servers

| Kind                      | What the tools do                                                         | Good for                                                                              | Watch out for                                                                         |
| ------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| Database MCP server       | Lists databases and tables, runs SQL the agent writes                     | Exploring data you already have access to; ad hoc questions by analysts and engineers | Every answer re-derives business logic; access is whatever the database user can read |
| Semantic layer MCP server | Lists metrics and dimensions with descriptions, runs queries by name      | Agents inside a product, or answers that must match the dashboard                     | Only answers what has been modelled; someone has to write the model                   |
| BI tool MCP server        | Exposes saved dashboards, reports or charts, sometimes with editing tools | Teams whose definitions already live in a BI tool                                     | Bound to that tool’s model and licence                                                |

Side by side

## The same question, two tool calls

Both calls answer “revenue by country”. In the first, the agent decided what revenue means. In the second, it asked for a metric that has one definition, shared with your API and dashboards.

database MCP server

```
// A database MCP server: the agent writes SQL.
{
  "name": "run_query",
  "arguments": {
    "query": "SELECT country, sum(amount) FROM orders WHERE status != 'refunded' GROUP BY country"
  }
}

// The agent chose the table, the definition
// of revenue and the refund rule. The next conversation
// may choose differently.
```

semantic layer MCP server

```
// A semantic layer MCP server: the agent names a metric.
{
  "name": "query_metric",
  "arguments": {
    "dataset": "orders",
    "metric": "revenue",
    "dimensions": ["country"],
    "grain": "month",
    "limit": 12
  }
}

// Revenue, the refund rule and the tenant filter are
// defined once, in code. The agent only picks names.
```

Before production

## Seven things to check in an analytics MCP server

| Check                          | Good                                                                                               | Risky                                                        |
| ------------------------------ | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| What the agent can see         | A list of metrics and dimensions with labels and descriptions, returned by a schema tool.          | Table and column names only.                                 |
| Whether it can write SQL       | No raw SQL tool, or one you can switch off and verify is off.                                      | A SQL tool that is always present, guarded only by a prompt. |
| Who decides the tenant         | The server, from its own config or the caller’s verified credential. Missing tenant means refusal. | A tenant argument the agent fills in.                        |
| How it authenticates over HTTP | OAuth or your app’s own auth, with each call run as the caller.                                    | One shared token for every user.                             |
| Result size                    | A default row limit and a hard ceiling, and caps per call.                                         | Whatever the query returns.                                  |
| Traceability                   | The metric and filters used are returned, and the generated SQL is available for debugging.        | A number with no record of how it was computed.              |
| Same numbers as the dashboard  | The agent and the dashboard read the same model.                                                   | The agent computes its own version.                          |

For the access-control side in more depth, see [data access control in a semantic layer](https://hypequery.com/semantic-layer/access-control).

Options

## Analytics MCP servers compared

Checked against each project’s own repository or docs on November 14, 2026. “Not covered” means the sources we read did not say, not that the feature is missing. For semantic layers that also run MCP, such as Boring Semantic Layer, Malloy Publisher and Wren AI, see [semantic layer for AI agents](https://hypequery.com/semantic-layer/ai-agents).

| Server                       | Kind                          | Tools                                                                                                                      | Raw SQL                                                                                                      | Transport and auth                                                                                      | Licence, plan or databases                                          |
| ---------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| mcp-clickhouse (ClickHouse)  | Database                      | `run_query`, `list_databases`, `list_tables`; `run_chdb_select_query` with chDB                                            | Yes: that is the tool. Read-only (`readonly=1`) by default; writes and drops behind flags                    | stdio, Streamable HTTP; HTTP needs a bearer token or OAuth by default                                   | Apache 2.0                                                          |
| hypequery                    | Semantic layer                | `list_datasets`, `get_dataset_schema`, `query_metric`, `query_dataset`                                                     | None                                                                                                         | stdio, or HTTP with your app’s auth; tenant from server config or verified credential                   | Apache 2.0; ClickHouse only                                         |
| Cube                         | Semantic layer and BI         | 30 tools, including `runQuery` and data-model editing tools                                                                | `runQuery` takes SQL, but in Cube’s Postgres dialect against its semantic SQL API, not the database directly | Hosted in Cube Cloud over HTTPS with OAuth; Viewer role or higher; tokens can be limited to named tools | All Cube Cloud plans                                                |
| dbt MCP server               | Semantic layer plus dbt tools | Semantic Layer tools (`list_metrics`, `get_dimensions`, `query_metrics` and more), plus CLI, Discovery and Admin API tools | Yes: `execute_sql`, `text_to_sql` and CLI `show`, each can be disabled                                       | Local or remote; per-tool enable and disable settings                                                   | Server Apache 2.0; Semantic Layer on a paid dbt plan; no ClickHouse |
| Snowflake-managed MCP server | Semantic layer and database   | Cortex Analyst over semantic views, Cortex Search, Cortex Agents, custom tools                                             | Optional `SYSTEM_EXECUTE_SQL`, read-only by default                                                          | Snowflake OAuth or an external IdP; Snowflake privileges per tool                                       | Snowflake                                                           |
| AtScale                      | Semantic layer                | `list_models`, `explore_columns`, `run_query` and others                                                                   | Tools are read-only and checked against the model                                                            | Remote MCP server                                                                                       | Commercial; no ClickHouse                                           |

On ClickHouse

## Use both, for different people

On ClickHouse, the two kinds are complementary. ClickHouse’s own `mcp-clickhouse` runs queries with `readonly=1` by default and needs auth over HTTP by default, which suits engineers exploring a cluster they can already query. Its docs call the drop guard a best-effort guard, not a security boundary, and recommend limiting the ClickHouse user’s grants.

For an agent that answers your customers, or one whose numbers must match the product, [hypequery’s MCP server](https://hypequery.com/clickhouse-mcp) exposes only the datasets you published, with no SQL tool, a tenant set by the server, 100 rows per call by default and a ceiling you choose.

### Exploration

mcp-clickhouse with a read-only ClickHouse user, for your data team in Claude or Cursor.

### Product agents

hypequery datasets over MCP, scoped per tenant, sharing definitions with your API and React hooks.

### Promotion path

When an exploratory query keeps coming back, turn it into a dataset measure, so every agent gets the same answer.

An honest answer

## When another option fits better

- Questions are one-off and the askers are engineers: a database MCP server answers things nobody modelled, with no setup beyond a read-only user.
- Your metrics already live in dbt on a supported warehouse: the dbt MCP server reuses them. Switch off its SQL and CLI tools for a governed agent.
- You want agents to build dashboards and edit the model, not only query: Cube’s hosted server includes model-editing tools.
- Everything is in Snowflake: its managed MCP server keeps tools and privileges inside Snowflake.

Questions

## Analytics MCP server FAQ

### What is an analytics MCP server?

It is a Model Context Protocol server that lets AI agents such as Claude, Cursor or Codex answer data questions. It publishes tools the agent can call: some list what data exists, others run queries. Database MCP servers run SQL the agent writes; semantic layer MCP servers run queries over named metrics and dimensions that someone defined in advance.

### Is an analytics MCP server the same as text-to-SQL?

A database MCP server is text-to-SQL with a standard interface: the model writes SQL and the server runs it. A semantic layer MCP server is different: the model chooses a metric, dimensions, filters and a time grain, and the layer writes the SQL. The second gives the same answer every time and cannot reach data outside the model.

### Should I use the ClickHouse MCP server or a semantic layer MCP server?

Use mcp-clickhouse for exploration by people who already have database access: it is read-only by default, quick to set up and can answer questions nobody modelled. Use a semantic layer server, such as hypequery, when the agent is part of your product, serves customers, or must agree with your dashboards. Many teams run both, for different audiences.

### What should an analytics MCP server expose to an agent?

A tool to list the available datasets or metrics, a tool to describe one (dimensions, measures, descriptions, allowed filters), and one or two tools to query by name. Leave out raw SQL tools for any agent that serves people outside your data team, and leave out write tools entirely unless editing is the point.

### How do permissions work with an analytics MCP server?

For a database server, permissions are the database user’s grants: give it a read-only user that can see only what the agent should. For a semantic layer server, the layer applies tenant and row rules from the caller’s verified credential to every query it builds. Either way, permissions should never depend on the prompt.

### Can an analytics MCP server be used in a multi-tenant SaaS product?

Yes, if the tenant comes from the server and not the agent. In hypequery, a stdio server is started for one tenant, and an HTTP server reads each caller’s tenant from their verified credential. A tenant-keyed dataset with no trusted tenant refuses to start, and tenant filters sent by the agent are rejected.

Guides

## More on semantic layers

### [What is a semantic layer](https://hypequery.com/semantic-layer)

[What a semantic layer is, the five places one can live, and how dbt MetricFlow, Snowflake semantic views, Databricks metric views and OSI compare with a layer defined in code.](https://hypequery.com/semantic-layer)

[Read](https://hypequery.com/semantic-layer)

### [dbt Semantic Layer and MetricFlow](https://hypequery.com/semantic-layer/dbt-metricflow)

[Semantic models, metric types and the Semantic Layer APIs, compared with a semantic layer defined in code.](https://hypequery.com/semantic-layer/dbt-metricflow)

[Read](https://hypequery.com/semantic-layer/dbt-metricflow)

### [Snowflake semantic views](https://hypequery.com/semantic-layer/snowflake-semantic-views)

[CREATE SEMANTIC VIEW, the SEMANTIC_VIEW() query and Cortex Analyst, compared with a semantic layer defined in code.](https://hypequery.com/semantic-layer/snowflake-semantic-views)

[Read](https://hypequery.com/semantic-layer/snowflake-semantic-views)

### [Databricks metric views](https://hypequery.com/semantic-layer/databricks-metric-views)

[Unity Catalog metric views in YAML, the MEASURE() function and Genie, compared with a semantic layer defined in code.](https://hypequery.com/semantic-layer/databricks-metric-views)

[Read](https://hypequery.com/semantic-layer/databricks-metric-views)

### [Open Semantic Interchange (OSI)](https://hypequery.com/semantic-layer/open-semantic-interchange)

[The vendor-neutral spec for exchanging semantic models: who is behind it, what the format covers and what it leaves out.](https://hypequery.com/semantic-layer/open-semantic-interchange)

[Read](https://hypequery.com/semantic-layer/open-semantic-interchange)

### [Open-source semantic layer tools](https://hypequery.com/semantic-layer/open-source-tools)

[Open-source semantic layers compared by licence, model format, databases, APIs and MCP support, including Cube Core, MetricFlow and hypequery.](https://hypequery.com/semantic-layer/open-source-tools)

[Read](https://hypequery.com/semantic-layer/open-source-tools)

### [Semantic layer for AI agents](https://hypequery.com/semantic-layer/ai-agents)

[Why agents need named metrics instead of raw SQL, what to check (no SQL tool, tenant scope, query limits) and how each semantic layer exposes MCP tools.](https://hypequery.com/semantic-layer/ai-agents)

[Read](https://hypequery.com/semantic-layer/ai-agents)

### [Data access control](https://hypequery.com/semantic-layer/access-control)

[Tenant isolation, row-level and column-level rules, cache scoping and a pre-launch test list for dashboards, embedded analytics and agents.](https://hypequery.com/semantic-layer/access-control)

[Read](https://hypequery.com/semantic-layer/access-control)

### [dbt Semantic Layer alternatives](https://hypequery.com/semantic-layer/dbt-semantic-layer-alternatives)

[Nine alternatives compared by model format, databases (including ClickHouse), APIs, MCP and licence, and when to stay on dbt.](https://hypequery.com/semantic-layer/dbt-semantic-layer-alternatives)

[Read](https://hypequery.com/semantic-layer/dbt-semantic-layer-alternatives)

### [ClickHouse semantic layer](https://hypequery.com/clickhouse-semantic-layer)

[Define datasets, measures and tenant keys for ClickHouse in TypeScript or Python.](https://hypequery.com/clickhouse-semantic-layer)

[Read](https://hypequery.com/clickhouse-semantic-layer)

### [hypequery vs Cube](https://hypequery.com/compare/hypequery-vs-cube)

[A code-first library compared with a standalone semantic layer service.](https://hypequery.com/compare/hypequery-vs-cube)

[Read](https://hypequery.com/compare/hypequery-vs-cube)

## Sources

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

- ClickHouse

  [github.com/ClickHouse/mcp-clickhouse](https://github.com/ClickHouse/mcp-clickhouse)

- hypequery

  - [github.com/hypequery/hypequery/tree/main/packages/mcp-server](https://github.com/hypequery/hypequery/tree/main/packages/mcp-server)
  - [hypequery.com/docs/mcp/safety](https://hypequery.com/docs/mcp/safety)
  - [hypequery.com/docs/mcp/tools](https://hypequery.com/docs/mcp/tools)

- Cube

  [github.com/cube-js/cube/blob/master/docs-mintlify/docs/integrations/mcp-server.mdx](https://github.com/cube-js/cube/blob/master/docs-mintlify/docs/integrations/mcp-server.mdx)

- dbt Labs

  - [github.com/dbt-labs/dbt-mcp/blob/main/README.md](https://github.com/dbt-labs/dbt-mcp/blob/main/README.md)
  - [docs.getdbt.com/docs/use-dbt-semantic-layer/sl-faqs](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-faqs)

- Snowflake

  [docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp](https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-agents-mcp)

- AtScale

  - [www.atscale.com/use-cases/semantic-context-ai-mcp/](https://www.atscale.com/use-cases/semantic-context-ai-mcp/)
  - [www.atscale.com/integrations/](https://www.atscale.com/integrations/)

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.

[Read the datasets docs ](https://hypequery.com/docs/datasets/overview)[ClickHouse semantic layer](https://hypequery.com/clickhouse-semantic-layer)
