Skip to main content
Glama
TimaxLacs

lightrag-mcp

by TimaxLacs

lightrag-mcp

MCP server that connects LightRAG to any MCP client — Cursor, Claude Desktop, and others. Gives the agent access to a persistent knowledge base: notes, decisions, documentation, runbooks.

Two tools, because knowledge retrieval has two different scenarios:

Tool

What it does

When you need it

search_lightrag

Returns a ready answer with source links

A regular question to the knowledge base

get_lightrag_context

Returns only context and sources, without generating an answer

When you need to assemble the answer yourself: cross-check with code, combine with the current conversation

Both tools are marked as readOnlyHint, so the client will not treat them as state-changing.

Installation

npm install

Requires Node.js 18 or newer — the built-in fetch is used.

Related MCP server: expert-mcp-server

Configuration

Create .env next to package.json:

LIGHTRAG_URL=http://localhost:9621
LIGHTRAG_API_KEY=ваш-ключ

LIGHTRAG_URL is optional and defaults to http://localhost:9621. LIGHTRAG_API_KEY is required: without it the server fails at startup with a clear error, not at the first request.

The path to the environment file can be overridden with the LIGHTRAG_MCP_ENV_FILE variable — convenient when the client launches the server from a different working directory.

Connecting to Cursor

In ~/.cursor/mcp.json:

{
  "mcpServers": {
    "lightrag": {
      "command": "node",
      "args": ["/абсолютный/путь/lightrag-mcp/src/server.js"],
      "env": {
        "LIGHTRAG_MCP_ENV_FILE": "/абсолютный/путь/lightrag-mcp/.env"
      }
    }
  }
}

Search modes

The mode parameter accepts mix (default), hybrid, local, global, and naive. An unknown mode is rejected before the network request. Requests always go out with source links and reranking enabled.

Tests

npm test

Tests use the built-in node --test, with no external dependencies. HTTP is mocked via the fetchImpl parameter, so both successful responses and errors are covered: missing key, empty question, unknown mode, unsuccessful response status.

License

MIT

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

UpdatingMaintainers
UpdatingResponse time
Release cycle
0Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables AI agents to query specialized, domain-specific knowledge bases built using the LightRAG framework for enhanced retrieval-augmented generation. It allows for managing and searching knowledge graphs and vector embeddings to provide accurate, context-aware information during an AI assistant's reasoning process.
    59
    MIT

View all related MCP servers

Related MCP Connectors

  • Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.

  • Shared, peer-validated knowledge archive for AI agents — search, contribute, and validate via MCP

  • Agentic search over your Dewey document collections from any MCP-compatible client.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TimaxLacs/lightrag-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server