rei-meta-mcp
rei-meta-mcp
连接器群之上的元层。将各个 MCP 连接器视为对象,将访问对象的路径视为射,并处理其结构。
Phase 1 的唯一实用目的是一致性检查 (coherence check) — 机械地比对指向同一对象的多个来源之间的内容是否一致。
为什么做这个
2026-08-19,在 rei-memory-mcp 的实现过程中,发现 SEED_KERNEL 在 1,677 vs 1,675 上偏差了 11 天而未被察觉。之所以能发现,是因为人类偶然对比了两个数字,机器没有检测手段。
这个连接器的第一项工作,就是让机器先发现这类问题。详见 docs/incident-2026-08-19.md。
Related MCP server: MCP Discovery Server
提供的 tool (3 个)
meta_list_sources(object_name?: str)
枚举已注册的 source,并返回各自的到达状态、数量、git HEAD 哈希(作为 freshness 的线索)。
meta_check_coherence(object_name: str, detail: bool = False)
比对指向同一对象的 source 的指纹,返回以下 verdict 之一:
verdict | 含义 |
| 所有可达 source 的指纹一致 |
| 可达 source 之间存在不一致 |
| 可达 source 为零 |
| 仅有一个可达 source(无法比较) |
§4 核心规则:“未到达”不等于“一致”。unreachable 和 single_source 始终作为警告被 surface。
detail=True 时返回不一致 ID 的实际列表(最多 100 条)。
meta_compose(from_source: str, to_source: str)
Phase 1 仅进行 registry 内 output_schema / input_schema 字符串比对。实际 schema 推断在 Phase 3 及以后。
Phase 1 不做的事
自动修复(有意排除。哪个正确由人类判断)
检查历史的持久化(Phase 2)
schema 推断(Phase 3)
函子、伴随、单子等范畴论结构(需要时再说)
当前已注册的 source
参见 config/sources.example.yaml:
source | kind | 状态 |
|
| full fingerprint ( |
|
| partial fingerprint (通过 subprocess 启动 |
|
| 通过 claude.ai remote-devices 的 deploy 无法从 Python 直接 probe — 始终明确标记为 |
Install & 使用
uv pip install -e ".[dev]"
cp config/sources.example.yaml config/sources.yaml # パスを埋める
uv run pytest # 全 PASS を確認
uv run rei-meta-mcp # stdio で MCP server 起動registry 的路径可通过环境变量 REI_META_MCP_REGISTRY 覆盖。
Honest scope
仅检测,不修复 — 不将判断交给机器
partial fingerprint 的 source (mcp_stdio) 之间的一致,只是“没有不一致”的确认,而非“完全一致”的证明(存在
content_hash级别看不到的部分)范畴论术语只承担 5 个(对象、射、等化子、合成、恒等射)。其他避免使用
当前是 3 个 source 的 Phase 1 spike。对象越多,价值越大的结构
Phase 2(历史、定期执行、通知)和 Phase 3(schema 推断、射的泛化)在 Phase 1 实际运行有效后再决定
License
AGPL-3.0-or-later.
相关
docs/incident-2026-08-19.md— 事故记录tests/test_incident_2026_08_19.py— 复现事故的测试
Available Tools
3 toolsmeta_check_coherenceB
Check whether all sources for object_name agree.
Verdicts: coherent | divergent | unreachable | single_source. §4: unreachable/single_source are warnings, not silent success.
Inputs: object_name (required), detail. Returns: object
meta_composeA
Check whether the output of from_source can feed to_source.
Phase 1: declarative schema string match only.
Inputs: to_source (required), from_source (required). Returns: object
meta_list_sourcesA
List registered sources with current reachability and freshness.
Inputs: object_name. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinct responsibility: listing registered sources, checking source agreement for an object, and validating source-to-source composability. There is minimal overlap, and the differing parameters make selection unambiguous.
All tools use the `meta_` prefix with an imperative snake_case verb (`list`, `check`, `compose`), giving a predictable convention. The slight variation in whether an object follows the verb does not hurt recognizability.
Three tools is a compact but appropriate scope for a focused metadata validation server. Each tool provides a distinct high-level capability with no redundancy.
The set covers the core discovery and validation workflows: enumerate sources, check coherence, and test composition. It is missing broader source/object management and only performs schema-string composition matching, so there are minor gaps but no dead ends for the main use case.
Maintenance
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
One MCP URL for all your connectors — scoped writes, enforced constraints, and a full audit trail.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server for automated architectural mapping, security vulnerability detection, ML asset tracking, and code metrics in local repositories.-
- FlicenseNot gradedqualityDmaintenanceA meta-MCP server that discovers and explores other MCP servers using progressive disclosure patterns to reduce token usage by up to 99%.-
- AlicenseNot gradedqualityDmaintenanceA comprehensive MCP server that provides a graph database for tracking software codebase components, their relationships, and associated tasks/goals.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables coding agents to check documentation claims against source code, detecting drift and suggesting fixes.11 npm2MIT