- Home
- MCP servers
- Daniel LightRAG
Daniel LightRAG
- python
26
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"desimpkins-daniel-lightrag-mcp": {
"command": "python",
"args": [
"-m",
"daniel_lightrag_mcp"
],
"env": {
"LOG_LEVEL": "INFO",
"LIGHTRAG_API_KEY": "YOUR_API_KEY",
"LIGHTRAG_TIMEOUT": "30",
"LIGHTRAG_BASE_URL": "http://localhost:9621"
}
}
}
}You operate the Daniel LightRAG MCP Server, which bridges LightRAG with your MCP client to provide 22 tools across document management, querying, knowledge graph operations, and system management. This server lets you insert and retrieve documents, run advanced queries, manage knowledge graph entities and relations, and monitor health and caches, all through a consistent MCP interface.
How to use
You connect your MCP client to the Daniel LightRAG MCP Server and use the available tools to manage documents, run queries, and oversee knowledge graph data. Start by ensuring LightRAG is running on http://localhost:9621, then launch the MCP server configured to invoke the Python module that exposes the MCP interface. Use the MCP client to call tools by name and provide the required parameters. If you need to verify connectivity, run the health check tool and confirm a healthy response.
How to install
# Basic installation
pip install -e .
# With development dependencies
pip install -e ".[dev]"
Configuration and usage notes
The MCP server is started as a local stdio server that runs the Python module for the MCP interface. You configure your MCP client to connect to this local runtime and pass environment settings to align with your LightRAG instance. The following configuration example shows how to register the server in an MCP client, using Python as the launcher and the module name daniel_lightrag_mcp.
{
"mcpServers": {
"daniel_lightrag": {
"command": "python",
"args": ["-m", "daniel_lightrag_mcp"]
}
}
}
Security and environment setup
The server relies on LightRAG being accessible at the address you configure. You can provide an API key and base URL to regulate access and timeouts. In typical setups you pass environment variables to the MCP process to point it at LightRAG and to supply optional security credentials.
Troubleshooting quick checks
If you run into issues, verify LightRAG is reachable, then test the MCP server start sequence. Check that the environment variables are set correctly and that the server process starts without errors. If a specific tool reports an error, review the error details to determine whether it is a connectivity, authentication, or parameter validation issue.
Example workflows
You can perform end-to-end workflows that involve inserting documents, querying for insights, and examining the knowledge graph to confirm relationships between entities. Start with a health check, add documents with the appropriate insert tool, then run a query and explore the knowledge graph structure to verify results.
Available tools
insert_text
Insert a single text document into LightRAG with the provided content.
insert_texts
Insert multiple text documents into LightRAG, including optional titles and metadata.
upload_document
Upload a document file to LightRAG from a given file path.
scan_documents
Scan LightRAG for newly added documents to update the index.
get_documents
Retrieve all documents stored in LightRAG.
get_documents_paginated
Retrieve documents with pagination support for page number and page size.
delete_document
Delete a specific document by its ID from LightRAG.
clear_documents
Remove all documents from LightRAG.
query_text
Execute a text-based query against LightRAG with optional modes and context behavior.
query_text_stream
Stream results for a text query from LightRAG.
get_knowledge_graph
Retrieve the full knowledge graph from LightRAG.
get_graph_labels
Fetch all labels available in the knowledge graph.
check_entity_exists
Check whether a named entity exists in the knowledge graph.
update_entity
Update properties for an existing knowledge graph entity.
update_relation
Update properties for an existing knowledge graph relation.
delete_entity
Delete an entity from the knowledge graph.
delete_relation
Delete a relation from the knowledge graph.
get_pipeline_status
Obtain current pipeline status from LightRAG.
get_track_status
Retrieve status information for a specific tracked operation.
get_document_status_counts
Get counts of documents by processing status.
clear_cache
Clear the LightRAG cache to reset in-memory indices.
get_health
Check the LightRAG server health and responsiveness.