
Knowledge Fabric
io.github.invarcore由 GitHub 账号 invarcore 发布v0.1.1更新于 Nov 7, 2026
Multi-tenant hybrid RAG & evidence verification MCP server enforcing PostgreSQL RLS.
发布方自己的服务:Fabric
概览
本地 MCP 服务器,让助手对存放在 PostgreSQL + pgvector 中的文档进行混合 RAG 检索,并返回带引用的证据包。
- 可以做什么
- 以混合 RRF、词法或向量模式检索证据,返回引用、分数与各路检索健康状态
- 按 ID 或来源 URI 获取被引用的片段或整篇文档,并按租户限定范围
- 解释检索诊断信息,如词法排名、向量距离、各路延迟与融合分数
- 查看索引健康状况、来源类型与文档数量,并审计数据库一致性
- 执行数据库连通性与嵌入提供方健康检查
- 适用场景
- 适合助手需要基于已有企业文档或代码库语料给出可引用答案的场景,尤其是语料已存放在 PostgreSQL 中、且需要租户隔离与审计记录时。
- 运行要求
- 以本地进程方式通过 uvx 或 Docker 运行。需要可访问的 PostgreSQL 数据库(含 pgvector 与本项目表结构),通过 DATABASE_URL 与 KF_DEFAULT_TENANT 配置。需选定嵌入提供方:默认本地 Ollama 或 sentence-transformers,或使用 OpenAI、Cohere 并配置 OPENAI_API_KEY、COHERE_API_KEY。文档需事先完成入库。
安装
在 SourceWeft 中
- 打开 控制台中的 Knowledge Fabric,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[Knowledge Fabric & Intent Fabric]
Knowledge Fabric
Vendor-neutral, governance-first evidence retrieval for AI systems.
Native PostgreSQL + pgvector • Hybrid RRF Fusion • Cross-Encoder Reranking • Dual-Mode Multi-Tenancy • MCP-Native
[CI Status] [Invarcore Website] [Coverage: 94%] [Release] [Open in GitHub Codespaces] [License] [MCP Native] [Docker Ready]
⚡ 30-Second Quickstart
1. Instant Cloud Sandbox (Zero Local Setup)
Click to launch a fully configured browser VS Code workspace with PostgreSQL + pgvector and Tika running automatically:
2. Connect to Claude Desktop or Cursor (MCP)
Give Claude Desktop or Cursor private, local long-term memory over your enterprise codebase and documents. Add this to your claude_desktop_config.json:
3. Run Locally with Docker Compose (60 Seconds)
Why Knowledge Fabric?
The $100k/Year Dedicated Vector DB Trap vs. The PostgreSQL Reality
Most enterprise AI initiatives stall not because of model capability, but because of operational sprawl, data leakage, and ungrounded retrieval. Traditional architectures force engineering teams to introduce dedicated vector databases (Pinecone, Qdrant, Weaviate), creating a second source of truth, new vendor contracts, complex VPC peering, and $50k–$100k/year in recurring cloud spend.
Knowledge Fabric eliminates this entire infrastructure tier by running directly on your existing PostgreSQL database with pgvector HNSW indexes and native full-text search (tsvector), combined with Reciprocal Rank Fusion (RRF):
Industry Decision & Adoption Matrix
How actual CTOs deploy Knowledge Fabric across enterprise verticals:
Architecture
Quickstart & Deployment Options
Choose the consumption pathway that fits your architecture:
⚡ Pathway 1: Python Developers & MCP Users
If you are importing the retrieval engine into Python code, custom agents, or running MCP:
🐳 Pathway 2: Turnkey Evaluation (Docker Compose)
Spin up the entire multi-tenant stack (PostgreSQL + pgvector, Apache Tika, and Admin UI) in seconds:
☸️ Pathway 3: Kubernetes Deployment (Planned)
Helm chart packaging is planned. For now, deploy the Docker image directly to your cluster using standard Kubernetes Deployment + Service manifests, pointing to your external RDS / Cloud SQL instance.
[!NOTE] The
helm install oci://ghcr.io/invarcore/charts/knowledge-fabriccommand shown in earlier versions targets a Helm OCI registry that has not yet been published. Watch the releases page for the first official Helm chart release.
🛠️ Pathway 4: Local Contributor Setup
Model Provider Strategy: Zero Lock-In
Configure your preferred embedding and reranking providers with environment variables or config/settings.yaml:
Embedding Providers
Reranking Providers
Dual-Mode Multi-Tenancy
Knowledge Fabric provides two isolation layers to accommodate both lightweight development and regulated enterprise environments:
Mode 1: Application-Level Filtering (Default)
Every query and ingestion specifies tenant_id:
SQL queries automatically include WHERE d.tenant_id = %s. Requires no special database privileges.
Mode 2: PostgreSQL Row-Level Security (RLS)
For HIPAA, SOC2, or government environments requiring database-enforced isolation:
PostgreSQL kernel rejects any access that does not set session variable app.tenant_id:
Even if application code contains a bug or omission, cross-tenant data leakage is physically impossible.
Model Context Protocol (MCP) Tools
Knowledge Fabric exposes standard MCP tools for LLMs, desktop assistants, and workflow runners:
Adding to Claude Desktop / Cursor
Add to your claude_desktop_config.json:
Retrieval Benchmark
Run the included benchmark evaluation suite to compare retrieval accuracy across strategies:
[!NOTE] The numbers below are illustrative — generated by running
python benchmarks/evaluate_retrieval.pyon a small synthetic operational corpus. Run the command yourself on your own corpus to produce numbers that reflect your data and query distribution. Results will differ by domain, chunk size, and embedding model.
SaaS Source Connectors
Ingest content directly from enterprise platforms with the unified knowledge-fabric-sync CLI:
Large-Scale Vector Performance & Pluggable Backends
Knowledge Fabric is built to grow with your infrastructure from early prototyping to 100M+ vectors:
- HNSW Indexing (Migration 005): Upgrade from IVFFlat to HNSW for 10x higher QPS and sub-10ms latency:
- Declarative Tenant Partitioning: Partition the
chunkstable bytenant_id. Queries for a specific tenant scan only that tenant's dedicated partition index, enabling PostgreSQL to support tens of millions of vectors with partition pruning. - Pluggable Vector Store Protocol: For ultra-large enterprise clusters with existing dedicated vector infrastructure, plug in Qdrant with zero application changes:
Visual Admin & Governance UI
Knowledge Fabric includes a visual management console with zero Node/NPM dependencies:
Features:
- 🛡️ Human-in-the-Loop Approval Queue: Authorize or reject pending action plans with audit comments.
- 🔍 Interactive Retrieval Playground: Inspect side-by-side BM25, Cosine, RRF, and Cross-Encoder score distributions and citations.
- 📜 Live Audit Trail: Chronological event viewer tracking queries, latencies, and security events.
- ⚙️ Policy Engine Sandbox: Test proposed agent action strings against active YAML rules with instant match highlighting.
End-to-End Enterprise Example
See examples/04-end-to-end-with-intent:
A complete demonstration ingesting enterprise policy documents, querying hybrid evidence with multi-tenant partitioning, planning safe actions with Intent Fabric, evaluating YAML policy rules, and emitting an audit-ready approval package.
🧪 Testing & Verification
Knowledge Fabric enforces rigorous test coverage ($\ge 90%$), strict multi-tenant isolation, and a zero-live-HTTP CI architecture:
- Tier 1 (Golden Corpus Fixtures): NIST Special Publication 800-53 Rev 5 control catalog fixtures checked into
tests/fixtures/corpora/for deterministic, offline, sub-second CI validation. - Tier 2 (Opt-in Live Harness): Live cloud retrieval verification against OpenRouter (
benchmarks/live_retrieval_smoke_test.py --openrouter).
1. Run Complete Test Suite with Coverage Gate
2. End-to-End Live Verification Smoke Test
Run the zero-cost hermetic verification pipeline covering chunking, in-memory multi-tenant storage, hybrid RRF retrieval, cryptographic provenance (chunk hashes, package digest, HMAC-SHA256 signature), and MCP tools:
3. Containerized Verification with Docker Compose
Run the entire test suite and smoke test inside an isolated container:
Contributing
We welcome community contributions! Please see CONTRIBUTING.md for development setup, how to add new embedding/reranking providers, and coding standards.
Security
Please report security issues responsibly. See SECURITY.md for our vulnerability disclosure policy.
🏛️ Invarcore Verification Fabric
This engine is part of the Invarcore enterprise verification fabric. Invarcore develops mathematical invariants, cryptographic policy contracts, and execution runtimes for autonomous AI systems.
- Official Website & Architecture: https://invarcore.com
- Technical Whitepapers & Invariant Specs: https://invarcore.com/#whitepapers
- GitHub Organization: https://github.com/invarcore
- Security & Vulnerability Disclosure: [email protected]
License
Licensed under the Apache License, Version 2.0.
来源:README.md,提交 fdf5112
工具
0版本历史
1- v0.1.1最新Nov 7, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
其他 Fabric 集成
Fabric
so.fabric官方发布者
Fabric 的托管 MCP 服务,由 fabric.so 发布;需要凭据;Streamable HTTP。

MCP Fabric (Minecraft)
由 GitHub 账号 denfry 发布
通过mcpfabric模组(Fabric和NeoForge)查看并游玩Minecraft: Java Edition。AI 翻译

Unifi Fabric Mcp Server
由 GitHub 账号 swkstudios 发布
MCP server for UniFi Fabric: Network, Protect, Site Manager, InnerSpace, Carrier Fabric, Mobility.

Neblex Integration Fabric
由 GitHub 账号 neblexhq 发布
Neblex Integration Fabric 远程服务器,让助手在云端或本地构建、测试并发布 iPaaS 流程、应用、表单和 AI 智能体。

Fabric Verify
ai.augmentev
把 AI 智能体的操作签名记录到防篡改公开日志,并生成可离线核验的证明。