qs-rag
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@qs-ragwhat did we decide about the pricing page last quarter?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
qs-rag
ローカルの知識ベースを自然文でセマンティック検索する MCP サーバー。
Markdown ノートや過去の作業ログを「見出し単位」で索引し、grep / 全文探索の代わりに意味で当てにいく。
Model Context Protocol (MCP) server for semantic search over a local knowledge base. Fully local, zero API cost.
実際のインサイドセールス業務で日次運用しているツール。AI エージェント(Claude Code)が過去の方針・フォーマット・経緯を思い出すための「外部記憶」として使っている。
なぜ作ったか
エージェントに数百件の Markdown メモや過去セッションログを参照させたいが、grep はキーワード一致しか拾えず「あれ何だっけ」系の曖昧な問いに弱い。かといってクラウドのベクトル DB を挟むとコストと秘匿性の問題が出る。
→ 埋め込み・ストア・検索を全部ローカルに閉じた RAG を MCP として実装した。
Related MCP server: rag-mcp
設計のポイント
完全ローカル / API コストゼロ — 埋め込みは Ollama (
snowflake-arctic-embed2・1024次元・多言語)。外部送信なしネイティブビルド不要のストア —
node:sqliteにベクトルを置き、メモリ上のブルートフォース cos 類似で検索。件数規模的にこれで十分速く、依存を増やさない2段階の差分インデックス —
mtimeで粗くふるい、変化したものだけsha256で確定判定。検索のたびに 30 秒スロットルで自動更新するので索引が陳腐化しないProgressive Disclosure — まず
search_knowledgeで当たりを付け、get_detailで本文+同一ファイル内の隣接チャンクを開く。エージェントが文脈を横に広げられる埋め込み層を 1 ファイルに隔離 — 別モデル / 別エンジンへの差し替えは
src/embed.jsだけ変えれば済む
MCP ツール
ツール | 役割 |
| 自然文クエリで意味検索。まずこれで当たりを付ける |
| チャンク本文+同一ファイル内の隣接チャンク一覧 |
| 即時フル差分 reindex |
domain でソース種別(個人ノート / 同期ドキュメント / 過去セッションログ)を絞り込める。
cc-log は Claude Code の ~/.claude/projects/-Users-kazuki/*.jsonl に加え、
Codex の ~/.codex/sessions/YYYY/MM/DD/*.jsonl も同じ索引へ統合する。
Codex側は response_item.payload の user / assistant 本文だけを抽出し、
システム指示・推論・ツール出力・起動時のAGENTS wrapperは除外する。
検索時の差分reindexにより、Codexの新規・更新セッションも自動反映される。
スタック
Node.js (ESM) / @modelcontextprotocol/sdk / Ollama / node:sqlite
セットアップ
npm install
# Ollama を起動し、埋め込みモデルを pull
ollama pull snowflake-arctic-embed2
node bin/reindex.js # 初回フルインデックス
node bin/search.js "クエリ" # ターミナルから直接検索MCP ホスト(Claude Code 等)には stdio サーバーとして登録する。
索引対象の指定
既定では ~/notes(Markdown)と ~/.claude/projects・~/.codex/sessions(エージェントのセッションログ)を索引する。差し替えは環境変数で行う。
環境変数 | 既定値 | 用途 |
| (なし) | 索引対象を JSON 配列で直接指定 |
| (なし) | 同じ JSON を書いたファイルのパス |
|
| インデックス DB の置き場所 |
|
| Ollama のエンドポイント |
|
| 埋め込みモデル |
// RAG_SOURCES の例。root は ~ 展開に対応する
[
{ "root": "~/notes", "kind": "md", "domain": "knowledge", "excludeDirs": ["_archive"] },
{ "root": "~/work/docs", "kind": "md", "domain": "context" },
{ "root": "~/.claude/projects", "kind": "jsonl", "domain": "cc-log", "recursive": true }
]kind は md(Markdown を見出し単位でチャンク化)か jsonl(セッションログを turn 単位で取り込み)。domain は検索時の絞り込み・除外の単位になる。
個人で開発した MCP サーバー群の 1 つ。設計の出発点として yuya-mcp の RAG パートを参考にした。
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 Connectors
Self-hosted AI-native knowledge workspace with hybrid search, GraphRAG, and MCP.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Shared knowledge base for AI agents. Semantic search across agents, no setup required — just a URL.
Related MCP Servers
- AlicenseAqualityAmaintenancePrivacy-first local document search using semantic search. Runs entirely on your machine with no cloud services, supporting PDF, DOCX, TXT, and Markdown files.2293,968371MIT
- FlicenseAqualityDmaintenanceEnables indexing local documents (PDF, Markdown, text, code) into a knowledge base and querying them via semantic search using local embeddings, all running privately on your machine.4
- FlicenseNot gradedqualityCmaintenanceEnables semantic search over personal files using natural language, with optional AI summarization, all running locally.
- AlicenseAqualityCmaintenanceEnables semantic search and question answering over a knowledge base using hybrid retrieval and grounded answers, all running offline with no API keys.4MIT
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/kazukiishizuka-cmd/qs-rag-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server