Lightrag MCP Server

MCP server for LightRag

Local serverstdioTypeScript

What is the Lightrag MCP server?

Connect Lightrag to Claude, Cursor or any other MCP client and it stops being a tab you switch to. MCP server for LightRag. The lightrag mcp server is what makes that connection.

What the server does

Model Context Protocol server for seamless LightRAG integration.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • insert_text — The insert_text tool exposed by this server
  • insert_texts — The insert_texts tool exposed by this server
  • scan_documents — Trigger scanning process for new documents in the input directory
  • get_documents_paginated — The get_documents_paginated tool exposed by this server
  • get_document_status_counts — The get_document_status_counts tool exposed by this server
  • get_track_status — The get_track_status tool exposed by this server
  • delete_document — The delete_document tool exposed by this server
  • clear_documents — The clear_documents tool exposed by this server
  • clear_cache — The clear_cache tool exposed by this server
  • reprocess_failed — 🔍 Queries (2 tools) - Search and retrieve information
  • query_text — The query_text tool exposed by this server
  • query_data — Advanced data retrieval endpoint for structured RAG analysis without LLM generation

Credentials and setup notes

Configuration is passed through the environment: LIGHTRAG_BASE_URL, LIGHTRAG_API_KEY. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

🏠︎ / Requirements Before you begin, make sure your environment meets these requirements: - Node.js 18+ (LTS recommended) - Running LightRAG server (default port 9621) - API key for authentication

Installation

The server ships on npm as @modelcontextprotocol/inspector, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Where it fits

Plenty of AI and media services servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Lightrag's toolset — insert_text, insert_texts, scan_documents and 11 more — is a fair guide to whether it matches your workflow. It is maintained by deight; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Lightrag.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
insert_textThe insert_text tool exposed by this server.
insert_textsThe insert_texts tool exposed by this server.
scan_documentsTrigger scanning process for new documents in the input directory.
get_documents_paginatedThe get_documents_paginated tool exposed by this server.
get_document_status_countsThe get_document_status_counts tool exposed by this server.
get_track_statusThe get_track_status tool exposed by this server.
delete_documentThe delete_document tool exposed by this server.
clear_documentsThe clear_documents tool exposed by this server.
clear_cacheThe clear_cache tool exposed by this server.
reprocess_failed<details> <summary><b>🔍 Queries (2 tools)</b> - Search and retrieve information</summary>
query_textThe query_text tool exposed by this server.
query_dataAdvanced data retrieval endpoint for structured RAG analysis without LLM generation.
get_graph_labelsThe get_graph_labels tool exposed by this server.
get_popular_labelsGet popular labels by node degree (most connected entities).

How to install the Lightrag MCP server

{
  "mcpServers": {
    "lightrag": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/inspector"],
      "env": {
        "LIGHTRAG_BASE_URL": "your-value",
        "LIGHTRAG_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

🏠︎ / Requirements Before you begin, make sure your environment meets these requirements: - Node.js 18+ (LTS recommended) - Running LightRAG server (default port 9621) - API key for authentication
VariableDescriptionRequired
LIGHTRAG_BASE_URLEndpoint or connection string the server talks to.Yes
LIGHTRAG_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Lightrag to insert text.
  • Use Lightrag to insert texts.
  • Use Lightrag to scan documents.

Frequently asked questions

It connects Lightrag to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (insert_text, insert_texts, scan_documents, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Lightrag directly.