search-docs
Click on "Deploy 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., "@search-docs search the architecture docs for component overview"
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.
🐕️ search-docs
ローカル文書をAIエージェントが検索できるようにする
プロジェクトのドキュメント、設計書、調査メモ。大量の文書から必要な情報を見つけるのは大変です。
search-docsは、Markdown文書をVector検索可能にし、Claude CodeなどのAIエージェントが自然言語で検索できるようにします。
コンセプト
ローカルファースト: すべてのデータはローカルに保存、プライバシー重視
エージェント統合: Claude Codeから自然言語で検索
自動更新: ファイル変更を自動検知、常に最新の情報を検索可能
セクション分割: 文書全体だけでなく、関連する章節を精度高く発見
Related MCP server: docs-mcp
仕組み
search-docsは、シンプルな3層構造で動作します:
Markdown文書
↓ (見出しで分割)
Sections (depth 0-3)
↓ (Vector化)
LanceDB Index
↓ (自然言語で検索)
AIエージェント / CLI / APIDocument: プロジェクトの.mdファイル Section: 見出しごとに分割された意味のある単位 Vector Index: 日本語最適化モデル(Ruri)でVector化 Server: プロジェクトごとに起動、変更を自動検知
詳細: システムアーキテクチャ
30秒で始める(Claude Code)
Docker版(推奨)
ランタイム依存(Node.js, Python, uv)を排除し、セキュアな境界で実行できます。
.claude/settings.json または .mcp.json に以下を追加:
{
"mcpServers": {
"search-docs": {
"type": "stdio",
"command": "docker",
"args": [
"run", "--rm", "-i",
"-v", ".:/workspace:ro",
"-v", "./.search-docs:/workspace/.search-docs",
"otolab/search-docs-mcp:latest",
"--project-dir", "/workspace"
]
}
}
}ボリュームマウント:
.:/workspace:ro— プロジェクトのドキュメントを読み取り専用でマウント./.search-docs:/workspace/.search-docs— インデックスデータの永続化(読み書き)
その後、Claude Codeで:
「search-docsのセットアップをお願い」と依頼
MCPを再接続(reconnect)
「このプロジェクトのアーキテクチャについて教えて」と依頼
npm/npx版(Docker環境がない場合)
Docker環境がない場合の代替手段です。uv(Pythonパッケージマネージャ)が必要です。
# macOS (Homebrew)
brew install uv
# macOS/Linux (公式インストーラ)
curl -LsSf https://astral.sh/uv/install.sh | shclaude mcp add npx -- -y @search-docs/mcp-serverその後、Claude Codeで:
「search-docsのセットアップをお願い」と依頼
MCPを再接続(reconnect)
「このプロジェクトのアーキテクチャについて教えて」と依頼
→ 詳しい手順
その他の使い方
CLIツールとして使う
# グローバルインストール
npm install -g @search-docs/cli
# またはnpxで直接実行(インストール不要)
npx @search-docs/cli server start
npx @search-docs/cli search "検索クエリ"→ ユーザーガイド
プログラムから使う
TypeScript/JavaScript APIとしても利用できます。
import { SearchClient } from '@search-docs/client';
const client = new SearchClient({ port: 24280 });
const results = await client.search('検索クエリ');主な特徴
セクション分割検索
文書全体だけでなく、H1〜H4の見出し単位で検索。関連する章節をピンポイントで発見できます。
リアルタイム更新
ファイル変更を自動検知、バックグラウンドで再インデックス。常に最新の情報を検索できます。
プロジェクト独立
プロジェクトごとに独立したサーバとインデックス。複数プロジェクトを同時に使用できます。
日本語最適化
日本語に最適化された埋め込みモデル(Ruri)を使用。日本語文書の検索精度が高くなっています。
アーキテクチャ概要
search-docsはin-process構成(MCPサーバ) と クライアント・サーバ構成(HTTPサーバ) の2つのモードで動作します:
MCPサーバモード(Claude Code統合)
MCP Server (
@search-docs/mcp-server): SearchDocsServerをin-processで直接保持HTTPデーモン不要、高速起動
SearchDocsServer(read-only)
WatcherProcess(write、heartbeat調停)
DBEngine(Python/LanceDB/Ruri)
EmbeddingServerProcess(自動検出・起動)
HTTPサーバモード(外部クライアント向け)
Server (
@search-docs/server):server startコマンドで起動JSON-RPC API提供
CLI Tool、Client Libraryから利用
CLI Tool (
@search-docs/cli): コマンドラインClient Library (
@search-docs/client): プログラマティックな利用
共通インターフェイス
SearchDocsService: MCPサーバとHTTPクライアントの共通インターフェイス
SearchDocsServer(in-process実装)
SearchDocsClient(HTTP実装)
詳細: システムアーキテクチャ | データモデル
ドキュメント
📚 使い始める
🔧 詳しく知る
システムアーキテクチャ - 技術スタックと実装
データモデル - データ構造の設計
アーキテクチャ決定記録 - 設計判断の記録
🤝 統合する
Claude Code統合 - MCP Serverとして使う
クライアントライブラリ - APIリファレンス
ライセンス
このプロジェクトはプライベートプロジェクトです。
関連プロジェクト
sebas-chan: DBエンジンのアーキテクチャ参照元
Available Tools
10 toolsget_documentA
文書の内容を取得します。セクションの全文はsectionId、文書全体はpathを指定します。
Inputs: path, project, sectionId.
get_outlineA
文書の目次構造をトークン数付きで一覧表示します。文書の全体像把握や記述量バランスの確認に使えます。
Inputs: path, project, sectionId.
get_system_statusA
search-docsの全体状態を確認します。設定状態、インデックス情報、関連プロジェクト一覧が返されます。
Inputs: no named parameters.
index_purgeA
インデックスファイルを全削除します。壊れたインデックスを廃棄して再構築する場合に使います。
Inputs: no named parameters.
index_statusB
インデックスの詳細な状態を確認します。文書数、セクション数、Dirty数、ワーカー状態が返されます。
Inputs: project.
initA
search-docsの設定ファイルを初期化します。ローカルプロジェクトの文書を検索対象にする場合に実行してください。
Inputs: port, force.
maintenance_repairA
LanceDBテーブルの破損を検出し、自動修復します。破損テーブルはdrop→再作成されます。修復後は再インデックス(index rebuild)が必要です。
Inputs: no named parameters.
searchB
ドキュメントをVector検索します。関連するセクションが関連性順で返されます。
Inputs: query (required), depth, limit, project, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: status checks, search, outline, index maintenance, related project management, initialization, and document retrieval. No two tools overlap in function or ambiguity.
Naming conventions are inconsistent. While get_* tools are consistent, index_status, index_purge, maintenance_repair, and init deviate from a uniform verb_noun pattern, mixing noun-first and bare verb forms.
10 tools is well within the ideal range for a search-docs server. Each tool covers a distinct aspect of the domain (search, indexing, project management, init) without redundancy.
The surface covers core operations but has gaps: no remove_related_project to complement add_related_project, and no explicit index rebuild tool (only mentioned as a post-repair step). Additionally, there is no direct way to list all documents beyond index status counts.
Maintenance
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Markdown workspace for AI agents: read, write, organize, and share markdown documents.
Convert PDFs, Office docs, websites and audio into AI-ready Markdown, then search and ask your docs.
Personal context for every AI: search, read, and write back to your private Markdown library.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI models to seamlessly access and query local markdown technical documentation files, providing automatic documentation context without explicit prompting.9 npm5ISC
- AlicenseNot gradedqualityDmaintenanceGives AI agents full-text search over any Markdown/MDX documentation folder.6 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search, read, and traverse a local knowledge base of Markdown files using full-text search and relationship graph, reducing token usage.MIT
- AlicenseNot gradedqualityDmaintenanceEnables agentic document retrieval over markdown, CSV, and JSONL using BM25 and tree navigation, without vector databases or embeddings, allowing AI agents to search, browse, and retrieve structured document sections.49 npm1MIT