requirement-asset-recommender
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@requirement-asset-recommender根据需求‘分析会员复购行为,需用户ID、订单数、支付金额’推荐匹配的数据表"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
需求 → 数据资产 智能匹配系统
FastAPI · BM25 + vector hybrid retrieval · cross-encoder re-ranking · agentic closed loop with a calibratable adjudicator · MCP
The system accepts natural-language requirement descriptions, requirement screenshots, or Excel files of any arbitrary layout, matches usable tables in the data asset catalog, and outputs recommended solutions with field-level justification.
The matching process is an agentic closed loop, not a one-way call. After each retrieval round, the adjudicator evaluates every candidate asset's relevance to the requirement (relevant / partially relevant / irrelevant); when the threshold is not met, the system autonomously picks a corrective action based on diagnostic conclusions drawn from the intermediate retrieval state and re-retrieves. If the catalog truly contains no asset that can support the requirement, it outputs a cannot be supported verdict with evidence rather than filling in near-matches. Users may after the returned results, and the system continues to iterate while retaining all prior adjudication context.
智能体闭环 (Agent Loop)
自我审阅 (Self-Review)
After each retrieval round, the adjudicator determines the relevance of each candidate to the requirement (relevant / partial / none), the code aggregates these verdicts into a score and compares it against the threshold; if the threshold isn't met, the system enters corrective mode.
match(检索)→ judge(逐条判相关性)→ 达标?
├ 是 → 交付
└ 否 → 选纠偏动作 → 重新检索 → 再判自主纠偏:
Correction actions come from a fixed list; the permission boundary is enforced by the code, not by "prompt self-discipline":
可自主调整 (Autonomously adjustable) | 不可触碰 (Can nonther, not be touched) |
更换检索主题词 (Change retrieval subject terms) | 用户显式设定的过滤条件(周期 / 层级 / 域) (User-implicit filter conditions: period / layer / domain) |
调整检索参数(召回条数、精相比/Top、精排深度、各路权重) (Tune retri parameters) | 方案接受阈值 τ、判决门槛 (Solution acceptance threshold τ, adjudication threshold) |
放宽系统自行推断的过滤条件 (Relax system-inferred filters) | 用户勾选的必填字段 (User-checked required fields) |
调取原始输入重新审阅 (re-review the raw input) | — |
Opening the adjudico threshold is equivalent to letting the model lower the acceptance bar so that results "pass" and nullifying the cannot be supported verdict. It is therefore not whitelisted and is instead constrained by tests.
归因有据 (Evidence-Based Attribution)
Before correction, the code computes an evidence-backed diagnostic conclusion from the intermediate retrieval state and files it to the adjudicator. The same symptom can often have two causes requiring opposing remedies; the role of the diagnosis is to distinguish those two:
现象 (Symptom) | 病因 A (Cue A) | 病因 B (Cue B) |
候选池过小 (Candidate pool too small) | 召回不足 → 调整参数 (Recall too short → adjust parameters) | 过滤过严 → 放宽推断条件 (Filter too strict → loosen inferred) |
覆盖面普遍偏低 (coverage generally low) | 抽取有误 → 正确 (field extraction errors → fix extraction) | 目录确实缺失 → 判定无法支撑 (catalog truly lacks → verdict cannot be supported) |
多轮协作 (Multi-Round Collaboration)
解析后核对 (Post-parse confirm): The extracted results are but returned, then confirmed by the user before retrieval starts — the cheapest correction point sits at the very front of the chain.
结果后追问 (Post-result follow-up): When the user raises correction comments, the agent continues with all previous context, without resetting the conversation.
会话持久化 (Session state): Session state is persisted to disk;
session_idremains valid after a service restart.
可审计、可中断 (Auditable and Interuptible)
Every step logs action / reason / verdict / effect (the action taken, the rationale, the literal verdict text, and the before/after delta) and returns them with the result. The first action is always a full retrieval, so any interruption still yields a deliverable; the worst case is equivalent to pure retrieval. Long-running tasks support cooperative cancellation.
判决器须先标定 (The Adjudicator Must First Be Calibrated)
Before entering the automated decision chain, the adjudicator must be measured against a manual gold standard for its agreement with the true ordering of candidate quality (Cohen's κ), and κ > 0.6 is required before it any automated use. After changing the model, the prompt, or the scoring rules, calibration must be redone.
Related MCP server: MCP RAG Agent Server
自主优先级推荐
Relevance and asset priority (ordered status, asset type, data-warehouse tier are on different dimensions; directly blending them needs manual grade, and weights become stale as the data distribution shifts. The system instead uses adaptive natural-break bins + within-bin lexicographic order; bin width is data-determined:
Estimate the just-noticeable difference (JND): Take the median ρ of the positive gaps in the relevance list sorted descending for this query, answering "how large is the typical score gap for this query's candidates?".
Cut at natural breaks: From the current highest score extend downward until a significant gap of
gap > gap_factor × ρappears and only then cut. Tight clusters (near-ties) are not split — within such a cluster the order falls to system priority; a marked gap gives relevance control.Hard order within a bin: Select by lexicographic comparison over [priority worst-first vector, relevance, coverage, fewer tables]. For a combination plane, the bin is the lowest bin among its members, so a single high-tier table cannot inflate lower-tier members.
Bin width adapts to the data, not to a preset vocabulary of query shapes — “what the user asks” assigned to hard-coded if-else is the same jitter as manual hand weights.
Priority levels are synthesized lexicographically from "is already ordered + asset type + warehouse tier"; every mapping is from the config:
# config/config.yaml → matching.ranking.priority
ordered_rank: 6 # 已订购(由订购清单 vlookup 标记,最高档)
asset_type_rank: {...} # 资产类型 → 档位
layer_only_types: [...] # 仅这些类型内部再按数仓层级细分
layer_rank: {DWA: 5, DIM: 5, DWV: 4, DWI: 3, ODS: 2, STG: 1}# config/config.yaml → matching.layering
gap_factor: 2.0 # 间隙达 JND 几倍算断层:越大同档越宽,越偏向优先级
min_jnd: 0.02 # JND 绝对下限,仅兜底分数全等 / 单点等退化情形其它能力
能力 (Capability) | 说明 (Explanation) |
任意版面解析 | Text / screensshots (vision-model transcription) / Excel (arbitrary layout) all share one entry; region partitioning is split by pure code through 5-level graceful degradation, so even an unprecedented layout still yields output |
混合检索 | Loop (BM25), dense-semantic and field-verted index three-path recall → RECIP blown → cross-encoder re-ranking; segmented embedding the top-2 pooling keep table-name semantics from being diluted by large numbers of listed fields |
组合方案 | When a single table is insufficient, greedily combine any share key |
三种接入 | Web UI / REST API / MCP (six tools + async tasks + co-operable cancel) |
自动降级 | With no GPU or weights missing, degrade to available resources, quality drops but the pipeline never breaks; degraded module reports via |
快速开始
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# 可选:安装后启用语义召回 / 精排 / 本地大模型;未安装则自动降级为词法检索 + 规则解析
pip install sentence-transformers
pip install torch --index-url https://download.pytorch.org/whl/cpu
python -m uvicorn src.api.app:app --host 127.0.0.1 --port 8001Web UI at http://127.0.0.1:8001. API call usage:
# 一步式:解析 → 检索 → 自我审阅 → 交付
curl -X POST http://127.0.0.1:8001/api/agent/run \
-F "text=分析会员复购行为,需要用户ID、订单数、支付金额"
# 多轮:对上一轮结果提出修正意见,携带历史继续纠偏
curl -X POST http://127.0.0.1:8001/api/agent/resume \
-F "session_id=<上一轮返回的 session_id>" \
-F "feedback=当前结果不符合预期,需要履约时效相关的资产"The example catalog ships with the repo (in data/samples/; 3000 tables covering transaction, user, product, fulfillment, market, service, risk, risk, content, location, finance — ten business domains), with no extra data prep; it also runs okay on a CPU-only environment.
The first call builds retrieval indices and loads the models — expecting a minute or two on CPU for 3000 tables; the index persists to data/.cache/, and afterwards hits content-digest cache so a restart doesn't rebuild.
换成自有数据
The system does not hard-code assumptions about what type of object it can "recommend". As long as the data can be organized into "entry + attribute list + description", it works — data tables, doc repos, products, APIs, knowledge entries all fit. No change is needed for retrieval, ranking, or the agentic bone.
1. 必换:目录数据
Get a CSV in the same structure (sample: data/samples/tassets.sample.csv):
| 列 (Column) | 作用 (Role) | 等效于 (Equivalent object) |
|---|---|
| <code> | 唯一标识 | 文档 ID / 商品 / API 名 |
| 表名 | Display name + matches | 文档标题 / 商品名 |
| 字段中文名 | attribute list (|-分割), the basis of field-level matching | 文档章节 / 商品 attribute 平台 / API 参数 |
| 业务分类名称 | used for segment-encoding | own category scheme (一级/二级) |
| 模型概述 | description text, primary basis of semantic recall | summary/简介 |
| 技术口径 | supplementary note | rule-of-thumb / update freqency |
| 周期 / 层级 / 数据域 | the three hard filters | any tri enum dimensions; leave empty if don't filters |
| 是否上架 / 资产类型 | business priority + filter | fixed value when no direct analog |
| 系统名称 / 库名 / barangon-line 是否UCX | ownership and flags | fixed value acceptable |
# config/config.yaml
data:
assets_file: data/自有目录.csv # 默认按 gb18030 读取Default source encoding is assumed
gb18030. For UTF-8 files either transcode or edit the read encoding insrc/data_loader.py— that is the only encoding-coupled point in the codebase.
Enum values must agree with the ranking logic. The 资产类型 / 层级 / 周期 columns join priority ranking and hard filter; each new value must be in the mapping list or the row hits the lowest rank or is never filtered in:
列 (Column) | 值 must match (whose keys?) | If not (consequence) |
|
| tier recorded as 0, all known types outrank |
| the same row in | sub-layer ordering disabled (only affects |
|
| \ |
After you replace with your own catalog, either add your values to the mapping tables above or normalize the data to existing values — pick one. 数据域 must keep a consistent granularity; cofferels and smaller intermingle cause domain filtering to miss semantics. The repo's sample catalog already abides by this.
ordered_rank (is-ordered) depends on manifest by data.ordered_file; this sample config does not ship the manifest so the order rank can't trigger; it will take effect once you supply your own ordered list.
2. 建议更换:四份领域词表 (Recommended: four domain vocabularies, directly change quality)
文件 (File) | 作用 (Role) | 沿用示例对 (Effect of keeping sample) |
| 同义词slyable — between user phrasing and the catalog's naming | cross-naming recall drops significantly |
| colloquial aliases → canonical term (e.g., "物流轨迹" → "物流轨迹") | hit rate on query lows |
| category → suggested kw eras from category and name | categorization accuracy drops |
| domain proper noun list so tokenization does not split them | long proper nouns can be over-splited |
Only the synonyms file's location is via data.synonyms_file; the other three routes are hard-coded in pipeline.py and normalize.py — just replace contents in place. The four in this repo are bootstrap-size only (8 synonym imaples, 64 categories list, 67 terms), expand for your own business.
The synonym list is its best value. Format is {"规范词": ["别名1", "别名2"]} — group the same concept under the catalog spelling used back, there are dozens of high-frequency concepts to quickly matter.
3. 可选:替换解析提示词中的示例
src/matching/extractor.py and/or so-called src/matching/llm_parser.py, the prompt sample legs define "what is a need, what a field". These examples are domain samples no decision branch; but with a very different field, two-to-three use your domain to raise largely parse quality.
4. 更换后必须重新标定 (Re-calibrate)
语义阈值:
field_match.retrieve_min_sim/min_ceare model dependent and shift with the embedding/domain lexicon. Pick about a dozen "truly synonymous" and "uncorrelated" fields from your domain, and split the two distributions at the score mean.判决器 κ:著 aversion uses domain semantics — oracle numbers from another domain don't transfer. Measure Cohen's κ on a domain-labeled set again still > 0.6 before automated use.
评测集 (eval set) the repo doesn't include a gold test; for your data it's a must to build this baseline, cross-domain numbers are not comparable.
三种接入 (三种接口)
Web (UI): single-page at
/: describe → confirm draft → generate plan → the exporter of excel; repeat our edits and table cancellation.REST:
/api/agent/run(one-shot),/api/agent/resu(multi-round follow-up),/api/atch(pure retrieval),/api/parse+ confirm (two-step); file-containing requests get automatically converted to async tasks with cancellation support.MCP: The
/cpAPI exposes six tools (parse_queries/revise_draft/match_assets/refine_results/submit_feedback/list_ast_facets) + async tasks + collaborative cancellation, even in a conversation platform auto-detect.
Full API contract: docs/API接口文档.md.
文档 (Docs)
文档 (Document) | 内容 (Contains) |
| The full-chain journey from request perspective (one —Request time order) |
| Full contract for REST/API, MCP, async tasks, and authentication |
| Model weights & cache documentation |
| Engineering conventions & change norms |
工程原则 (Engineering Principles)
Let the semantic decisions live in the model, mechanical segmentation in the code; do not hard-code assumptions about various requirement doc layout; make no doc-form assumption.
Do not degrade silently: truncators, dis, dis missed, and framing are all reported to
/api/health/ the teletry.An adjudicator must be calibratied before it enters an auto decisions-chain. Any enab ing line is a config change only, code unchanged.
Every bug fixed must be paired with a regression test and its original root cause recorded.
说明 (Note)
This repository provides reusable methods and an engineering backbone. The bundled catalog is a synthetic, general-purpose sample (3000 tables, aligned in structure and statistical distribution with actual production catalogs); phrase/vocabulary word lists and evaluation sets are shipped fully after desensitization. No business-specific catalog is included — swap in your own and run.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnterprise-grade MCP server with multi-agent system for business AI transformation across finance, healthcare, retail, and other domains. Provides specialized AI agents for data analysis, API execution, business validation, and report generation with real-time monitoring and observability.
- FlicenseNot gradedqualityDmaintenanceThis MCP server enables intelligent API testing automation by combining RAG knowledge retrieval with tool execution capabilities. It allows QA engineers to perform natural language-driven API testing with contextual knowledge support.
- AlicenseNot gradedqualityDmaintenanceMCP server for fal model discovery, execution, pricing, and local media processing, enabling AI model workflows via natural language.108MIT
- FlicenseNot gradedqualityDmaintenanceMCP server exposing portfolio AI tools including semantic search, evaluation framework, and prompt management, enabling natural language interaction with these services via Claude Desktop.
Related MCP Connectors
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for AI access to Swagger by SmartBear.
GibsonAI MCP server: manage your databases with natural language
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/14shi/requirement-asset-recommender'
If you have feedback or need assistance with the MCP directory API, please join our Discord server