LightRAG Code Brain MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LIGHTRAG_URL | Yes | URL of the LightRAG server | |
| LIGHTRAG_PASSWORD | Yes | Password for LightRAG authentication | |
| LIGHTRAG_USERNAME | Yes | Username for LightRAG authentication | |
| LIGHTRAG_DEFAULT_REPO_ID | Yes | Default repository ID | |
| LIGHTRAG_DEFAULT_REPO_ROOT | Yes | Default repository root path for indexing |
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 | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| rag_askA | Query the local LightRAG knowledge base for repository context. Use this before answering questions about code architecture, historical decisions, indexed docs, or cross-file behavior. |
| rag_get_contextA | Retrieve LightRAG context for a query without generating a final answer. |
| rag_query_dataC | Return structured LightRAG query data: entities, relations, chunks, and metadata. |
| rag_statusA | Check LightRAG health, active models, and document pipeline state. |
| rag_clearC | Clear LightRAG documents and/or cache. Destructive. |
| rag_index_repoB | Index a repository into LightRAG. Multi-repo support is provided by prefixing every source with repo_id:relative/path. |
| rag_list_documentsC | List indexed documents, optionally filtered by repo_id prefix. |
| rag_track_statusC | Get processing status for a LightRAG track_id. |
| rag_reprocess_failedB | Ask LightRAG to reprocess failed documents. |
| rag_cancel_pipelineA | Cancel the active LightRAG document processing pipeline, if any. |
| rag_webuiA | Return local LightRAG Web UI and API documentation URLs. |
| brain_rememberB | Persist a durable project memory into the local memory log and LightRAG. Use this after fixes, failed attempts, setup discoveries, architecture decisions, and session handoff notes. |
| brain_searchC | Search durable project memories and LightRAG semantic memory for prior fixes, failures, decisions, and setup outcomes. |
| brain_recentC | List recent durable project memories from the local memory log. |
| brain_reindexC | Replay the local durable memory log into LightRAG. |
| profile_bootstrapC | Build or refresh the structured senior-developer project profile from repository layout and project instruction files. |
| profile_getC | Return the structured senior-developer project profile. |
| profile_upsertC | Create or update one senior-developer knowledge item in the project profile and index it into LightRAG. |
| profile_searchC | Search the structured senior-developer project profile and semantic RAG profile. |
| senior_briefC | Return a senior-developer brief for a topic: architecture profile, conventions, hazards, workflows, and related durable memories. |
| brain_beginB | Start the mandatory project-brain workflow for a non-trivial task. Creates a local gate file and optionally runs senior_brief immediately. |
| brain_finishC | Finish the mandatory project-brain workflow and record whether memory/profile updates were made before final response. |
| brain_gate_statusB | Check whether the mandatory project-brain workflow gate is satisfied. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| LightRAG status | Current local LightRAG health and pipeline status. |
TDQS
Scored across 23 tools
Most tools have distinct purposes, especially within groups. However, brain_search, rag_ask, and profile_search all involve searching different stores, which could cause confusion if descriptions are not carefully read.
Tools follow a consistent verb_noun pattern with lowercase underscores, except 'senior_brief' which lacks a verb prefix. The pattern is clear within each prefix group (brain_, profile_, rag_).
23 tools is slightly on the higher side but still reasonable for a comprehensive memory and knowledge server. Each tool serves a specific function, and the count is not excessive.
The tool set covers core workflow, memory, profile, and RAG operations, but lacks delete/update tools for memories and profiles, and document-level deletion. Minor gaps exist but most use cases are addressed.