dimctx
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@dimctx analyze dt_batch: is it a fact or dimension table, and what's the grain?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
dimctx
dimctx = dimensional modeling context provider 一个本地 MCP server,让你的 AI 编码助手在写数仓代码时拥有维度建模的判断力。
它解决什么
AI 写 SQL/DDL 时会瞎编建模决策:分不清事实和维度、猜不准粒度、不知道哪些维度该跨表一致。
dimctx 把这些判断交给确定性引擎 + 你自己的方法论语料。
五个工具:
工具 | 作用 |
| 判定表角色(fact/dimension)、粒度键、SCD 建议、总线矩阵格值 |
| 检索你自备的建模语料(本地 markdown) |
| 总线矩阵查询(单表格值 / 单维度实现 / 全库概览) |
| 度量下游取数复杂度(CASE WHEN / JOIN 深度 / 子查询 / 聚合嵌套) |
| 一致性事实检查:同名度量在多张事实表出现时,定义/单位/过滤/时间口径必须完全一致;不兼容则按原典须改名 |
Related MCP server: Grounded Code MCP
三步接入
# 1) 配置(可选,缺省也能跑:只是语料检索为空)
export DIMCTX_ATLAS=/path/to/atlas.json # 工程表图谱(可选)
export DIMCTX_CANON_DIR=/path/to/markdown # 你自备的建模语料(可选)
# 2) 在 IDE 的 MCP 配置里加一条
# VS Code (mcp.json) / Cursor (.cursor/mcp.json) / Continue (config.yaml)
{"command": "uvx", "args": ["dimctx"]}
# 3) 让 AI 用它
# 「用 dimctx 看看 dt_batch 是什么表、粒度是什么」数据边界(重要)
纯本地 stdio:无网络出口、无遥测、无云服务、不做托管;
不打包任何第三方内容:语料由你自备(详见
docs/DATA-POLICY.md与NOTICE);未配置语料时
search_canon返回空并提示配置,不会报错、不会联网索取。
开发
uv run --with pytest --with pydantic python -m pytest tests/ -q # 19 passed许可
代码 AGPL-3.0-or-later(见 LICENSE)。本项目与 Kimball Group 无关联、未获其背书; 文档中提及 Kimball 方法论属指名性合理使用(nominative fair use)。
Available Tools
5 toolsanalyze_tableA
判定一张表的角色(fact/dimension)、粒度键、SCD 建议与总线矩阵格值。
Args: table: 图谱中的表名(如 dt_batch)。与 ddl 二选一。 ddl: CREATE TABLE 文本(table 不在图谱时使用)。
Inputs: ddl, table. Returns: result
bus_matrixA
查询总线矩阵:单表全部格值 / 单维度实现表 / 全库概览。
Args: table: 表名(返回该表各维度格值)。 dim: 维度概念名(如 supplier,返回全部实现表+类型一致性)。
Inputs: dim, table. Returns: result
check_conformed_factsA
一致性事实检查:同名度量在多张事实表出现时,定义/单位/过滤/时间口径必须完全一致;不兼容则按原典须改名。
Args: facts: 各处定义列表,每项 {"name","table","definition","unit","filter","time_basis"}。 table: 可选,只看该表。
Inputs: facts (required), table. Returns: result
measure_sqlB
度量下游取数复杂度(CASE WHEN / JOIN 深度 / 子查询层数 / 聚合套聚合)。
Args: sql: 待检查的 SQL 文本。
Inputs: sql. Returns: result
search_canonB
检索本地自备的 Kimball 方法论语料(原典 markdown)。
Args: query: 检索词(中英文均可,如 "slowly changing dimension")。 limit: 返回条数上限(1-20)。
Inputs: limit, query. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools have clearly distinct purposes: analyze_table for table role/grain/SCD analysis, search_canon for methodology lookup, bus_matrix for querying existing matrix data, check_conformed_facts for fact consistency, and measure_sql for SQL complexity. There is minor overlap between analyze_table (which suggests bus matrix cell values) and bus_matrix (which retrieves them), but the descriptions differentiate them adequately.
All names use snake_case and four of five follow a verb_noun pattern (analyze_table, search_canon, check_conformed_facts, measure_sql). The exception is bus_matrix, which is noun-only, but the overall convention remains predictable.
Five tools is well-scoped for a focused Kimball dimensional modeling assistant. Each tool covers a distinct analytical operation without redundancy or excessive surface area.
The surface covers core dimensional modeling workflows: table analysis, methodology retrieval, bus matrix queries, conformed fact checks, and SQL complexity measurement. Minor gaps remain, such as explicit conformed dimension checking or SCD implementation guidance beyond what analyze_table provides, but these are manageable workarounds.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP Spec Compliance MCP — audits any MCP server.json against the official Model Context Protocol
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Related MCP Servers
- AlicenseAqualityDmaintenanceLocal MCP server for AI Model Manager that captures SQL data-model metadata and exposes it to MCP clients over stdio.2MIT
- AlicenseNot gradedqualityCmaintenanceA local MCP server that gives AI coding assistants retrieval access to your personal knowledge base of books, standards, and docs, grounding their answers in sources you trust.MIT
- FlicenseNot gradedqualityCmaintenanceModel Context Protocol (MCP) server that gives AI assistants a safe, correct data-analyst capability over business metrics - without raw SQL improvisation.-
- FlicenseAqualityDmaintenanceA static, read-only MCP server that exposes a database knowledge base (schema, relationships, workflows, and reasoning patterns) so Claude Code / Copilot can reason about a database without a live connection.10-