LightRAG
A comprehensive MCP server for LightRAG integration with 22 tools for document management, querying, knowledge graph operations, and system management
What is LightRAG?
LightRAG is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to comprehensive mcp server for lightrag integration with 22 tools for document management, querying, knowledge graph operations, and system management
A comprehensive MCP server for LightRAG integration with 22 tools for document management, querying, knowledge graph operations, and system management
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A comprehensive MCP server for LightRAG integration with 22
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx daniel-lightragConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use LightRAG
Daniel LightRAG MCP Server is a full-featured integration layer between AI assistants and a running LightRAG instance, providing 22 tools that cover the complete knowledge management lifecycle: inserting and deleting documents, querying with naive/local/global/hybrid retrieval modes, inspecting and editing the underlying knowledge graph, and monitoring pipeline health. It is designed for developers building retrieval-augmented generation applications who want to control LightRAG programmatically through their AI assistant rather than through a separate UI or API client.
Prerequisites
- Python 3.10+ installed
- A running LightRAG server instance (default: http://localhost:9621)
- LIGHTRAG_BASE_URL environment variable pointing to your LightRAG server
- Optional: LIGHTRAG_API_KEY if your LightRAG server requires authentication
- An MCP-compatible client such as Claude Desktop or Cursor
Clone the repository
Clone the daniel-lightrag-mcp repository to your local machine, as the package is installed from source.
git clone https://github.com/desimpkins/daniel-lightrag-mcp.git
cd daniel-lightrag-mcpInstall the package
Install the MCP server and its dependencies in editable mode using pip.
pip install -e .Set environment variables
Configure the connection to your LightRAG server. At minimum, set LIGHTRAG_BASE_URL. Add LIGHTRAG_API_KEY if your server requires authentication.
export LIGHTRAG_BASE_URL=http://localhost:9621
export LIGHTRAG_API_KEY=your_api_key_hereAdd the server to your MCP client config
Register the server in your Claude Desktop or other MCP client configuration file, passing the environment variables needed to reach your LightRAG instance.
{
"mcpServers": {
"daniel-lightrag": {
"command": "python",
"args": ["-m", "daniel_lightrag_mcp"],
"env": {
"LIGHTRAG_BASE_URL": "http://localhost:9621",
"LIGHTRAG_API_KEY": "your_api_key_here"
}
}
}
}Verify server health
Ask your AI assistant to check the LightRAG server health using the built-in health check tool to confirm the MCP server can reach your LightRAG instance.
LightRAG Examples
Client configuration
Claude Desktop configuration for connecting to a local LightRAG instance via the Daniel LightRAG MCP server.
{
"mcpServers": {
"daniel-lightrag": {
"command": "python",
"args": ["-m", "daniel_lightrag_mcp"],
"env": {
"LIGHTRAG_BASE_URL": "http://localhost:9621",
"LIGHTRAG_API_KEY": "",
"LIGHTRAG_TIMEOUT": "30",
"LOG_LEVEL": "INFO"
}
}
}
}Prompts to try
Example prompts for document management, querying, and knowledge graph operations.
- "Insert this document into LightRAG: [paste text here]"
- "Query LightRAG with hybrid mode: what are the main concepts in my knowledge base?"
- "Show me the current pipeline status and document count"
- "Check if the entity 'machine learning' exists in the knowledge graph"
- "Delete all cached data and restart the pipeline"Troubleshooting LightRAG
All tool calls fail with a connection error
Verify that your LightRAG server is running and reachable at the URL set in LIGHTRAG_BASE_URL. Test with 'curl http://localhost:9621/health' to confirm the server is up before starting the MCP server.
Authentication errors when calling tools
If your LightRAG server is configured to require an API key, ensure LIGHTRAG_API_KEY is set correctly in the MCP server environment. Check the LightRAG server logs for the expected key format.
Query returns empty results despite documents being inserted
Check the pipeline status using the pipeline status tool. LightRAG processes documents asynchronously — wait for the pipeline to complete processing before querying. Use document status counts to verify ingestion finished.
Frequently Asked Questions about LightRAG
What is LightRAG?
LightRAG is a Model Context Protocol (MCP) server that comprehensive mcp server for lightrag integration with 22 tools for document management, querying, knowledge graph operations, and system management It connects AI assistants to external tools and data sources through a standardized interface.
How do I install LightRAG?
Follow the installation instructions on the LightRAG GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with LightRAG?
LightRAG works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is LightRAG free to use?
Yes, LightRAG is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
LightRAG Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to LightRAG? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up LightRAG in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use LightRAG?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.