Knowledge Fabric — Claude Code MCP server: features and setup
The Knowledge Fabric MCP server for Claude Code retrieves evidence from documents and code. It combines keyword and vector search to surface exact terms alongside related passages.
Apache-2.0 ★ 8 updated 2026-11-11
claude mcp add knowledge-fabric -- uvx knowledge-fabricWhat Knowledge Fabric does
Knowledge Fabric indexes documents and returns retrieved evidence to an agent over MCP. PostgreSQL full-text search works alongside pgvector similarity search; RRF combines their results, then cross-encoders rerank them.
The storage layer requires PostgreSQL with pgvector. Apache Tika extracts document text, and embeddings come from Ollama, OpenRouter, OpenAI, or Cohere. Tenant separation happens at the application layer by default; PostgreSQL RLS is an optional additional mode.
What it helps with
- find passages by meaning and exact terms
- combine PostgreSQL text search with vector retrieval
- send retrieved evidence to an agent over MCP
- isolate data between tenants
Example prompts for the agent
- Find the error code in the documents and return the passages that support it.
- Search the documents for evidence matching this question, including exact terms.
How to install Knowledge Fabric
Platform CLI
claude mcp add knowledge-fabric -- uvx knowledge-fabricuvx runs the command named after the package; if the README names another one, use uvx --from knowledge-fabric <command>
Platform CLI
codex mcp add knowledge-fabric -- uvx knowledge-fabricuvx runs the command named after the package; if the README names another one, use uvx --from knowledge-fabric <command>
Config file
{
"mcpServers": {
"knowledge-fabric": {
"command": "uvx",
"args": [
"knowledge-fabric"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from knowledge-fabric <command>
Config file
{
"servers": {
"knowledge-fabric": {
"type": "stdio",
"command": "uvx",
"args": [
"knowledge-fabric"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from knowledge-fabric <command>
Platform CLI
gemini mcp add knowledge-fabric uvx knowledge-fabricuvx runs the command named after the package; if the README names another one, use uvx --from knowledge-fabric <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Knowledge Fabric
How do I install Knowledge Fabric in Claude Code?
Run claude mcp add knowledge-fabric -- uvx knowledge-fabric.
What does Knowledge Fabric do?
It retrieves document passages with PostgreSQL full-text search and pgvector similarity search. RRF combines the results, and cross-encoders rerank them before the agent receives them.
What does Knowledge Fabric require?
It needs PostgreSQL with pgvector, Apache Tika for text extraction, and an embedding provider: Ollama, OpenRouter, OpenAI, or Cohere.