Skip to main content
Glama
akashmanjini

MCP Data Catalog Server

by akashmanjini

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 中的真实 mcp SDK 服务器上。

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/

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables 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.
    -
  • A
    license
    B
    quality
    C
    maintenance
    Enables discovery, governance, access, and publishing of data products in an internal data marketplace, with integration for Cloudera AI Workbench and Apache Atlas.
    16
    Apache 2.0
  • A
    license
    A
    quality
    C
    maintenance
    Enables 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.
    7
    1
    MIT