home / mcp / daniel lightrag mcp server
A comprehensive MCP server for LightRAG integration with 22 tools for document management, querying, knowledge graph operations, and system management
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.
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.
# Basic installation
pip install -e .
# With development dependencies
pip install -e ".[dev]"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"]
}
}
}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.
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.
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.
Insert a single text document into LightRAG with the provided content.
Insert multiple text documents into LightRAG, including optional titles and metadata.
Upload a document file to LightRAG from a given file path.
Scan LightRAG for newly added documents to update the index.
Retrieve all documents stored in LightRAG.
Retrieve documents with pagination support for page number and page size.
Delete a specific document by its ID from LightRAG.
Remove all documents from LightRAG.
Execute a text-based query against LightRAG with optional modes and context behavior.
Stream results for a text query from LightRAG.
Retrieve the full knowledge graph from LightRAG.
Fetch all labels available in the knowledge graph.
Check whether a named entity exists in the knowledge graph.
Update properties for an existing knowledge graph entity.
Update properties for an existing knowledge graph relation.
Delete an entity from the knowledge graph.
Delete a relation from the knowledge graph.
Obtain current pipeline status from LightRAG.
Retrieve status information for a specific tracked operation.
Get counts of documents by processing status.
Clear the LightRAG cache to reset in-memory indices.
Check the LightRAG server health and responsiveness.