Docs MCP

by herring101

Not rated
GitHub

About

A server for efficiently searching and referencing user-configured local documents.

Details

Author
herring101
Categories
Search, Other, Knowledge Base

Setup

Install Docs MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/herring101/docs-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

docs-mcpを使用するにはuvが必要です。uvはPythonパッケージとプロジェクト管理のための高速なツールです。

curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

- 📄ドキュメント一覧表示- すべてのドキュメントとその説明を一覧表示
- 🔍grep検索- 正規表現を使った高速な全文検索
- 🧠セマンティック検索- OpenAI Embeddingsを使った意味的な類似検索(要設定)
- 📝ドキュメント取得- 指定したドキュメントの全内容を取得
- 📖ページネーション対応- 大きなドキュメントをページ単位で効率的に閲覧

# ドキュメント管理用フォルダを作成 mkdir -p my-docs/docs # ドキュメントファイルをdocs/に配置

Claude Desktopの設定(claude_desktop_config.json)に追加:

{ "mcpServers": { "docs": { "command": "uvx", "args": ["docs-mcp"], "env": { "DOCS_BASE_DIR": "/path/to/my-docs" } } } }

重要: docs-mcpは常にプロジェクトフォルダ内のdocs/ディレクトリを参照します。
- プロジェクトフォルダを作成
- docs/ディレクトリにドキュメントを配置
- Claude Desktopの設定を更新

メリット: コマンドライン操作不要、すぐに使える
デメリット: インポートツールが使えない

# ドキュメント管理プロジェクトをセットアップ uv init my-docs cd my-docs uv add docs-mcp # GitHubからドキュメントをインポート uv run docs-mcp-import-github https://github.com/owner/repo # 特定のディレクトリだけインポート uv run docs-mcp-import-github https://github.com/owner/repo/tree/main/docs -o project-docs

メリット: 外部ドキュメントを簡単に取り込める
デメリット: uvのセットアップが必要

