Local Docs MCP Serverのロゴ

Local Docs MCP Server

コミュニティ
umputun

MCP serving local docs

公開者umputun
リポジトリlocal-docs-mcp
言語Go
フォーク
2
スター
21
利用可能なツール
0
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Local Docs MCP Serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには21件のスターと2件のフォークがあります。

Local Docs MCP Server build  Coverage Status

Implementation of the Model Context Protocol (MCP) server for local documentation access. Provides Claude with seamless access to markdown documentation from multiple sources.

Features

  • Multi-source documentation: Access docs from commands, project docs, and project root
  • Smart search: Fuzzy matching with exact/substring match priority
  • YAML frontmatter support: Optional metadata for enhanced search (description, tags)
  • Always-on caching: File list caching with automatic invalidation on changes (~3000x faster)
  • File watching: Automatic cache invalidation when documentation files change
  • Safe path handling: Prevents directory traversal and validates paths
  • Source prefixes: Explicitly specify documentation source (e.g., commands:file.md)
  • Size limits: Prevents reading files larger than 5MB

Documentation Sources

  1. Shared Docs (~/.claude/commands/**/*.md): User commands and knowledge bases (configurable)
  2. Project Docs ($CWD/docs/**/*.md): Project-specific documentation with configurable exclusions
  3. Project Root ($CWD/*.md): Root-level docs like README.md (opt-in)

YAML Frontmatter Support

Documentation files can optionally include YAML frontmatter for enhanced searchability:

markdown
---
description: Enforce Test-Driven Development approach for Go code with test-first workflow
tags: [testing, development, go]
---

# Your Documentation Content

Supported fields:

  • description: Text description used to boost search relevance
  • tags: Array or comma-separated list of tags for categorization

Search behavior:

  • Description matches add +0.5 to search score
  • Exact tag matches add +0.3 to search score
  • Partial tag matches add +0.15 to search score
  • Frontmatter is automatically stripped from read_doc output
  • list_all_docs includes description and tags in file metadata

Note: Frontmatter is completely optional - plain markdown files work perfectly without it.

Installation

Download Binary

Download the latest release from the releases page.

Using Go

bash
go install github.com/umputun/local-docs-mcp/app@latest

Using Homebrew (macOS)

bash
brew tap umputun/apps
brew install umputun/apps/local-docs-mcp

Build from Source

bash
git clone https://github.com/umputun/local-docs-mcp.git
cd local-docs-mcp
make build
make install

Configure Claude

Add to ~/.claude.json:

json
{
  "mcpServers": {
    "local-docs": {
      "command": "local-docs-mcp"
    }
  }
}

Or use absolute path:

json
{
  "mcpServers": {
    "local-docs": {
      "command": "/path/to/local-docs-mcp"
    }
  }
}

Restart Claude Code to load the server.

Configuration

Command Line Options

bash
# customize documentation directories
local-docs-mcp --shared-docs-dir=~/.my-docs --docs-dir=documentation

# enable root-level markdown scanning
local-docs-mcp --enable-root-docs

# exclude directories from project docs scan
local-docs-mcp --exclude-dir=plans --exclude-dir=drafts

# multiple exclusions via environment variable
EXCLUDE_DIRS=plans,drafts,archive local-docs-mcp

Available options:

  • --shared-docs-dir - shared documentation directory (default: ~/.claude/commands)
  • --docs-dir - project docs directory (default: docs)
  • --enable-root-docs - scan root-level *.md files (default: disabled)
  • --exclude-dir - directories to exclude from project docs scan (default: plans)
  • --cache-ttl - cache time-to-live (default: 1h)
  • --max-file-size - maximum file size in bytes to index (default: 5242880 - 5MB)
  • --dbg - enable debug logging

Caching

File list caching is always enabled for significantly faster repeated queries. The cache TTL can be configured:

bash
# use default 1h TTL
local-docs-mcp

# custom TTL
local-docs-mcp --cache-ttl=30m

# via environment variable
CACHE_TTL=2h local-docs-mcp

Performance: Cache hits are ~3,000x faster than filesystem scans (66 nanoseconds vs 201 microseconds). The cache automatically invalidates when documentation files change, ensuring fresh data.

How it works:

  • First query scans filesystem and populates cache
  • Subsequent queries return instantly from memory
  • File watcher detects changes and invalidates cache within 500ms
  • TTL provides safety fallback (default: 1 hour)

Usage

Once configured, Claude can query documentation naturally:

  • "Show me docs for routegroup"
  • "Find documentation about testing"
  • "List all available commands"
  • "What's in the go-architect command?"

Available Tools

search_docs

Search for documentation files by name with fuzzy matching.

Input: {"query": "search-term"}

Output: Top 10 matching files with scores

read_doc

Read a specific documentation file.

Input: {"path": "file.md"} or {"path": "commands:action/commit.md"}

Output: File content with metadata

list_all_docs

List all available documentation files from all sources.

Output: Complete file listing with sizes and source information

Security

  • Path traversal prevention
  • File size limits (5MB)
  • UTF-8 validation
  • No symlink following outside base directories
  • Absolute path rejection

License

This project is licensed under the MIT License - see the LICENSE file for details.

インストール

TypingMind
{
  "mcpServers": {
    "local-docs-mcp": {
      "command": "local-docs-mcp",
      "args": []
    }
  }
}

Local Docs MCP ServerのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Local Docs MCP Serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Local Docs MCP Serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Local Docs MCP ServerのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "local-docs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてLocal Docs MCP ServerのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Local Docs MCP ServerのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Local Docs MCP Serverを使ってこのタスクを手伝ってもらえますか?
Local Docs MCP Server
はい、読みました。
Local Docs MCP Serverで調べた結果をお伝えします。

よくある質問

Local Docs MCP Server MCPサーバーは何に使いますか?

Local Docs MCP Serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでLocal Docs MCP Server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでLocal Docs MCP Serverを利用できます。

TypingMindでLocal Docs MCP Server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Local Docs MCP Serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Local Docs MCP Server MCPをTypingMindに接続するにはどうすればよいですか?

Local Docs MCP ServerはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでLocal Docs MCP Server MCPのどのようなツールを利用できますか?

Local Docs MCP ServerはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Local Docs MCP Server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Local Docs MCP Serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