lightrag-mcp
lightrag-mcp
MCP 服务器,将 LightRAG 连接到任何 MCP 客户端——Cursor、Claude Desktop 等。为代理提供持久化知识库访问:笔记、决策、文档、runbook。
两个工具,因为知识检索有两种不同的场景:
工具 | 功能 | 适用场景 |
| 返回带来源链接的现成答案 | 对知识库的常规提问 |
| 仅返回上下文和来源,不生成答案 | 需要自行组装答案时:与代码核对、与当前对话结合 |
两个工具均标记为 readOnlyHint,因此客户端不会将其视为改变状态的操作。
安装
npm install需要 Node.js 18 或更高版本——使用内置的 fetch。
Related MCP server: expert-mcp-server
配置
在 package.json 旁边创建 .env:
LIGHTRAG_URL=http://localhost:9621
LIGHTRAG_API_KEY=ваш-ключLIGHTRAG_URL 为可选参数,默认值为 http://localhost:9621。
LIGHTRAG_API_KEY 为必填项:缺少时服务器会在启动时立即报错并给出明确提示,而不是等到首次请求时才失败。
环境文件路径可通过 LIGHTRAG_MCP_ENV_FILE 变量覆盖——当客户端从其他工作目录启动服务器时非常方便。
连接到 Cursor
在 ~/.cursor/mcp.json 中:
{
"mcpServers": {
"lightrag": {
"command": "node",
"args": ["/абсолютный/путь/lightrag-mcp/src/server.js"],
"env": {
"LIGHTRAG_MCP_ENV_FILE": "/абсолютный/путь/lightrag-mcp/.env"
}
}
}
}搜索模式
mode 参数接受 mix(默认)、hybrid、local、global 和 naive。未知模式会在发起网络请求之前被拒绝。请求始终携带来源链接并启用重排序。
测试
npm test测试使用内置的 node --test,无外部依赖。HTTP 通过 fetchImpl 参数进行替换,因此既覆盖成功响应,也覆盖错误场景:缺少密钥、空问题、未知模式、响应状态失败。
许可证
MIT
This server cannot be installed
Maintenance
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
- AlicenseNot gradedqualityCmaintenanceAn 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.59MIT
- AlicenseAqualityDmaintenanceEnables MCP-compatible agents to query beliefs, search documents, and explore reasoning chains from expert-service knowledge bases.10MIT
- AlicenseNot gradedqualityBmaintenanceEnables document-based Q&A with multi-modal RAG, hybrid retrieval, knowledge graph reasoning, and multi-agent orchestration via MCP tools.4MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying company knowledge base using RAG, providing accurate answers from internal documents via MCP.
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.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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