Lightrag MCP Server logo

Lightrag MCP Server

by @g99

Model Context Protocol (MCP) server for LightRAG - 30 fully working tools with complete RAG and Knowledge Graph integration

  • InstallableWe know how to install it, but have not yet seen it complete a handshake.
  • Health: Not checked yetWe have not completed a health check for this listing yet.No health check has run yet.
  • Knowledge & Memory
  • 10stars
  • No ratings User RatingsBe the first to rate and review this MCP server!
  • UpdatedOct 29, 2026
  • Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time — check back soon.

Install Lightrag MCP Server

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "g99-lightrag-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@g99/lightrag-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

Not checked yetNo health check has run yet.

We have not completed a health check for this listing yet.

From the project README

LightRAG MCP Server

A comprehensive Model Context Protocol (MCP) server for LightRAG - Simple and Fast Retrieval-Augmented Generation. This server enables AI assistants to interact with LightRAG's powerful knowledge graph and RAG capabilities.

Overview

LightRAG MCP Server provides complete integration with LightRAG's API, offering 30 fully working tools for document management, knowledge graph operations, querying, and system management. Build sophisticated RAG applications with knowledge graph capabilities through a simple MCP interface.

Features

  • Complete LightRAG API Coverage: Access all major LightRAG endpoints
  • 30 Working Tools: All tools fully functional with correct API endpoints
  • Knowledge Graph Operations: Full control over entities and relationships
  • Multiple Query Modes: Support for naive, local, global, hybrid, and mix modes
  • Document Management: Insert, upload, scan, and manage documents
  • Streaming Support: Real-time streaming responses for queries
  • Easy Installation: Install via npx

Installation

Quick Start (Recommended)

Terminal
npx @g99/lightrag-mcp-server

Global Installation

Terminal
npm install -g @g99/lightrag-mcp-server

From Source

bash
git clone https://github.com/lalitsuryan/lightragmcp.git
cd lightragmcp
npm install

Prerequisites

You need a running LightRAG server instance. Install and start LightRAG:

bash
# Install LightRAG
pip install "lightrag-hku[api]"

# Create .env file with your LLM and embedding configurations
cp env.example .env

# Start LightRAG server (default: http://localhost:9621)
lightrag-server

For detailed LightRAG server setup, visit LightRAG GitHub.

Configuration

Environment Variables

Create a .env file or set the following environment variables:

env
# Required: Your LightRAG server URL
LIGHTRAG_SERVER_URL=http://localhost:9621

# Optional: Authentication token if your LightRAG server requires it
LIGHTRAG_API_KEY=your_api_key_here

# Optional: Custom workspace name for data isolation
LIGHTRAG_WORKSPACE=default

Getting Your API Key

If your LightRAG server has authentication enabled:

  1. Check your LightRAG server's .env file for LIGHTRAG_API_KEY
  2. Alternatively, check the startup logs for the API key
  3. Use that key in your MCP configuration

MCP Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

config.json
{
  "mcpServers": {
    "lightrag": {
      "command": "npx",
      "args": ["@g99/lightrag-mcp-server"],
      "env": {
        "LIGHTRAG_SERVER_URL": "http://localhost:9621",
        "LIGHTRAG_API_KEY": "your_api_key_here"
      }
    }
  }
}

Cline (VS Code Extension)

Add to your MCP settings:

config.json
{
  "mcpServers": {
    "lightrag": {
      "command": "npx",
      "args": ["@g99/lightrag-mcp-server"],
      "env": {
        "LIGHTRAG_SERVER_URL": "http://localhost:9621",
        "LIGHTRAG_API_KEY": "your_api_key_here"
      }
    }
  }
}

Available Tools

Document Management Tools (10 tools)

insert_text

Insert a single text document into LightRAG.

Parameters:

  • text (required): Text content to insert
  • description (optional): Description of the text

Example:

config.json
{
  "text": "LightRAG is a powerful retrieval-augmented generation system that uses knowledge graphs.",
  "description": "Introduction to LightRAG"
}

insert_texts

Insert multiple text documents into LightRAG in batch.

Parameters:

  • texts (required): Array of text documents with optional metadata

Example:

config.json
{
  "texts": [
    {
      "content": "LightRAG uses knowledge graphs for enhanced retrieval.",
      "title": "LightRAG Overview",
      "metadata": {"category": "documentation"}
    },
    {
      "content": "Knowledge graphs connect entities and relationships.",
      "title": "Knowledge Graphs"
    }
  ]
}

upload_document

Upload a document file to LightRAG.

Parameters:

  • file_path (required): Path to the file to upload
  • chunk_size (optional): Custom chunk size for document splitting
  • chunk_overlap (optional): Overlap size between chunks

Example:

config.json
{
  "file_path": "/path/to/document.pdf",
  "chunk_size": 1200,
  "chunk_overlap": 100
}

upload_documents

Upload multiple documents in batch.

Parameters:

  • file_paths (required): Array of file paths to upload

Example:

config.json
{
  "file_paths": [
    "/path/to/doc1.pdf",
    "/path/to/doc2.txt",
    "/path/to/doc3.docx"
  ]
}

scan_documents

Scan for new documents in the configured input directory.

Parameters: None

Example:

config.json
{}

get_documents

Retrieve all documents from LightRAG.

Parameters: None

Example:

config.json
{}

get_documents_paginated

Retrieve documents with pagination support.

