# Canonic

> Canonic is an MCP server for analytics and data. Context layer that gives AI agents governed, correct answers from your data warehouse. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, API, Self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/mischuh/canonic
- **MCP Registry name:** io.github.mischuh/canonic
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data)
- **Listing updated:** 2026-11-18

## About

Canonic sits between a warehouse and an AI agent and supplies the business meaning that raw schema access lacks. Metric names resolve to one agreed definition, and guardrails such as refund or trial exclusions are compiled into the SQL, so a caveat cannot be skipped by the agent.

The README describes a deterministic answer path with no LLM involved at query time: a metric is resolved, SQL is compiled against its canonical definition, guardrails are applied, the query runs read-only, and a metadata band with trust tier and freshness is attached. Context lives as YAML semantics, Markdown knowledge and contract files in a git repository, and changes are proposed as reviewable diffs.

It is aimed at data teams who want agents such as Claude Code, Cursor or Codex to query production data through MCP without producing confidently wrong numbers. The README lists Postgres, Redshift, MySQL, Snowflake, Databricks, ClickHouse, SQLite and DuckDB as supported backends.

## Features

- **Canonical metric resolution:** Metric names resolve to a single agreed definition before SQL is compiled.
- **Enforced guardrails:** Mandatory filters and dimension rules are compiled into queries and reported back with each answer.
- **Trust metadata on answers:** Each result carries a trust tier, freshness status and the reasons behind the tier.
- **Reviewable context changes:** Semantic and knowledge updates are proposed as diffs and applied only after review.
- **Read-only warehouse access:** Queries run read-only and the warehouse is never modified.
- **Metric change decomposition:** A decompose_change tool attributes metric movement between two periods, overall and by member.

## Good for

- Letting an AI agent answer revenue or customer questions without guessing definitions
- Keeping metric definitions and business caveats in version-controlled files
- Exposing governed warehouse queries to Claude Code, Cursor or Codex over MCP
- Explaining why a metric changed between two periods

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add canonic -- uvx canonic
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "canonic": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add canonic -- uvx canonic
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.canonic]
command = "uvx"
args = ["canonic"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user canonic uvx -- canonic

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "canonic": {
      "command": "uvx",
      "args": [
        "canonic"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `decompose_change`: Attributes the change of a metric between two periods, overall and by member.

## FAQ

### Does canonic modify my warehouse?

The README says canonic never mutates the warehouse and only reads from it.

### Is an LLM used when answering queries?

According to the README, no LLM is involved at answer time; an optional LLM only drafts context during setup.

### Which databases are supported?

The README lists Postgres, Redshift, MySQL, Snowflake, Databricks, ClickHouse, SQLite and DuckDB, including CSV and Parquet files through DuckDB.

### What license does Canonic use?

It is licensed under the Business Source License 1.1, free for non-commercial, personal, evaluation, educational and developmental use, with commercial use requiring a separate license.

### How do I add Canonic to Claude Code?

Run this command in your terminal: claude mcp add canonic -- uvx canonic

### What are the best alternatives to Canonic?

The closest alternatives to Canonic are Cosmos Semantic, Contextloop, Warehouse MCP, datatomcp and Warehouse Context.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Cosmos Semantic](https://ai-powered.com/mcp/cosmos-semantic): Cosmos Semantic is an open-source MCP server for analytics and data.
- [Contextloop](https://ai-powered.com/mcp/contextloop): Contextloop is a freemium MCP server for analytics and data.
- [Warehouse MCP](https://ai-powered.com/mcp/warehouse-mcp-2): Warehouse MCP is an open-source MCP server for databases.
- [datatomcp](https://ai-powered.com/mcp/datatomcp): datatomcp is a freemium MCP server for analytics and data.
- [Warehouse Context](https://ai-powered.com/mcp/warehouse-context): Warehouse Context is an MCP server for databases.
- [Metabase](https://ai-powered.com/mcp/metabase-2): Metabase is an open-source MCP server for analytics and data.
- [Nexatron](https://ai-powered.com/mcp/nexatron): Nexatron is an MCP server for analytics and data.
- [Mycorr](https://ai-powered.com/mcp/mycorr): Mycorr is a freemium MCP server for databases.

---
Source: https://ai-powered.com/mcp/canonic
