MCP Data Catalog Server
MCP Data Catalog Server
一个 MCP 服务器,通过一个合成企业数据目录暴露工具:资产搜索(支持可组合的 AND/OR 过滤器 DSL)、lineage、sample data、profiling、history、quality rules,以及 AI 驱动的分类(CDE 检测、PII 标记、业务术语生成)。
独立、从零开始重新实现我在专业环境中构建的系统设计——合成目录数据,不包含任何专有业务逻辑,仅用于作品集/演示目的。与任何雇主或客户无关,也不包含其任何代码或数据。
它展示了什么
可组合的 AND/OR 过滤器 DSL(
src/catalog/filter_dsl.py)——资产搜索接受嵌套的{"and": [...]}/{"or": [...]}过滤器树,而不是固定的查询参数集,因此调用方可以表达任意布尔组合的字段谓词,而无需工具模式随用例增长。启发式优先分类,AI 回退(
src/catalog/classification.py)——关键数据元素(CDE)检测首先运行廉价启发式(名称/类型模式匹配),仅在启发式不确定时才调用(存根)AI 分类器;PII 标记完全由 AI 驱动,基于资产元数据。业务术语生成,并通过治理启发式验证(
src/catalog/business_terms.py)——候选术语通过嵌入的余弦相似度与目录资产匹配,然后通过治理规则(命名约定、域允许列表)过滤,再发布。MCP 工具表面(
src/tools/)——搜索、lineage、sample data、profiling、history、quality rules、CDE 分类、PII 分类和业务术语生成,注册在src/server.py中的真实mcpSDK 服务器上。
Related MCP server: Glossary MCP Server
运行它
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
python -m src.main服务器通过 stdio 运行,可添加到 MCP 客户端(例如 Claude Desktop 或 Claude Code)配置中,指向此目录下的 python -m src.main。所有目录数据均为合成数据,并在进程内生成——无需外部数据库。
pytest项目布局
src/
main.py # entrypoint
server.py # MCP server + tool registration
catalog/
store.py # in-memory synthetic catalog
models.py # Asset, LineageEdge, QualityRule
filter_dsl.py # AND/OR filter tree evaluator
classification.py # heuristic-first CDE + AI-driven PII
business_terms.py # embedding similarity + governance validation
tools/
search.py, lineage.py, sample_data.py, profiling.py,
history.py, quality_rules.py, classification_tools.py,
business_term_tool.py
tests/This server cannot be deployed
Maintenance
Related MCP Connectors
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Cross-tool context for your data stack. Search, lineage, and impact across warehouse and BI tools.
Software component catalog: search your org's services, docs, APIs, dependencies, and ownership.
Search, sample and query open reproducible datasets published as immutable Parquet with schemas.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search, explore data lineage, understand business context, and generate SQL queries across an organization's data ecosystem.Apache 2.0
- -licenseNot gradedqualityNot gradedmaintenanceEnables semantic search and exploration of a business glossary knowledge graph, allowing users to query terms, expand related concepts, trace dependencies, and resolve physical table mappings.-
- AlicenseBqualityCmaintenanceEnables discovery, governance, access, and publishing of data products in an internal data marketplace, with integration for Cloudera AI Workbench and Apache Atlas.16Apache 2.0
- AlicenseAqualityCmaintenanceEnables querying Tableau lineage through the Metadata API via MCP, supporting impact analysis, where-used lookups, and content search. Provides read-only tools for answering natural-language questions about workbooks, datasources, fields, and dependencies.71MIT