Parameters:

  • page (required): Page number (1-based)
  • page_size (required): Number of documents per page (1-100)

Example:

config.json
{
  "page": 1,
  "page_size": 20
}

delete_document

Delete a specific document by ID.

Parameters:

  • document_id (required): ID of the document to delete

Example:

config.json
{
  "document_id": "doc_12345"
}

clear_documents

Clear all documents from LightRAG.

Parameters: None

Example:

config.json
{}

document_status

Get processing status for documents.

Parameters:

  • document_id (optional): Specific document ID to check

Example:

config.json
{
  "document_id": "doc_12345"
}

Query Tools (3 tools)

query_text

Query LightRAG with text using various retrieval modes.

Parameters:

  • query (required): Query text
  • mode (optional): Query mode - "naive", "local", "global", "hybrid", or "mix" (default: "hybrid")
  • only_need_context (optional): Return only context without generation (default: false)
  • top_k (optional): Number of top results to retrieve (default: 60)
  • max_tokens (optional): Maximum tokens in response

Example:

config.json
{
  "query": "What are the main concepts in machine learning?",
  "mode": "hybrid",
  "top_k": 20
}

query_text_stream

Stream query results from LightRAG in real-time.

Parameters:

  • query (required): Query text
  • mode (optional): Query mode (default: "hybrid")
  • only_need_context (optional): Return only context (default: false)

Example:

config.json
{
  "query": "Explain the evolution of artificial intelligence",
  "mode": "global"
}

query_with_citation

Query LightRAG and get results with source citations.

Parameters:

  • query (required): Query text
  • mode (optional): Query mode (default: "hybrid")

Example:

config.json
{
  "query": "What is retrieval-augmented generation?",
  "mode": "hybrid"
}

Knowledge Graph Tools (8 tools)

get_knowledge_graph

Retrieve the complete knowledge graph from LightRAG.

Parameters: None

Example:

config.json
{}

get_graph_structure

Get the structure and statistics of the knowledge graph.

Parameters: None

Example:

config.json
{}

get_entities

Retrieve all entities from the knowledge graph.

Parameters:

  • limit (optional): Maximum number of entities to retrieve

Example:

config.json
{
  "limit": 100
}

get_relations

Retrieve all relationships from the knowledge graph.

Parameters:

  • limit (optional): Maximum number of relations to retrieve

Example:

config.json
{
  "limit": 100
}

check_entity_exists

Check if an entity exists in the knowledge graph.

Parameters:

  • entity_name (required): Name of the entity to check

Example:

config.json
{
  "entity_name": "Machine Learning"
}

update_entity

Update properties of an entity in the knowledge graph.

Parameters:

  • entity_id (required): ID of the entity to update
  • properties (required): Properties to update

Example:

config.json
{
  "entity_id": "entity_123",
  "properties": {
    "description": "Updated description",
    "category": "AI Technology"
  }
}

delete_entity

Delete an entity from the knowledge graph.

Parameters:

  • entity_id (required): ID of the entity to delete

Example:

config.json
{
  "entity_id": "entity_789"
}

delete_relation

Delete a relationship from the knowledge graph.

Parameters:

  • relation_id (required): ID of the relation to delete

Example:

config.json
{
  "relation_id": "rel_456"
}

System Management Tools (5 tools)

get_health

Check LightRAG server health and status.

Parameters: None

Example:

config.json
{}

get_status

Get detailed system status and statistics.

Parameters: None

Example:

config.json
{}

clear_cache

Clear LightRAG's internal cache.

Parameters:

  • cache_type (optional): Type of cache to clear (default: "all")

Example:

config.json
{
  "cache_type": "llm"
}

get_config

Get current LightRAG server configuration.

Parameters: None

Example:

config.json
{}

get_workspace_info

Get information about the current workspace.

Parameters: None

Example:

config.json
{}

Usage Examples

Example 1: Index and Query Documents

typescript
// Insert documents
await use_mcp_tool("lightrag", "insert_texts", {
  texts: [
    {
      content: "LightRAG is an advanced RAG system with knowledge graph capabilities.",
      title: "LightRAG Introduction"
    },
    {
      content: "Knowledge graphs enhance retrieval by capturing entity relationships.",
      title: "Knowledge Graphs"
    }
  ]
});

// Query the indexed content
await use_mcp_tool("lightrag", "query_text", {
  query: "How does LightRAG use knowledge graphs?",
  mode: "hybrid"
});

Example 2: Upload and Process Documents

typescript
// Upload a PDF document
await use_mcp_tool("lightrag", "upload_document", {
  file_path: "/path/to/research-paper.pdf"
});

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Lightrag MCP Server

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "lightrag-mcp-server": { "command": "npx", "args": ["-y","@g99/lightrag-mcp-server"] } }

Model Context Protocol (MCP) server for LightRAG - 30 fully working tools with complete RAG and Knowledge Graph integration

We don't have confirmed pricing for @g99/lightrag-mcp-server. Listing it on AllMCPs is free, but that says nothing about what the server itself costs — check the project's own site for current pricing.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLightrag MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/g99-lightrag-mcp-server?style=directory)](https://allmcps.com/mcp/g99-lightrag-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/g99-lightrag-mcp-server"><img src="https://allmcps.com/api/badge/g99-lightrag-mcp-server?style=directory" alt="Lightrag MCP Server on AllMCPs" /></a>