known-path
A lightweight MCP server that activates only trusted catalog assets for a data job, performs trust checks, and generates SQL artifacts.
README
<p align="center"> <img src="assets/logo.svg" alt="known-path logo" width="560"/> </p>
<p align="center"> <strong>Light only the trusted catalog assets for a data job — then leave the route behind.</strong> </p>
<p align="center"> <a href="https://github.com/SeraKah-1/known-path/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg" alt="License"/></a> <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python"/></a> <a href="https://datahub.devpost.com"><img src="https://img.shields.io/badge/DataHub-Agent%20Hackathon-0f766e.svg" alt="Hackathon"/></a> <a href="https://datahubproject.io"><img src="https://img.shields.io/badge/built%20for-DataHub-orange.svg" alt="DataHub"/></a> <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-tools-black.svg" alt="MCP"/></a> <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs welcome"/> </p>
<p align="center"> <a href="#quickstart">Quickstart</a> · <a href="#how-it-works">How it works</a> · <a href="#demo">Demo</a> · <a href="#mcp--agents">MCP & agents</a> · <a href="#hackathon">Hackathon</a> · <a href="docs/HACKATHON.md">Compliance</a> </p>
Why this exists
Data catalogs already know which table is canonical, which is deprecated, and who owns it.
Agents still thrash search and join the wrong revenue_* table.
known-path is a small activation layer on top of that catalog truth:
- Load a short route sheet for the job
- Light only the few assets that matter
- Stop if trust is red (no invented replacements)
- Emit SQL you could open a PR with
- Write a route note so the next run starts smarter
Built for the DataHub Agent Hackathon — tracks Metadata-Aware Code Generation and Agents That Do Real Work.
<p align="center"> <img src="assets/demo-flow.svg" alt="Demo flow" width="820"/> </p>
How it works
flowchart LR
A[Job intent] --> B[Route sheet]
B --> C[Score & shortlist]
C --> D{Trust check}
D -->|red| E[Fail closed<br/>leave block note]
D -->|green| F[Fetch detail<br/>budgeted]
F --> G[SQL artifact]
G --> H[Write route note<br/>back to catalog/files]
subgraph Catalog truth
DH[(DataHub GMS<br/>or fixture stand-in)]
end
C -.-> DH
F -.-> DH
H -.-> DH
| Mode | Behavior |
|---|---|
| baseline | Naive name thrash — more fetches, often lights finance.revenue_old |
| known-path | Route sheet + trust — lights canonical + region only |
| blocked | Forces red trust — stops, does not invent a table |
This is not a second catalog, not a lineage UI, and not “dump all metadata into the prompt.”
Quickstart
git clone https://github.com/SeraKah-1/known-path.git
cd known-path
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
kp doctor
kp demo
Artifacts land in:
examples/baseline_wrong.sql
examples/revenue_by_region.sql
examples/runs/last_*.json
examples/runs/writeback_route_note.md
Optional live DataHub
export DATAHUB_GMS_URL=http://localhost:8080
export DATAHUB_GMS_TOKEN=your_token
kp doctor
See also: DataHub Quickstart · DataHub MCP · DataHub Skills
Web workbench (enterprise UI)
No extra deps (stdlib server). Every button runs the real CLI (python -m known_path.cli …).
kp web
# or:
python -m known_path.webapp --host 0.0.0.0 --port 8088
# open http://127.0.0.1:8088
| Panel | What you get |
|---|---|
| Job intent + CTAs | Baseline / Known path / Fail closed / Full demo |
| Activation graph | SVG nodes lit from last CLI plan |
| Fetch comparison | Honest shared-axis bars (baseline vs known-path vs blocked) |
| Catalog table | demo-finance assets + usage bars |
| Agent terminal | Type run known-path, demo, doctor — bridged to CLI |
kp dataset # list assets + path
UX notes: docs/UX_AND_RESOURCES.md
Demo
kp demo
Expected story:
| Step | Result |
|---|---|
| Baseline | Higher fetch count; trap table can activate |
| Known path | finance.revenue_canonical + dim.region; fewer fetches |
| Blocked | Status BLOCKED_TRUST; no SQL invention |
kp run --mode baseline -i "revenue by region last quarter"
kp run --mode known-path -i "revenue by region last quarter"
kp run --mode blocked -i "revenue by region last quarter"
Sample SQL (generated):
-- known-path generated SQL
-- job: job.revenue_by_region_quarter
-- fact_urn: urn:li:dataset:(urn:li:dataPlatform:snowflake,finance.revenue_canonical,PROD)
SELECT
d.region_name AS region,
SUM(f.revenue_amount) AS revenue
FROM finance.revenue_canonical AS f
JOIN dim.region AS d
ON f.region_id = d.region_id
...
MCP & agents
Install MCP extra and run the server:
pip install -e ".[mcp]"
python -m known_path.mcp_server
Tools: match_job · activate · ping_required · commit_route · explain_last_run
Skill package: skills/known-path/SKILL.md — workflow instructions agents load on demand (pairs with tools, does not replace them).
Example Cursor / Claude MCP snippet:
{
"mcpServers": {
"known-path": {
"command": "python",
"args": ["-m", "known_path.mcp_server"],
"cwd": "/path/to/known-path"
}
}
}
Project layout
known-path/
├── assets/ # logo + diagrams
├── cards/ # route sheets (YAML)
├── datasets/demo-finance/ # demo catalog.json + CSV samples
├── docs/HACKATHON.md # Devpost compliance map
├── docs/demo-recording/ # recorded demo video + evidence
├── examples/ # SQL + run records
├── skills/known-path/ # agent skill
├── src/known_path/ # library + CLI + MCP + web
├── apps/web/ # optional FastAPI wrapper
└── tests/ # real scoring/activation tests
Hackathon
| Event | datahub.devpost.com |
| Compliance | docs/HACKATHON.md |
| License | Apache-2.0 |
| Video script | docs/demo-script.md |
Remaining human step: record the <3 minute YouTube/Vimeo video and complete the Devpost form (not automated here).
Development
pip install -e ".[dev]"
pytest -q
Core policy lives in pure functions (scoring.py, ping.py, activate.py) so tests exercise the real logic with trap-vs-trusted fixtures.
Links
License
Copyright 2026 SeraKah-1
Licensed under the Apache License, Version 2.0.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。