mcp-lightrag
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Logging verbosity. Always written to stderr, never stdout, so it never corrupts the stdio JSON-RPC stream. | INFO |
| LIGHTRAG_URL | No | LightRAG's base URL. Use http://lightrag:9621 when running inside the same Docker network as the LightRAG container. | http://localhost:9621 |
| MCP_TRANSPORT | No | stdio or streamable-http. | stdio |
| MCP_SERVER_NAME | No | Name this server reports to MCP clients. | lightrag |
| LIGHTRAG_API_KEY | No | Sent as the X-API-Key header. | |
| LIGHTRAG_TIMEOUT | No | Default request timeout, in seconds. | 30 |
| LIGHTRAG_PASSWORD | No | Used when LightRAG has AUTH_ACCOUNTS enabled: calls POST /login for a JWT and re-logs in automatically on a 401. | |
| LIGHTRAG_USERNAME | No | Used when LightRAG has AUTH_ACCOUNTS enabled: calls POST /login for a JWT and re-logs in automatically on a 401. | |
| LIGHTRAG_VERIFY_SSL | No | Verify LightRAG's TLS certificate. | true |
| LIGHTRAG_QUERY_TIMEOUT | No | Timeout for /query and /query/data (these can run an LLM call). | 180 |
| LIGHTRAG_UPLOAD_TIMEOUT | No | Timeout for file uploads. | 300 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| healthA | Check whether LightRAG is reachable AND whether this server's
credentials actually work. |
| queryA | Answer a question using the knowledge base (RAG). Use this for any
question about the content stored in LightRAG -- it retrieves relevant
context and has an LLM compose the answer. Returns |
| query_dataA | Retrieve the raw entities, relationships and text chunks relevant to
a question, WITHOUT having LightRAG's LLM compose an answer. Use this
instead of |
| list_documentsA | List documents in the knowledge base, with pagination. This is the tool to use for "how many documents are there" or "list the documents" -- do not conclude the knowledge base is empty from a tool failure; that means LightRAG could not be reached, not that there are zero documents (this is the exact bug this server exists to fix). Returns a trimmed per-document summary (id, file_path, status, chunks_count, updated_at, error_msg if any) plus total_count and has_next. |
| get_document_status_countsA | Get the count of documents in each processing status (pending,
processing, processed, failed, ...). The fast, low-context way to
answer "how many documents does LightRAG have" -- prefer this over
|
| get_pipeline_statusA | Check what LightRAG's indexing pipeline is doing right now: busy or idle, current job name and progress, and the most recent status messages. Use this for "what is LightRAG processing" -- by default returns a short summary (the last 10 history lines), not the full internal state; pass verbose=true only if the summary is not enough. |
| get_track_statusA | Check the processing status of the document(s) associated with a track_id -- use this after insert_text/insert_texts/upload_file to see whether indexing finished, and whether it succeeded. |
| get_supported_file_typesA | List the file extensions LightRAG accepts for upload, and which
parser engine handles each. Check this before |
| get_scan_statusA | Check the progress of a background folder scan started by
|
| list_source_conflictsA | List documents whose source file name collides with another
document's (a "source conflict") -- these were never auto-resolved
because picking a winner automatically could retire the wrong
document. Use |
| insert_textA | Insert a single piece of raw text into the knowledge base for indexing. Returns a track_id -- poll with get_track_status to see when indexing finishes. |
| insert_textsA | Insert multiple pieces of raw text into the knowledge base in one call. Returns a single track_id covering the whole batch -- poll with get_track_status. |
| upload_fileA | Upload and index a single file already present on disk. Checks the file exists and its extension is supported before uploading -- call get_supported_file_types first if unsure. Returns a track_id; poll with get_track_status. |
| upload_directoryA | Upload every supported file directly inside a directory, one by one, reporting each file's own outcome -- unsupported extensions are skipped (not treated as errors), and one file failing does not stop the rest. Use this instead of calling upload_file in a loop. |
| scan_documentsA | Trigger a background scan of LightRAG's input directory for new files not yet indexed. Returns a track_id; poll with get_scan_status. Refuses with status='scanning_skipped_pipeline_busy' if a scan or the indexing pipeline is already running. |
| reprocess_failed_documentsA | Retry documents currently in a failed, pending, or interrupted state, without rescanning the input directory for new files. |
| delete_documentsA | DESTRUCTIVE: permanently deletes documents and all their associated data (status, text chunks, vector embeddings, related graph data). This cannot be undone. Runs in the background; use get_track_status or list_documents afterward to confirm. |
| clear_all_documentsA | DESTRUCTIVE: permanently deletes EVERY document in the knowledge base. This cannot be undone -- confirm with the user before calling this. |
| force_reset_recoveryA | DESTRUCTIVE: force-clears a 'recovery_required' fence that blocks every mutation after a worker died mid-operation. This reopens a possibly-inconsistent workspace and cannot be undone -- use only to recover a stuck pipeline, and only after checking get_pipeline_status first. No-ops (status='no_recovery_required') if nothing is fenced. |
| cancel_pipelineA | Request cancellation of the currently-running indexing pipeline job. Documents already in progress will be marked FAILED. Use get_pipeline_status first to see what would be cancelled; returns status='not_busy' if nothing is running. |
| repair_source_conflictA | Resolve a source-name conflict (from list_source_conflicts) by naming one document as the primary. Always dry_run first to see what would change; committing (dry_run=false) marks the other candidates as duplicates -- their content is not deleted, but this still cannot be trivially undone, so double-check the dry-run result first. |
| get_graph_labelsA | List every entity label (name) currently in the knowledge graph.
Can be long on a large knowledge base -- prefer |
| get_popular_labelsA | List entity labels sorted by how connected they are (node degree), most-connected first -- a quick way to see what the knowledge graph is mostly about. |
| search_labelsA | Find entity labels whose name fuzzy-matches a search string. Use
this to locate entities related to a topic before asking about them
with |
| get_knowledge_graphA | Retrieve a connected subgraph (nodes and edges) around one entity
label. Nodes closer to the label, and more connected nodes, are kept
first when the graph is larger than |
| check_entity_existsA | Check whether an entity with an exact name already exists in the
knowledge graph. Call this before |
| create_entityA | Create a new entity in the knowledge graph. Call
|
| edit_entityB | Update an entity's properties, optionally renaming it (and merging it into an existing entity of the same new name, if allowed). |
| create_relationA | Create a relationship between two entities that both already exist in the knowledge graph. |
| edit_relationC | Update the properties of an existing relationship between two entities. |
| merge_entitiesA | Merge one or more duplicate or misspelled entities into a single target entity. The merged-from entities are removed once this succeeds and this cannot be undone -- double check the names first. |
| delete_entityA | DESTRUCTIVE: permanently deletes an entity and all its relationships from the knowledge graph. This cannot be undone. |
| delete_relationA | DESTRUCTIVE: permanently deletes the relationship between two entities from the knowledge graph. This cannot be undone. The entities themselves are not deleted. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 33 tools
Each tool has a clearly distinct purpose; even similar tools like query/query_data and the various status getters are differentiated by explicit descriptions and intended use cases. No two tools appear to do the same thing.
The vast majority follow a verb_noun snake_case pattern (get_, list_, create_, delete_), with only minor exceptions like 'health' and 'query' that are still readable and do not cause confusion.
With 33 tools, the server exceeds the 25-tool threshold for 'too many'. While each tool is distinct, the large surface likely overwhelms agents and suggests some operations could be consolidated.
The tool set provides broad coverage of document ingestion, querying, status monitoring, and knowledge graph CRUD. Minor gaps like dedicated get_entity/get_relation tools are acceptable since get_knowledge_graph can retrieve entity and relation data.