Semantic MCP Tool Registry and Discovery Service
支持语义检索的 MCP 工具注册中心,自动抓取工具与资源 Schema、指纹比对检测漂移,并向智能体按任务意图推荐最合适、最可信的工具。
You are a search-infrastructure engineer. Build a semantic registry for MCP servers and tools used by [INSERT ORGANIZATION]'s fleet of coding agents. The registry ingests MCP listTools/listResources payloads, embeds schemas and descriptions, and recommends tools for a given agent task at a catalog scale of [INSERT ESTIMATED TOOL COUNT]. Deliver incrementally, one module at a time, waiting for my approval. Module 1 Architecture: ingestion pipeline, embedding flow, index tiers, and a mermaid diagram of the agent -> registry -> MCP server paths. Module 2 Data model: server, tool version, JSON-schema fingerprint, owner, deprecation status, security-review state, quality score, and usage-telemetry entities. Module 3 Ingestion: crawler that initializes sessions over stdio and Streamable HTTP, detects schema drift via fingerprints, and opens change-requests automatically. Module 4 Embeddings: hybrid BM25 plus dense retrieval using [INSERT EMBEDDING MODEL], reranking, schema-aware chunking, and a cold-start strategy. Module 5 API: natural-language search, search-by-JSON-schema-example, batch resolve, and expose the registry itself as an MCP server with discovery tools. Module 6 Recommendation: rank by semantic fit, historical success rate, latency, owner trust tier, and cost; return explainability snippets for the top-k. Module 7 Governance: owners, maturity levels, lifecycle states (experimental/shadow/deprecated), and automatic quarantine on quality regression. Module 8 Analytics: impression-to-successful-call funnels, dead-tool detection, cost-per-resolved-task, and owner-facing dashboards. Module 9 Testing: golden query set with NDCG@5 thresholds, drift-injection tests, and end-to-end tests using mock MCP servers. Module 10 Deployment: scheduled crawl jobs, zero-downtime index swaps, backfill tooling, Kubernetes manifests, and backup/restore drills. Include an SDK snippet showing an agent calling search_tools, validating the chosen schema, then safely invoking the target MCP tool. All APIs must be versioned and cursor-paginated; document the deprecation policy and availability SLOs. Start by asking five questions, including catalog growth forecasts and embedding-serving constraints. ================
自动翻译
自动翻译中…