Personal Knowledge-Base MCP Server
Enables semantic search over a personal document corpus through MCP tools, allowing users to retrieve ranked chunks, access full document context, and list sources from their semester notes.
README
Personal Knowledge-Base MCP Server
A recruiter-ready Model Context Protocol (MCP) server that provides semantic search over a real, personally-owned document corpus.
The project combines FastMCP, Qdrant vector search, sentence-transformer embeddings, document ingestion, retrieval evaluation, FastAPI, SQLite authentication, and a multi-user web interface.
1. Overview
Traditional keyword search can miss relevant information when the wording of a query differs from the wording used in a document.
This project solves that problem by converting documents into vector embeddings and storing them in Qdrant. Users can then search their knowledge base by meaning rather than exact keywords.
The retrieval functionality is exposed through the Model Context Protocol (MCP), allowing an MCP-compatible client to call the knowledge-base tools directly.
The project is designed as a working, demo-able retrieval server rather than a chatbot application.
2. Problem Statement
Static keyword search depends heavily on matching exact words.
For example, a document may contain:
"Agents receive percepts from their environment and perform rational actions."
while a user searches:
"What is an intelligent agent?"
A semantic retrieval system can recognize that these concepts are related even when the wording is different.
This project provides reusable semantic retrieval tools backed by a vector database instead of building a one-off chatbot.
3. Goals
The project was designed to:
- Build a working MCP server exposing reusable retrieval tools.
- Index a real student-owned document corpus.
- Ingest PDF, Markdown, and TXT documents.
- Chunk documents before embedding.
- Generate semantic embeddings.
- Store embeddings in Qdrant.
- Retrieve semantically relevant document chunks.
- Return ranked results with source citations.
- Retrieve complete indexed document context.
- List indexed sources.
- Support per-user document isolation.
- Return
no_confident_matchfor low-confidence queries. - Measure retrieval quality using hand-labeled queries.
- Provide a lightweight multi-user web demonstration.
- Provide a live, connectable MCP server suitable for an MCP-compatible client.
4. Target Corpus
The project uses a real, student-owned corpus rather than a generic tutorial or Kaggle dataset.
The current demonstration corpus contains:
Samavia_Semester_Notes.md
The notes contain Artificial Intelligence course material including:
- Intelligent Agents
- Environment Types
- Agent Architectures
- Search Algorithms
- Breadth-First Search
- A* Search
- Greedy Best-First Search
- Minimax
- Alpha-Beta Pruning
- Propositional Logic
- First-Order Logic
- Reinforcement Learning
- Bayes' Theorem
- Perceptrons
- Backpropagation
Additional personal documents can be uploaded through the web interface in PDF, Markdown, or TXT format.
5. Architecture
┌──────────────────────┐
│ MCP Client │
│ Claude / MCP Client │
└──────────┬───────────┘
│
MCP / JSON-RPC
│
▼
┌──────────────────────┐
│ FastMCP Server │
│ │
│ search_notes() │
│ get_document() │
│ list_sources() │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Retrieval Core │
│ │
│ Chunking │
│ Embeddings │
│ Similarity Search │
│ Threshold Filtering │
└──────────┬───────────┘
│
▼
┌──────────────────────┐
│ Qdrant Cloud │
│ Vector Database │
└──────────────────────┘
┌─────────────────────────────────────────┐
│ Web Application │
│ │
│ Sign Up / Login │
│ Document Upload │
│ Semantic Search │
│ Source Listing │
│ Search Results │
└──────────────────┬──────────────────────┘
│
▼
┌───────────────┐
│ FastAPI │
│ Backend │
└───────┬───────┘
│
▼
Retrieval Core
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.