Skip to main content
Glama
kazuph

MCP Docs RAG Server

by kazuph

mcp-docs-rag MCP サーバー

ローカルディレクトリ内のドキュメントの RAG (検索拡張生成)

これはTypeScriptベースのMCPサーバーで、ローカルディレクトリに保存されたドキュメント用のRAGシステムを実装しています。ユーザーは、ローカルに保存されたリポジトリやテキストファイルからコンテキスト付きLLMを使用してドキュメントをクエリできます。

特徴

リソース

  • docs:// URI 経由でドキュメントの一覧表示とアクセスを行う

  • ドキュメントはGitリポジトリまたはテキストファイルになります

  • コンテンツアクセス用のプレーンテキスト MIME タイプ

ツール

  • list_documents - DOCS_PATH ディレクトリにある利用可能なすべてのドキュメントを一覧表示します

    • すべてのドキュメントのフォーマットされたリストを返します

    • 利用可能なドキュメントの総数を表示します

  • rag_query - RAG を使用してドキュメントをクエリする

    • document_idとクエリをパラメータとして受け取ります

    • ドキュメントからコンテキストを抽出した AI 生成の応答を返します

  • add_git_repository - オプションのスパースチェックアウトを使用して、Git リポジトリを docs ディレクトリにクローンします。

    • パラメータとしてrepository_urlを取る

    • ドキュメントの名前をカスタマイズするためのオプションの document_name パラメータ(「-docs」サフィックスなしの単純な説明的な名前を使用)

    • 特定のディレクトリのスパースチェックアウトのためのオプションのサブディレクトリパラメータ

    • リポジトリがすでに存在する場合は最新の変更を自動的に取得します

  • add_text_file - テキストファイルをドキュメントディレクトリにダウンロードします

    • file_urlをパラメータとして受け取ります

    • wgetを使用してファイルをダウンロードする

プロンプト

  • guide_documents_usage - ドキュメントと RAG 機能の使用方法に関するガイド

    • 利用可能な文書のリストが含まれています

    • RAG機能の使用ヒントを提供します

Related MCP server: MCP-Typescribe

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

設定

このサーバーはドキュメントを保存するためのローカルディレクトリを必要とします。デフォルトでは~/docsが使用されますが、 DOCS_PATH環境変数で別の場所を指定することもできます。

ドキュメント構造

ドキュメント ディレクトリには次のものを含めることができます。

  • Git リポジトリ (クローンされたディレクトリ)

  • プレーンテキストファイル(拡張子.txt)

各ドキュメントは、Google の Gemini 埋め込みを使用した llama-index.ts を使用して個別にインデックス化されます。

APIキー

このサーバーは、ドキュメントのインデックス作成とクエリにGoogleのGemini APIを使用しています。環境変数としてGemini APIキーを設定する必要があります。

export GEMINI_API_KEY=your-api-key-here

Gemini APIキーはGoogle AI Studioウェブサイトから取得できます。このキーをシェルプロファイルに追加するか、Claude Desktopの環境設定に含めてください。

インストール

Claude Desktop で使用するには、サーバー設定を追加します。

MacOS の場合: ~/Library/Application Support/Claude/claude_desktop_config.json Windows の場合: %APPDATA%/Claude/claude_desktop_config.json Linux の場合: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "docs-rag": {
      "command": "npx",
      "args": ["-y", "@kazuph/mcp-docs-rag"],
      "env": {
        "DOCS_PATH": "/Users/username/docs",
        "GEMINI_API_KEY": "your-api-key-here"
      }
    }
  }
}

/Users/username/docsドキュメント ディレクトリへの実際のパスに置き換えてください。

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。パッケージスクリプトとして提供されているMCP Inspectorの使用をお勧めします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

使用法

設定が完了すると、Claude でサーバーを使用して次のことが可能になります。

  1. ドキュメントを追加:

    Add a new document from GitHub: https://github.com/username/repository

    またはカスタムドキュメント名を使用します:

    Add GitHub repository https://github.com/username/repository-name and name it 'framework'

    または、特定のディレクトリのスパースチェックアウトを使用します。

    Add only the 'src/components' directory from https://github.com/username/repository

    または、カスタム名とスパースチェックアウトを組み合わせる:

    Add the 'examples/demo' directory from https://github.com/username/large-repo and name it 'demo-app'

    またはテキストファイルを追加します:

    Add this text file: https://example.com/document.txt
  2. クエリドキュメント:

    What does the documentation say about X in the Y repository?
  3. 利用可能なドキュメントの一覧:

    What documents do you have access to?

サーバーは、効率的な検索のためにドキュメントのインデックス作成を自動的に処理します。

F
license - not found
A
quality
F
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context. Uses Ollama or OpenAI to generate embeddings. Docker files included
    22
    30
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables LLMs to understand and work with TypeScript APIs they haven't been trained on by providing structured access to TypeScript type definitions and documentation.
    30
    46
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    A complete MCP server for Retrieval-Augmented Generation with file management and vector memory for agents. Supports multiple document formats (PDF, DOCX, TXT, MD, CSV, JSON) with semantic search using Hugging Face embeddings and ChromaDB for efficient vector storage.
    11
    12
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • An MCP server that gives your AI access to the source code and docs of all public github repos

  • Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.

  • Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer

View all MCP Connectors

Latest Blog Posts

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/kazuph/mcp-docs-rag'

If you have feedback or need assistance with the MCP directory API, please join our Discord server