mcp-rag
Summary: This MCP server gives an AI client token-scoped access to the MCP RAG knowledge base — identifying the caller, reading project details, and searching or adding knowledge — with every action audited to the token's owner.
Identify context (
whoami) — confirm which user and project the API token is bound to, so actions can be attributed correctly.Inspect the project (
get_project) — retrieve the project's title, summary, and how many knowledge-base chunks it holds.Semantic search (
search_knowledge) — rank stored chunks by meaning (1–25 results, default 5); requires the user's own OpenRouter API key set in the web app.Add knowledge (
add_knowledge) — store a text chunk into the project's knowledge base for later retrieval; also requires the OpenRouter key for embedding.Project management (per the README, not in the supplied schema):
change_project_title,change_project_description,add_member— the backend resolves the acting user and project from the token, but these tools are not injection-proof, andadd_memberdeliberately cannot grantadmin.Scope limits: no shell, file-system, or arbitrary network access — only these token-authorized tools against one project, with identity enforced server side.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-rag search my knowledge base for deployment steps"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-rag-mcp-server
A Model Context Protocol server that exposes the MCP RAG knowledge base to MCP compatible clients such as Claude Desktop and IDE assistants.
It is a thin adapter over the Express backend in
LXVault/server-expressjs. It authenticates
with a per project access token generated in the
web app, and the backend records every call in
its audit log, so any action taken through this server is traceable to the user who
generated that token.
Tools
Eight, in three groups:
Identity:
whoami,get_project.Knowledge:
search_knowledge,add_knowledge,upload_file.Project management:
change_project_title,change_project_description,add_member.
Arguments, return values and the embedding prerequisites: Tools reference.
The project management tools never trust a claimed identity or target. The backend resolves the acting user and the project from the token and enforces the scope server side, so a prompt injected tool call cannot act as a different user or reach a different project.
That is the guarantee, and it is worth being exact about what it is not: it does not
make these tools injection-proof. A prompt injected call can still invoke any tool the
token's user is authorized to invoke. Two things follow. add_member does not offer
admin, because granting it is the one action whose worst outcome is durable — an admin
can hand the role on, and an assistant can be talked into it by a document in the
knowledge base. And a token should be minted for a project whose contents you would still
be willing to read if an attacker could write them.
Related MCP server: autotuesday-kb-mcp
Quick start
npm install
npm run build
MCP_API_BASE_URL=http://localhost:4000/api \
MCP_API_TOKEN=mcp_xxxxxxxx \
npm startGenerate the token from the web app's Access Tokens page. Note that the base URL includes
/api. The server speaks JSON-RPC over stdio, so it is normally launched by an MCP client
rather than by hand.
The source is TypeScript in src/, compiled to dist/ by npm run build. npm test runs
the tool surface check.
Documentation
Overview, what the server exposes and why the token matters.
Tools reference, every tool and its arguments.
Setup, installing and wiring it into an MCP client.
Environment variables, both values and what a wrong one does.
Claude Desktop extension, packaging a one click bundle.
The full documentation map is
.agents/index/project-wiki-index.md.
Working with agents
Agent instructions start at AGENTS.md. Shared conventions come from the
LXAgents instruction set served by the lxagents-agents-base MCP connector; this
repository carries only what is its own.
License
MIT. See LICENSE.
Available Tools
4 toolsadd_knowledgeA
Save a piece of text as a new chunk in the project's knowledge base so it can be retrieved later with search_knowledge. The chunk is embedded with the project's model, so the user's OpenRouter API key must be set in the web app.
Inputs: content (required).
get_projectA
Get details about the project this token grants access to, including its title, summary and the number of knowledge-base chunks available.
Inputs: no named parameters.
search_knowledgeA
Semantic search over the project's knowledge base: ranks chunks by meaning using the project's embedding model. Requires the user to have set their own OpenRouter API key in the web app (Profile).
Inputs: query (required), limit.
whoamiA
Identify the user and project that the current API token is bound to. Use this to confirm whose context actions will be attributed to.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct action: adding knowledge, retrieving project details, semantic search, and identity confirmation. No overlap in purpose.
All tools use consistent snake_case with a verb_noun pattern (add_knowledge, get_project, search_knowledge), and whoami follows the same style.
4 tools is well-scoped for a minimal RAG server, covering the essential operations without unnecessary bloat.
Core operations (add, search, project info, identity) are present. Missing delete/update for knowledge is a minor gap, but the server covers the main use case.
Maintenance
Related MCP Connectors
Project memory, documentation and controlled secret access for AI coding agents.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Private, multimodal knowledge store for agents: hybrid search with cited, provenance-backed results.
Ask your own documents and get answers that cite the source passage. Workspace knowledge bases over MCP for Cursor, Claude and any MCP client.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceProvides centralized knowledge management for projects, allowing users to store, search, and maintain project-specific knowledge that persists across sessions.2714 npm1-
- FlicenseNot gradedqualityDmaintenanceEnables secure access to an organizational knowledge base via Supabase (RLS), providing tools for search, retrieval, writing, version history, and change tracking.-
- AlicenseAqualityBmaintenanceEnables coding agents to query local notes, decisions, docs, and code with hybrid retrieval (BM25 + embeddings + reranking) and get path:line citations. It provides tools like rag_query for full-corpus search and search_knowledge for project-scoped knowledge recall.21MIT
- AlicenseAqualityCmaintenanceEnables coding agents to retrieve project context from an AnythingLLM RAG at session start and write back human-approved durable facts via five workflow-shaped tools.5MIT