EM

enriquecatala/mcp-lightrag

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

8 stars 0 forks Качество 52 Тренд 24

the best mcp server for lightrag with support for idempotent uploads

Обзор

A Model Context Protocol (MCP) server that enables AI assistants to interact with LightRAG knowledge graphs. Query documents, manage entities, and build semantic relationships through a standardized tool interface. : The built-in smart upsert and document tracking capabilities make it perfect for agents that need to sync and reason over evolving Obsidian knowledge bases. - : Intelligent upsert logic that detects changes in documents, skipping redundant uploads and re-indexing only when necessary - : Perform semantic, keyword, or hybrid searches across your indexed documents - : Add text, files, or entire directories to your knowledge base - : Create, update, merge, and delete entities in the graph - : Define and modify connections between entities - : Automatic retry with exponential backoff for reliable API communication - : Set options via environment variables or command-line arguments 1. (must be running before the MCP server) 3.

README

Показан фрагмент оригинального README. Открыть оригинал.

LightRAG MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to interact with LightRAG knowledge graphs. Query documents, manage entities, and build semantic relationships through a standardized tool interface. Optimized for Obsidian Vaults: The built-in smart upsert and document tracking capabilities make it perfect for agents that need to sync and reason over evolving Obsidian knowledge bases.

Features

  • Smart Updates: Intelligent upsert logic that detects changes in documents, skipping redundant uploads and re-indexing only when necessary
  • Knowledge Graph Queries: Perform semantic, keyword, or hybrid searches across your indexed documents
  • Document Ingestion: Add text, files, or entire directories to your knowledge base
  • Entity Management: Create, update, merge, and delete entities in the graph
  • Relationship Handling: Define and modify connections between entities
  • Robust Connectivity: Automatic retry with exponential backoff for reliable API communication
  • Flexible Configuration: Set options via environment variables or command-line arguments

Installation

# Clone the repository
git clone https://github.com/enriquecatala/mcp-lightrag.git
cd mcp-lightrag

# Install dependencies
uv sync

Quick Start

  1. Start your LightRAG server (must be running before the MCP server)

  2. Launch the MCP server:

    uv run mcp-lightrag --host localhost --port 9621
    
  3. Connect your AI assistant via the MCP protocol (stdio transport)

Configuration

Option Environment Variable Default Description
--host LIGHTRAG_HOST localhost LightRAG API host
--port LIGHTRAG_PORT 9621 LightRAG API port
--api-key LIGHTRAG_API_KEY (none) Optional API key
--log-level — INFO Logging verbosity

Setting up as MCP Server

To integrate this server with an MCP client (such as Claude Desktop), add the following configuration to your mcp-server-config.json key in your settings file. This configuration uses uv to run the server from the source directory.

{
  "mcpServers": {
    "mcp-lightrag": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/mcp-lightrag",
        "run",
        "mcp-lightrag",
        "--host",
        "localhost",
        "--port",
        "9621"
      ],
      "env": {
        "LIGHTRAG_API_KEY": "optional_api_key"
      }
    }
  }
}

Note: Replace /absolute/path/to/mcp-lightrag with the actual full path to where you cloned this repository.

Smart Document Handling

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "mcp-lightrag": { "command": "uv", "args": [ "--directory", "/absolute/path/to/mcp-lightrag", "run", "mcp-lightrag", "--host", "localhost", "--port", "9621" ], "env": { "LIGHTRAG_API_KEY": "optional_api_key" } } } }