Personal Knowledge-Base MCP Server
Personal Knowledge-Base MCP Server
学生所有のドキュメントコレクションに対して、Model Context Protocol (MCP)、Gemini embeddings、Qdrantを使用してセマンティック検索を提供するPersonal Knowledge-Base MCP Serverです。
プロジェクト概要
このプロジェクトは、個人知識ベースを呼び出し可能なMCPツールとして公開します。
キーワードマッチングに依存する代わりに、システムはユーザーのクエリをベクトル埋め込みに変換し、Qdrantから意味的に関連するドキュメントチャンクを取得します。
Related MCP server: Solarium
アーキテクチャ
User / MCP Client
|
v
MCP Server (FastMCP)
|
+----------------------+
| |
v v
search_notes() get_document()
|
v
Gemini Embedding API
|
v
Qdrant Vector Database
|
v
Ranked Chunks
|
v
Source + Page + Score + Text
## Features
* PDF document ingestion
* Page-by-page text extraction
* Recursive text chunking
* Gemini `gemini-embedding-001` embeddings
* Qdrant vector storage
* Semantic similarity search
* Source and page citations
* Confidence threshold for low-relevance queries
* Full-document retrieval
* Indexed-source listing
* MCP Inspector support
## MCP Tools
### `search_notes`
Searches the knowledge base using semantic similarity.
Arguments:
* `query`: search question or topic
* `top_k`: maximum number of results
Returns:
* similarity score
* source filename
* page number
* relevant text chunk
### `get_document`
Returns the complete text of an indexed PDF document.
Argument:
* `doc_id`: document filename
Example:
```text
Complex_Variables_Project_Report.pdflist_source_documents
インデックス化されたすべてのソースドキュメントを一覧表示します。
出力例:
1. Complex_Variables_Project_Report.pdfプロジェクト構造
Personal-Knowledge-MCP/
├── documents/
│ └── Complex_Variables_Project_Report.pdf
├── services/
│ ├── chunking.py
│ ├── embedding.py
│ ├── pdf_reader.py
│ └── qdrant_service.py
├── .env
├── .gitignore
├── evaluation.py
├── ingest.py
├── requirements.txt
└── server.pyセットアップ
1. 仮想環境の作成と有効化
python -m venv .venv
.venv\Scripts\Activate.ps12. 依存関係のインストール
pip install -r requirements.txt3. Gemini APIキーの設定
プロジェクトルートに .env ファイルを作成します:
GEMINI_API_KEY=your_api_key_here.env をGitにコミットしないでください。
4. Qdrantの起動
プロジェクトはローカルQdrantを以下で使用します:
http://localhost:6333Dockerコマンドの例:
docker run -d --name qdrant -p 6333:6333 -p 6334:6334 qdrant/qdrantドキュメントの取り込み
PDFを以下の場所に配置します:
documents/実行:
python ingest.py取り込みパイプラインは以下を実行します:
PDF
↓
Page extraction
↓
Chunking
↓
Gemini embeddings
↓
Qdrant storage保存された各チャンクには以下が含まれます:
text
page
sourceMCPサーバーの実行
MCPインスペクターを起動:
mcp dev server.pyMCPサーバーはSTDIOトランスポートを使用します。
利用可能なツール:
search_notes
get_document
list_source_documents検索評価
5つのクエリからなる小さな評価セットを使用して、期待される関連ページが少なくとも1つ、上位3件の検索結果に含まれるかどうかを確認しました。
評価結果:
Tests: 5
Successful hits: 5
Hit@3: 100%評価クエリの例は以下の通りです:
複素変数とは何か?
コーシー・リーマン方程式とは何か?
ラプラス変換は工学システムにどのように役立つか?
ラプラス変換とフーリエ変換の違いは何か?
FFTは音声ノイズ低減にどのように使われるか?
信頼度フィルタリング
検索ツールは、初期類似度しきい値を使用します:
0.60例えば、関連クエリではスコアが約:
0.79
0.76
0.75一方、無関係なクエリではスコアが約:
0.52したがって、低スコアの結果はフィルタリングされ、ツールは以下を返します:
No confident match found.技術
Python
FastMCP
Model Context Protocol (MCP)
Google Gemini Embeddings
Qdrant
PyMuPDF
LangChain Text Splitters
Docker
MCP Inspector
現在のナレッジソース
現在のデモンストレーションコーパスは:
Complex_Variables_Project_Report.pdfこのドキュメントは7ページで構成され、インデックス化された personal_knowledge コレクション用に30チャンクに分割されました。
セキュリティ
APIキーは
.envに保存されます.envは.gitignoreによって除外されますシークレットをソース管理にコミットしてはいけません
今後の改善
MarkdownおよびTXTドキュメントのサポート
ドキュメントレベルの永続IDの追加
重複チャンク処理の改善
評価データセットの拡張
さらなる検索メトリクスの追加
複数ドキュメントコレクションのサポート
オプションのQdrant Cloudデプロイメントの追加
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceMCP server that indexes a knowledge base into Chroma and provides search tools for retrieving document fragments via vector embeddings.
- Alicense-qualityDmaintenanceA knowledge base MCP server backed by Qdrant vector database with local embeddings for semantic search and document management.51ISC
- Flicense-qualityCmaintenanceMCP server providing RAG tools (search_notes, answer_from_notes) and resources for grounded answers over a local knowledge base.
- Flicense-qualityAmaintenanceA local knowledge base MCP server that enables retrieval and evidence-based Q&A over Obsidian Markdown notes, with high-recall embedding search, chunked indexing, hybrid retrieval, and three STDIO MCP tools for agent-driven recollection and quality-gated recall.
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Agentic search over your Dewey document collections from any MCP-compatible client.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AmnaSarwar522/Personal-Knowledge-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server