SL

shemhamforash23/lightrag-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

126 stars 41 forks 品質 62 トレンド 20

shemhamforash23/lightrag-mcpは、https://github.com/shemhamforash23/lightrag-mcp.からインポートされたMCPサーバー候補です。

概要

shemhamforash23/lightrag-mcpは、https://github.com/shemhamforash23/lightrag-mcp.からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

LightRAGをAIツールと統合するためのMCPサーバー。MCPプロトコルを通じてLightRAG APIと連携するための統一インターフェースを提供します。

説明

LightRAG MCP ServerはLightRAG APIとMCP互換クライアント間の橋渡し役です。MCPプロトコルをサポートするさまざまなAIツールでLightRAG(検索拡張生成)機能を利用できます。

主な特徴

  • 情報検索:文書への意味論的およびキーワードクエリの実行
  • 文書管理:文書のアップロード、索引、文書状況の追跡
  • 知識グラフ操作:知識グラフ内のエンティティと関係を管理
  • モニタリング:LightRAGのAPI状況および文書処理の確認

設置

このサーバーはMCPサーバーとして使用されるよう設計されており、システム全体のパッケージとしてではなく、uvを用いて仮想環境にインストールされるべきです。

開発インスタレーション

要件

  • Python 3.11+
  • LightRAG APIサーバーの実行

使用法

LightRAG MCPサーバーは2つのMCPトランスポートモードをサポートしています:

  • stdio(デフォルト):MCPクライアント設定ファイル(mcp-config.json)を通過して実行します。
  • streamable-http:リモートMCPクライアント向けにスタンドアロンのHTTPサーバーとして動作

コマンドラインオプション

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

LightRAG MCP Server

MCP server for integrating LightRAG with AI tools. Provides a unified interface for interacting with LightRAG API through the MCP protocol.

Description

LightRAG MCP Server is a bridge between LightRAG API and MCP-compatible clients. It allows using LightRAG (Retrieval-Augmented Generation) capabilities in various AI tools that support the MCP protocol.

Key Features

  • Information Retrieval: Execute semantic and keyword queries to documents
  • Document Management: Upload, index, and track document status
  • Knowledge Graph Operations: Manage entities and relationships in the knowledge graph
  • Monitoring: Check LightRAG API status and document processing

Installation

This server is designed to be used as an MCP server and should be installed in a virtual environment using uv, not as a system-wide package.

Development Installation

# Create a virtual environment
uv venv --python 3.11

# Install the package in development mode
uv pip install -e .

Requirements

  • Python 3.11+
  • Running LightRAG API server

Usage

LightRAG MCP server supports two MCP transport modes:

  • stdio (default): run through an MCP client configuration file (mcp-config.json)
  • streamable-http: run as a standalone HTTP server for remote MCP clients

Command Line Options

LightRAG API connection:

  • --host: LightRAG API host (default: localhost)
  • --port: LightRAG API port (default: 9621, or 443 when --ssl is set)
  • --api-key: LightRAG API key (optional)
  • --ssl: Use HTTPS instead of HTTP (default: False)

MCP transport:

  • --mcp-transport: MCP transport (stdio or streamable-http, default: stdio)
  • --mcp-host: MCP HTTP host (default: 127.0.0.1)
  • --mcp-port: MCP HTTP port (default: 8000)
  • --mcp-streamable-http-path: Streamable HTTP endpoint path (default: /mcp)
  • --mcp-stateless-http: Enable stateless Streamable HTTP mode (new session per request)
  • --mcp-json-response: Return JSON responses instead of SSE for Streamable HTTP

Integration with LightRAG API

The MCP server requires a running LightRAG API server. Start it as follows:

# Create virtual environment
uv venv --python 3.11

# Install dependencies
uv pip install -r LightRAG/lightrag/api/requirements.txt

# Start LightRAG API
uv run LightRAG/lightrag/api/lightrag_server.py --host localhost --port 9621 --working-dir ./rag_storage --input-dir ./input --llm-binding openai --embedding-binding openai --log-level DEBUG

Setting up as MCP server (stdio)

To set up LightRAG MCP as an MCP server, add the following configuration to your MCP client configuration file (e.g., mcp-config.json):

Using uvenv (uvx):

{
  "mcpServers": {
    "lightrag-mcp": {
      "command": "uvx",
      "args": [
        "lightrag_mcp",
        "--host",
GitHub で README 全文を見る

インストール

uvx lightrag_mcp --host localhost --port 9621 --api-key your_api_key
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "lightrag-mcp": { "command": "uvx", "args": [ "lightrag_mcp", "--host", "localhost", "--port", "9621", "--api-key", "your_api_key" ] } } }