
Mini Data Engine Runtime Copilot
io.github.kroq86由 GitHub 账号 kroq86 发布v0.1.12更新于 Oct 24, 2026
MCP runtime copilot for health checks, regressions, explainability, and operational memory.
概览
一个本地 MCP 运行时副驾驶,为数据系统实验环境提供引擎状态工具、追踪运行解释、回归套件和操作记忆。
- 可以做什么
- 将可运行的类 PostgreSQL 和类 Databricks 数据系统实验环境封装为 MCP 接口,提供约 47 个工具。它暴露引擎操作,如初始化存储、插入或更新行、创建索引和解释查询计划,还提供追踪运行解释、回归套件、健康检查、基准测试和操作记忆搜索。此外还提供通用项目状态、启发式方法和模式评估工具。
- 适用场景
- 适合数据工程师、平台工程师以及构建入门实验或研讨会的团队,希望通过 AI 客户端检查存储、查询计划和写入路径内部机制。它适用于可解释性和回归检查工作流,而非生产数据操作。
- 运行要求
- 作为本地进程通过 stdio 运行,以 GHCR 上的 OCI 镜像打包。README 列出实验演示需要 Python 3.10+ 和 Rust/Cargo,打包的 MCP 服务器需要 Docker。未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Mini Data Engine Runtime Copilot,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Interactive Data Systems Lab
Runnable Python and Rust data-system internals with an MCP-native runtime copilot layer.
This repository combines two things:
- a local-first engineering lab for PostgreSQL-like and Databricks-like internals,
- a Runtime Copilot MCP surface for diagnostics, explainability, regression checks, and operational memory.
Core capabilities
- Storage and planner internals: heap tables, B-tree indexing, selectivity, and plan choice.
- Persistence and replay: WAL/checkpoint style flows and deterministic state transitions.
- Workflow and write-path modeling: event-first architecture, idempotency, retry semantics.
- Explainable runtime operations: traced runs, failure summaries, regression verdicts, baseline compare.
- MCP access: machine-usable operational interface instead of ad hoc shell scripts.
Who this is for
- Data engineers learning warehouse and query-engine internals.
- Platform and infrastructure engineers teaching storage and execution fundamentals.
- Teams building onboarding labs, workshops, and demo environments.
Quick start
Requirements:
- Python 3.10+ (tested with Python 3.14)
Setup:
Run end-to-end flow:
Run core demos:
What this repository contains
mini_pg_like.py: PostgreSQL-like toy engine with heap table, B-tree index, and planner output.mini_databricks_clone.py: Databricks-like toy platform with versioning, partitions, DAGs, and events.src/bin/mini_pg_like.rs: Rust PostgreSQL-like demo.src/bin/mini_databricks_clone.rs: Rust Databricks-like demo.src/lib.rs,src/common.rs,src/pg.rs: shared Rust core modules.mcp_engine_server.py: MCP runtime adapter for diagnostics and regression workflows.
Why this exists
Most internals content stops at diagrams. This project stays runnable and inspectable:
- compare Python and Rust implementations of the same system ideas,
- trace write-path behavior with concrete events and state transitions,
- run explainable regression checks through MCP,
- turn runtime operations into a discoverable control surface for AI clients.
MCP Adapter Layer
This repo also includes a minimal MCP server that wraps the lab operations:
mcp_engine_server.py- Cursor config:
.cursor/mcp.json
Current MCP tool list for this release (47 tools total):
Engine state and runtime:
init_engineinsert_rowupsert_rowcreate_indexexplain_customerreindex_projectrun_e2e_flow
Explainability and demos:
explain_rundemo_explain_rundemo_explain_run_failuredemo_explain_semantic_failuredemo_explain_idempotency_conflictdemo_explain_concurrency_failure_stormexplain_regression_suite
Trace and retrieval:
record_tool_tracesimilar_incidentsrefresh_trace_pathrefresh_docs_pathmemory_upsertmemory_search
SLO and ROI:
health_checkbenchmark_callsscenario_load_testcapture_roi_baselinereport_drift_bugdecision_gate
Schema evaluation (verdict + report via MCP, no external Postgres):
schema_load_toolschema_explain_toolschema_evaluate_toolschema_evaluate_full_tool
Project contract and regression:
project_manifestproject_capabilitiesproject_tool_catalogproject_get_defaultsproject_run_regressionproject_capture_baselineproject_compare_baseline
Generic project state:
project_list_entitiesproject_get_entityproject_upsert_entityproject_delete_entityproject_append_eventproject_ingest_traceproject_explain_runproject_export_state
Generic heuristics:
project_list_heuristicsproject_run_heuristic
For machine-readable discovery, prefer:
project_tool_catalogproject_get_defaults
Current heuristic profiles available through project_run_heuristic:
pain_structurenaive_biasprice_distributionliquidity_signalsprice_liquidity_matrixcross_categorysale_formatspeed_signalstrust_signals
If Cursor MCP auto-discovery is enabled, restart Cursor and connect mini-data-engine.
Default MCP runtime data paths are under tests/artifacts/mcp/*.
Cursor approval setup (reduce repeated prompts)
If Cursor keeps asking for MCP or command approval on every call, apply this once:
- Enable workspace trust in Cursor user settings:
-
In Cursor, open
Settings -> Agents -> Auto-Runand set:Auto-run mode:Run in SandboxMCP Allowlist: addmini-data-enginetools you use oftenCommand Allowlist: add frequently used safe commands
-
Keep this repo opened as the same trusted workspace and reload the window once.
Notes:
- MCP server approval and per-tool allowlist behavior are enforced by Cursor security settings.
- In some Cursor versions, allowlist behavior can be best-effort and still prompt in edge cases.
Fastest way to see the new explainability use case in action through MCP:
That single tool call creates a traced run, records step-level events under one run_id,
and returns an explanation with:
- ordered timeline
- tool path
- total elapsed time
- failure summary if anything breaks
You can then replay the same explanation directly with:
Explain Regression Suite
Use explain_regression_suite when you want regression checks to run through MCP and come back as explainable run summaries instead of isolated test output.
The suite drives the current validation surface through the MCP layer, attaches run_id traces, and returns explain output for each check so regressions can be inspected with the same mechanism used for runtime incidents.
It currently runs:
- Python unit tests via
python -m unittest discover - Rust tests via
cargo test, including the currentengine_cliintegration tests health_checkbenchmark_callsscenario_load_test- explainability control demos
The explainability demos intentionally include both positive and negative controls:
demo_explain_runasexpected_successdemo_explain_run_failureasexpected_failuredemo_explain_semantic_failureasexpected_failuredemo_explain_idempotency_conflictasexpected_failuredemo_explain_concurrency_failure_stormasexpected_failure
That means the suite is not only checking that the happy path stays green. It also checks that the explain layer still classifies and summarizes known failure classes correctly.
The current regression surface covers:
- happy-path traced execution
- runtime/path failures
- semantic data validation failures
- idempotency conflict failures
- concurrency and failure-storm control scenarios
- sampled benchmark and scenario SLO regressions
Fastest MCP call for the full regression bundle:
Use it as the top-level MCP regression entrypoint when you want one answer that includes:
- which checks passed
- which failures were expected controls
- explain summaries for each traced run
- early signals that a latency or behavior regression appeared
The MCP layer is an access interface, not the core product idea. The core of the repository is the runnable lab itself.
Product note:
PRODUCT_NOTE_RUNTIME_EXPLAINABILITY.mdShort note describing the runtime explainability use case, the required signals, and theexplain_runMVP.PRODUCT_NOTE_RUNTIME_COPILOT.mdProduct framing forRuntime Copilotas an MCP-native operational brain.EXPLAIN_REGRESSION_SUITE_FEASIBILITY.mdShort article describing what this repository validated about explain-first regression suites and where the current denominator still stays narrow.
Use in Codex:
- skill package:
codex/skills/runtime-copilot/SKILL.md - automation examples:
codex/automations - guide:
docs/use-in-codex.md
Run persistent engine CLI (productization path):
What You Should See
- In
mini_pg_like.py: selective predicate switches toIndex Scan; non-selective staysSeq Scan. - In
mini_databricks_clone.py: layer-by-layer demo output, workflow DAG order/metrics, and canonical events count from the single write path. - In
mini_pg_like(Rust): same planner behavior with shared core modules. - In
mini_databricks_clone(Rust): same layered demo using shared Rust library code. - In
engine_cli(Rust): persistent snapshot + WAL replay flow with simple operational commands. - In
engine_cli tx-demo: explicit transaction scopes, snapshot reads, per-table write lock, and concurrent upsert conflict detection. - In
engine_cli tx-recovery-*: staged transaction operations survive process restarts via per-transaction journal files and can be committed or rolled back explicitly. - In
e2e_flow: one command runs write path, checkpoint, bronze->silver transform, planner explain, and DuckDB SQL validation on persisted data.
Technical Design Backbone
TECHNICAL_DESIGN_GENERIC.md captures the architectural discipline behind the code:
- cross-layer reasoning (
Idea -> API -> Runtime -> Storage -> Perf), - deterministic state transitions,
- event-first design,
- adapter contracts,
- DAG-driven orchestration,
- measurable go/no-go criteria.
It is not a separate product claim. It is the review and implementation spine used across the lab.
Docker package
Use the local build (recommended for development)
Build the image from this repo so MCP uses your local code (including schema tools) instead of the GitHub image:
This builds mini-data-engine:local. To drive another project (e.g. threads) with this MCP, set Cursor MCP to use the local image and mount that project as workspace:
- Copy .cursor/mcp.docker.local.json into your project’s
.cursor/mcp.json(or merge themcpServersentry into your Cursor user config). - Open the project you want to drive (e.g. threads).
${workspaceFolder}will be that project; the container getsWORKSPACE_ROOT=/workspaceand your project mounted at/workspace, so e.g.schema_path="schema.sql"resolves to that project’s file.
Example local config (uses mini-data-engine:local and mounts current workspace as /workspace):
Use the published image (GHCR)
Image is published to GHCR:
ghcr.io/kroq86/data-engineering-runtime-lab:latest
Pull:
Use in Cursor MCP config (example):
Loom stack
MCP surface for loom-ops and ops runbooks. Ecosystem: ECOSYSTEM.md
来源:README.md,提交 2bd48e6
工具
0版本历史
1- v0.1.12最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分