MCP Documentation Server
MCP Documentation Server
AIコーディングエージェント向けのローカルファーストのドキュメント管理とセマンティック検索。 外部データベース不要、クラウドAPI不要、ベンダーロックインなし。
他のCLI専用のMCPサーバーとは異なり、これはフルWebダッシュボードを備えています。ブラウザからナレッジベースの閲覧、検索、アップロード、管理ができます。すべてのMCPツールはREST APIとしても公開されており、AIエージェントにシンプルでスキーマ不要のインターフェースを提供します。
🏠 完全オフラインで動作 — OramaベクターDBとローカルAI埋め込み(Transformers.js)を使用
🌐 内蔵Web UI — MCPサーバーと同時にポート3080で自動起動
🔍 ハイブリッド検索 — 親子チャンキングによる全文+ベクター類似度
🤖 オプションのAI検索 — 高度なドキュメント分析用のGoogle Gemini(独自キーを使用)
📁 ドラッグ&ドロップアップロード —
.txt、.md、.pdf対応📦 MCP Registry に公開 — npxでインストール可能、クローン不要
クイックスタート
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": ["-y", "@Unity-Billal-mesloub/mcp-documentation-server"]
}
}
}🤖 エージェントスキル(REST API)— AIエージェントに推奨
すべてのMCPツールは、`` 上のREST APIからもアクセスできます。これはAIエージェント(Claude Code、OpenCode、Gemini CLI、Cursor)からの操作に推奨される方法です。MCPツールのスキーマを会話コンテキストに読み込むことを避け、応答JSONのみが入るためです。
-H "Content-Type: application/json" \
-d '{"query": "your search", "limit": 5}'すぐに使えるスキルが skills/documentation-server/SKILL.md に含まれています。エージェントにすべてのエンドポイントを例付きで教えます。インストールするには:
npx skills add https://github.com/Unity-Billal-mesloub/mcp-documentation-server --skill documentation-server基本的なワークフロー
add_documentを使用してドキュメントを追加するか、.txt/.md/.pdfファイルをアップロードフォルダに置いてprocess_uploadsを呼び出します。search_all_documentsですべてを検索するか、search_documentsで単一のドキュメント内を検索します。get_context_windowを使用して隣接するチャンクを取得し、LLMにより広いコンテキストを提供します。
Related MCP server: OpenLMlib
ウェブUI
Webインターフェースは、MCPサーバー起動時にポート3080で自動的に起動します。Web UIから次のことができます:
📊 ダッシュボード — すべてのドキュメントと統計の概要
📄 ドキュメント — ドキュメントの閲覧、表示、削除
➕ ドキュメント追加 — タイトル、コンテンツ、メタデータでドキュメントを作成
🔍 全体検索 — すべてのドキュメントに対するセマンティック検索
🎯 ドキュメント内検索 — 特定のドキュメント内を検索
🤖 AI検索 — Geminiによる分析(
GEMINI_API_KEYが設定されている場合)📁 ファイルアップロード — ファイルをドラッグ&ドロップしてナレッジベースに処理
🪟 コンテキストウィンドウ — 特定のインデックスの周囲のチャンクを探索
MCPクライアントの設定
最小構成
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": ["-y", "@Unity-Billal-mesloub/mcp-documentation-server"]
}
}
}環境変数を使用(すべてオプション)
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": ["-y", "@Unity-Billal-mesloub/mcp-documentation-server"],
"env": {
"MCP_BASE_DIR": "/path/to/workspace",
"GEMINI_API_KEY": "your-api-key-here",
"MCP_EMBEDDING_MODEL": "Xenova/all-MiniLM-L6-v2",
"START_WEB_UI": "true",
"WEB_HOST": "127.0.0.1",
"WEB_PORT": "3080"
}
}
}
}すべての環境変数はオプションです。GEMINI_API_KEY がない場合、ローカル埋め込みベースの検索ツールのみが利用可能です。
MCPツール
サーバーは以下のツールを登録します(すべてZodスキーマで検証済み):
📄 ドキュメント管理
Tool | Description |
| ドキュメントを追加(タイトル、コンテンツ、オプションのメタデータ) |
| すべてのドキュメントをメタデータとコンテンツプレビュー付きで一覧表示 |
| IDでドキュメントの全コンテンツを取得 |
| ドキュメント、そのチャンク、データベースエントリ、関連ファイルを削除 |
📁 ファイル処理
Tool | Description |
| アップロードフォルダ内のすべてのファイルを処理(チャンキング+埋め込み) |
| アップロードフォルダの絶対パスを返す |
| アップロードフォルダ内のファイルをサイズと形式情報付きで一覧表示 |
| Web UIのURLを返す(例:http://localhost:3080)— ダッシュボードを開いたり、ブラウザからアップロードフォルダを特定するのに便利 |
🔍 検索
Tool | Description |
| 特定のドキュメント内でのセマンティックベクター検索 |
| ハイブリッド(全文+ベクター)クロスドキュメント検索 |
| 指定されたチャンクインデックスの周囲のチャンクウィンドウを返す |
| 🤖 Geminiを使用したAI検索( |
設定
環境変数またはプロジェクトルートの .env ファイルで設定します:
Variable | Default | Description |
|
| データ保存用のベースディレクトリ |
|
| 埋め込みモデル名 |
| — | Google Gemini APIキー( |
|
| LRU埋め込みキャッシュの有効/無効 |
|
|
|
|
| Web UIのバインドアドレス(すべてのインターフェースに公開するには |
|
| Web UIのポート |
|
| 大きなファイルのストリーミング読み取りを有効化 |
|
| ストリーミングバッファサイズ(バイト単位、64KB) |
|
| ストリーミングに切り替えるしきい値(10MB) |
ストレージレイアウト
~/.mcp-documentation-server/ # Or custom path via MCP_BASE_DIR
├── data/
│ ├── orama-chunks.msp # Orama vector DB (child chunks + embeddings)
│ ├── orama-docs.msp # Orama document DB (full content + metadata)
│ ├── orama-parents.msp # Orama parent chunks DB (context sections)
│ ├── migration-complete.flag # Written after legacy JSON migration
│ └── *.md # Markdown copies of documents
└── uploads/ # Drop .txt, .md, .pdf files here埋め込みモデル
MCP_EMBEDDING_MODEL で設定:
Model | Dimensions | Notes |
| 384 | デフォルト — 高速、良好な品質 |
| 768 | 推奨 — 最高品質、多言語 |
モデルは初回使用時にダウンロードされます(約80〜420 MB)。ベクターの次元はプロバイダーから自動的に決定されます。
⚠️ 重要: 埋め込みモデルを変更するには、すべてのドキュメントを再追加する必要があります。異なるモデルの埋め込みは互換性がありません。次元が変更されると、Oramaデータベースは自動的に再作成されます。
アーキテクチャ
Server (FastMCP, stdio)
├─ Web UI (Express, port 3080)
│ └─ REST API → DocumentManager
└─ MCP Tools
└─ DocumentManager
├─ OramaStore — Orama vector DB (chunks DB + docs DB + parents DB), persistence, migration
├─ IntelligentChunker — Parent-child chunking (code, markdown, text, PDF)
├─ EmbeddingProvider — Local embeddings via @xenova/transformers
│ └─ EmbeddingCache — LRU in-memory cache
└─ GeminiSearchService — Optional AI search via Google GeminiOramaStore は3つのOramaインスタンスを管理します:ドキュメントのメタデータ/コンテンツ用、ベクター埋め込み付きの子チャンク用、親チャンク(コンテキストセクション)用です。すべてディスク上のバイナリファイルに永続化され、起動時に復元されます。
IntelligentChunker は親子チャンキングパターンを実装しています:ドキュメントはまず完全なコンテキスト(セクション、段落)を保持する大きな親チャンクに分割され、次に各親は正確なベクター検索のために小さな子チャンクにさらに分割されます。クエリ時には、結果は親ごとに重複排除され、LLMは一致したフラグメントとより広いコンテキストの両方を受け取ります。
EmbeddingProvider はローカル推論用のTransformers.jsモデルを遅延ロードします — API呼び出しは不要です。
開発
git clone https://github.com/Unity-Billal-mesloub/mcp-documentation-server.git
cd mcp-documentation-server
npm installnpm run dev # FastMCP dev mode with hot reload
npm run build # TypeScript compilation
npm run inspect # FastMCP web UI for interactive tool testing
npm start # Direct tsx execution (MCP server + web UI)
npm run web # Run only the web UI (development)
npm run web:build # Run only the web UI (compiled)コントリビューション
リポジトリをフォークします
フィーチャーブランチを作成します:
git checkout -b feature/nameメッセージは Conventional Commits に従ってください
プルリクエストを開きます
サポート
📖 ドキュメント
🐛 問題を報告
🤖 Google AI Studio — Gemini APIキーを取得
スター履歴
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
- FlicenseNot gradedqualityBmaintenanceEnables any MCP-compatible AI assistant to search, filter, and retrieve information from a local document collection using a hybrid search pipeline with vector, BM25, reranking, and LLM enrichment.4
- AlicenseNot gradedqualityAmaintenanceProvides AI assistants with a local knowledge base and research library, enabling semantic and full-text retrieval, memory persistence, and multi-agent collaboration via 58 MCP tools.2MIT
- FlicenseNot gradedqualityDmaintenanceProvides tools for ingesting documents into a local vector database and retrieving relevant information via semantic search, enabling retrieval-augmented generation for MCP clients.6
- FlicenseAqualityBmaintenanceA local-first document retrieval engine that mounts as an MCP tool for agents to index files, search for relevant passages, and let the agent's own LLM answer.4
Related MCP Connectors
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
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/Unity-Billal-mesloub/mcp-documentation-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server