经 AI Skill Hub 精选评估,Sidemantic指标层 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.2 分,适合有一定技术背景的用户使用。
Sidemantic指标层 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Sidemantic指标层 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/sidequery/sidemantic
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"sidemantic---": {
"command": "npx",
"args": ["-y", "sidemantic"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Sidemantic指标层 执行以下任务... Claude: [自动调用 Sidemantic指标层 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"sidemantic___": {
"command": "npx",
"args": ["-y", "sidemantic"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
The universal metrics layer for consistent metrics across your data stack. Compatible with 15+ semantic model formats.
Documentation | GitHub | Docker Hub | Discord | Demo (50+ MB data download, runs in your browser with Pyodide + DuckDB)

The installer downloads the skill to ~/.agents/skills/sidemantic-modeler and symlinks it into ~/.claude/skills/.
The published image is sidequery/sidemantic on Docker Hub. Mount your models directory as a volume at /app/models:
docker run -p 5433:5433 -v ./models:/app/models sidequery/sidemantic
Demo mode (built-in sample data, no volume needed):
docker run -p 5433:5433 sidequery/sidemantic --demo
See examples/docker/ for MCP mode, env vars, building from source, and integration test services.
For Cloudflare Worker + Container deployment, see examples/cloudflare_containers/.
Install:
uv add sidemantic
Malloy support (uv):
uv add "sidemantic[malloy]"
HTTP API server (uv):
uv add "sidemantic[api]"
Notebook widget (uv):
uv add "sidemantic[widget]" jupyterlab
uv run jupyter lab
Marimo (uv):
uv add "sidemantic[widget]" marimo
uv run marimo edit
import duckdb
from sidemantic.widget import MetricsExplorer
conn = duckdb.connect(":memory:")
conn.execute("create table t as select 1 as value, 'a' as category, date '2024-01-01' as d")
MetricsExplorer(conn.table("t"), time_dimension="d")
Define models in SQL, YAML, or Python:
<details> <summary><b>SQL</b> (orders.sql)</summary>
MODEL (name orders, table orders, primary_key order_id);
DIMENSION (name status, type categorical);
DIMENSION (name order_date, type time, granularity day);
METRIC (name revenue, agg sum, sql amount);
METRIC (name order_count, agg count); </details>
<details> <summary><b>YAML</b> (orders.yml)</summary>
models:
- name: orders
table: orders
primary_key: order_id
dimensions:
- name: status
type: categorical
- name: order_date
type: time
granularity: day
metrics:
- name: revenue
agg: sum
sql: amount
- name: order_count
agg: count </details>
<details> <summary><b>Python</b> (programmatic)</summary>
from sidemantic import Model, Dimension, Metric
orders = Model(
name="orders",
table="orders",
primary_key="order_id",
dimensions=[
Dimension(name="status", type="categorical"),
Dimension(name="order_date", type="time", granularity="day"),
],
metrics=[
Metric(name="revenue", agg="sum", sql="amount"),
Metric(name="order_count", agg="count"),
]
) </details>
Query via CLI:
sidemantic query "SELECT revenue, status FROM orders" --db data.duckdb
Or Python API:
from sidemantic import SemanticLayer, load_from_directory
layer = SemanticLayer(connection="duckdb:///data.duckdb")
load_from_directory(layer, "models/")
result = layer.sql("SELECT revenue, status FROM orders")
Workbench (TUI with SQL editor + charts):
uvx --from "sidemantic[workbench]" sidemantic workbench --demo
PostgreSQL server (connect Tableau, DBeaver, etc.):
uvx --from "sidemantic[serve]" sidemantic serve --demo --port 5433
HTTP API server (JSON or Arrow):
uvx --from "sidemantic[api]" sidemantic api-serve --demo --port 4400 --auth-token secret
Colab notebooks:
SQL syntax:
uv run https://raw.githubusercontent.com/sidequery/sidemantic/main/examples/sql/sql_syntax_example.py
Comprehensive demo:
uv run https://raw.githubusercontent.com/sidequery/sidemantic/main/examples/advanced/comprehensive_demo.py
Symmetric aggregates:
uv run https://raw.githubusercontent.com/sidequery/sidemantic/main/examples/features/symmetric_aggregates_example.py
Superset with DuckDB:
git clone https://github.com/sidequery/sidemantic.git && cd sidemantic
uv run examples/superset_demo/run_demo.py
Cube Playground:
git clone https://github.com/sidequery/sidemantic.git && cd sidemantic
uv run examples/cube_demo/run_demo.py
Rill Developer:
git clone https://github.com/sidequery/sidemantic.git && cd sidemantic
uv run examples/rill_demo/run_demo.py
OSI (complex adtech semantic model):
git clone https://github.com/sidequery/sidemantic.git && cd sidemantic
uv run examples/osi_demo/run_demo.py
OSI widget notebook (percent-cell Python notebook):
git clone https://github.com/sidequery/sidemantic.git && cd sidemantic
uv run examples/osi_demo/osi_widget_notebook.py
See examples/ for more.
uvx --from "sidemantic[api]" sidemantic api-serve models/ --port 4400 --auth-token secret
Start the API server:
uvx --from "sidemantic[api]" sidemantic api-serve models/ --db data.duckdb --port 4400 --auth-token secret
Compile a structured semantic query:
curl -s http://localhost:4400/compile \
-H "Authorization: Bearer secret" \
-H "Content-Type: application/json" \
-d '{"dimensions":["orders.status"],"metrics":["orders.total_amount"]}'
Run a structured query as JSON:
curl -s http://localhost:4400/query \
-H "Authorization: Bearer secret" \
-H "Content-Type: application/json" \
-d '{"dimensions":["orders.status"],"metrics":["orders.total_amount","orders.order_count"]}'
Run a structured query as Arrow IPC:
curl -s http://localhost:4400/query \
-H "Authorization: Bearer secret" \
-H "Accept: application/vnd.apache.arrow.stream" \
-H "Content-Type: application/json" \
-d '{"metrics":["orders.order_count"]}' \
> result.arrow
Execute rewritten SQL over HTTP:
curl -s http://localhost:4400/sql \
-H "Authorization: Bearer secret" \
-H "Content-Type: application/json" \
-d '{"query":"SELECT status, total_amount FROM orders ORDER BY status"}'
定位明确的MCP工具,解决多格式指标兼容痛点。支持丰富格式和数据源,代码质量和文档需加强。适合大型数据团队采用。
该工具使用 AGPL-3.0 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ AGPL 3.0 — 最严格的 Copyleft,网络服务端使用也需开源,SaaS 使用受限。
AI Skill Hub 点评:Sidemantic指标层 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | sidemantic |
| 原始描述 | 开源MCP工具:The universal metrics layer. Compatible with 15+ formats: Cube, MetricFlow, Look。⭐92 · Python |
| Topics | 指标管理数据分析MCP工具数据工程多格式兼容 |
| GitHub | https://github.com/sidequery/sidemantic |
| License | AGPL-3.0 |
| 语言 | Python |
收录时间:2026-05-23 · 更新时间:2026-05-30 · License:AGPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端