756ed24bfc60e12863e7d6c880b6949617e3d281
knowledge-mcp
A Model Context Protocol (MCP) server that provides scoped RAG workspaces ("Notebooks") backed by Postgres + pgvector and TEI.
Overview
This server enables an agent to:
- Create named "Notebooks" (Postgres-backed collections).
- Ingest documents (PDF, Markdown, Text) into specific notebooks.
- Query specific notebooks using vector search (RAG).
- Synthesize findings across a notebook.
Designed to replicate the NotebookLM experience: clean, focused, bounded context.
Stack
- Language: Python 3.11+
- Framework:
mcpSDK - Vector DB: Postgres + pgvector
- Embeddings: Text Embeddings Inference (TEI) -
BAAI/bge-base-en-v1.5
Tools
create_notebook
Creates a new isolated workspace (Postgres-backed notebook).
name: string (e.g., "project-alpha")
add_source
Ingests a document into the notebook.
notebook: stringcontent: string (raw text or local path)source_name: stringformat:textorpdf_path
query_notebook
Performs a semantic search/RAG generation against the notebook.
notebook: stringquery: string
Configuration
Env vars:
DATABASE_URL: Postgres connection string (e.g.,postgresql://postgres:password@postgres.knowledge-mcp.svc:5432/knowledge)TEI_URL: URL to TEI (e.g.,http://text-embeddings.tei.svc.cluster.local:8080)
TODO
- Add PDF → Markdown/text conversion step to improve extraction quality.
- Add OCR pipeline for scanned PDFs.
Description
Languages
Python
93.6%
Dockerfile
6.4%