# 1. OpenAI APIキーを設定 export OPENAI_API_KEY="sk-..." # 2. メタデータを生成(プロジェクトディレクトリで実行) uv run docs-mcp-generate-metadata
{ "mcpServers": { "docs": { "command": "uvx", "args": ["docs-mcp"], "env": { "DOCS_BASE_DIR": "/path/to/my-docs", "OPENAI_API_KEY": "sk-..." // セマンティック検索が有効になる } } } }
{ "mcpServers": { "docs": { "command": "uvx", "args": ["docs-mcp"], "env": { "DOCS_BASE_DIR": "/path/to/my-docs", "OPENAI_API_KEY": "sk-...", "DOCS_FOLDERS": "api,guides,examples", // 特定のフォルダのみ読み込み "DOCS_FILE_EXTENSIONS": ".md,.mdx,.txt,.py", // 対象ファイル拡張子を制限 "DOCS_MAX_CHARS_PER_PAGE": "5000", // 1ページあたりの最大文字数 "DOCS_LARGE_FILE_THRESHOLD": "10000" // 自動ページネーション閾値(文字数) } } } }

- list_docs- ドキュメント一覧表示
- get_doc- ドキュメント内容取得(ページネーション対応)
- grep_docs- 正規表現検索
- semantic_search- 意味的な類似検索(要OpenAI APIキー)

大きなドキュメント(15,000文字超)では自動的に1ページ目が表示され、ページネーションの使用が推奨されます:

# 基本的な使い方(従来通り) get_doc("path/to/document.md") # 小さなファイルは全文表示、大きなファイルは自動的に1ページ目 # ページネーション使用 get_doc("path/to/document.md", page=1) # 1ページ目(デフォルト10,000文字まで) get_doc("path/to/document.md", page=2) # 2ページ目 get_doc("path/to/document.md", page=3) # 3ページ目
📄 Document: pytest/reference/plugin_list.rst 📖 Page 2/5 (chars 10,001-20,000/45,123) 📏 Lines 285-570/1,324 | Max chars per page: 10,000 ⚠️ Large document auto-paginated. To see other pages: 💡 get_doc('pytest/reference/plugin_list.rst', page=3) # Next page 💡 get_doc('pytest/reference/plugin_list.rst', page=5) # Last page ──────────────────────────────────────────────────────────── [ドキュメントの内容]

- docs-mcp-import-url- Webサイトからドキュメントをインポート
- docs-mcp-import-github- GitHubリポジトリからインポート
- docs-mcp-generate-metadata- セマンティック検索用メタデータを生成

- uv- Python環境とパッケージ管理ツール(uvxコマンドで実行)
- Python 3.12以上(uvが自動的に管理)
- OpenAI APIキー(セマンティック検索を使用する場合のみ)

- ドキュメント:.md,.mdx,.txt,.rst,.asciidoc,.org
- 設定:.json,.yaml,.yml,.toml,.ini,.cfg,.conf,.xml,.csv
- コード:.py,.js,.jsx,.ts,.tsx,.java,.cpp,.c,.h,.go,.rs,.rb,.php
- スクリプト:.sh,.bash,.zsh,.ps1,.bat
- Web:.html,.css,.scss,.vue,.svelte
- その他:.sql,.graphql,.proto,.ipynb,.dockerfile,.gitignore

my-docs/ └── docs/ ├── api/ │ └── reference.md ├── guides/ │ └── quickstart.md └── examples/ └── sample.py
git clone https://github.com/herring101/docs-mcp.git cd docs-mcp uv sync # テスト uv run pytest tests/ # ビルド uv build
docs-mcp-import-url https://example.com/docs --output-dir imported

- --output-dir,-o: 出力ディレクトリ名(docs/配下に保存)
- --depth,-d: クロール深度
- --include-pattern,-i: 含めるURLパターン
- --exclude-pattern,-e: 除外するURLパターン
- --concurrent,-c: 同時ダウンロード数

GitHubリポジトリからインポート。ブランチを指定しない場合はデフォルトブランチ(main/master等)を自動検出します。

# リポジトリ全体をインポート docs-mcp-import-github https://github.com/owner/repo # 特定のパスのみインポート(docs/importedに保存される) docs-mcp-import-github https://github.com/owner/repo/tree/main/docs --output-dir imported # masterブランチのリポジトリも自動検出 docs-mcp-import-github https://github.com/Cysharp/UniTask

- --output-dir,-o: 出力ディレクトリ名(docs/配下に保存。デフォルト: リポジトリ名)

export OPENAI_API_KEY="your-key" docs-mcp-generate-metadata

- APIキーは環境変数で管理
- DOCS_FOLDERSDOCS_FILE_EXTENSIONSでアクセスを制限
- 外部ネットワークアクセスはOpenAI APIのみ

- 設定ファイルの構文を確認
- DOCS_BASE_DIRが正しいパスを指しているか確認
- Claude Desktopを再起動

- OPENAI_API_KEYが設定されているか確認
- docs-mcp-generate-metadataを実行したか確認

Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.

This MCP (Model Context Protocol) server provides integration with Wiki.JS for searching and listing pages from Agent Voice Response Wiki.JS instance.

Fetch, convert, and search AWS documentation pages, with recommendations for related content.

Production-ready RAG out of the box to search and retrieve data from your own documents.

Quran-focused MCP server for ayah translation, tafsir, mutashabihat lookups, recitation playlists, and prayer times.

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Provides AI assistants with intelligent access to ML textbook content for creating accurate, source-grounded documentation.

一条工務店で家を建てた施主「ろれさん」のブログ記事と、YouTube/X/Instagram/Web から集めた約3,000件の家づくり Tips を横断検索できる MCP サーバ。すべての結果に出典URLが付きます。

A flexible service for searching and analyzing academic papers on arXiv.

A local server to query Bucketeer documentation, which automatically fetches and caches content from its GitHub repository.

Caesar is a free, keyless web search API for AI agents. Its remote MCP server exposes web_search (ranked results with citable provenance) and web_fetch (full pages as clean markdown), and works anonymously with no API key.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.