RLM Memory MCP Server
Provides AI-powered matching for semantic file search and memory analysis using the Google Gemini API.
Click on "Install 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., "@RLM Memory MCP ServerFind files and history about the checkout flow."
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.
RLM Memory MCP Server
Persistent memory + semantic file discovery for ANY AI coding agent.
Works with Claude Code, OpenAI Codex, Gemini CLI, Cursor, Windsurf β anything that speaks MCP.
What is this?
AI agents forget everything between sessions. This MCP server fixes that:
π§ Memory β after every task, the agent records what it changed and why. Next session, it remembers.
πΊοΈ File map β a semantic index of your codebase ("this file is the login form", "this is the checkout API"), so the agent finds the right files without grepping the whole repo.
π Bi-directional β the agent asks the MCP ("user wants to fix the submit button β which files?") and the MCP answers with files, history, and suggestions.
The core idea (Recursive Large Model): the agent stays intentionally "blind" to the filesystem and uses the MCP as its eyes and memory β making it faster, cheaper, and more focused.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Agent (Claude Code, Codex, Gemini CLI, Cursor...) β
β β
β "User wants to fix login" βββΊ rlm_query β
β βββ relevant files+history β
β [does the work] β
β "Here's what I changed" βββΊ rlm_smart_memory β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β stdio (MCP)
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RLM Memory MCP Server β
β β’ JSON storage per project (projects/<name>/.rlm/) β
β β’ AI-powered matching via OpenRouter or Gemini β
β β’ Web UI for you at http://localhost:3848 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββRelated MCP server: Heimdall MCP Server
Setup in 3 Steps
1. Install & build
git clone https://github.com/jumpino27/RLM-Memory-MCP-Server.git
cd RLM-Memory-MCP-Server
npm install
npm run build2. Add an API key
Copy .env.example to .env and set one key:
# Option A (recommended): OpenRouter β one key, any model
# https://openrouter.ai/keys
OPENROUTER_API_KEY="sk-or-..."
# Option B: Google Gemini direct β https://aistudio.google.com/
# GEMINI_API_KEY="..."With OpenRouter the server uses
google/gemini-3.5-flashby default β fast, cheap, near-Pro quality.With Gemini direct it uses
gemini-3.5-flash.No key at all? Everything still works using keyword matching (just less smart).
Want a different model? Set LLM_MODEL (e.g. anthropic/claude-haiku-4.5 or openai/gpt-4o-mini on OpenRouter). See .env.example for all options.
3. Connect your AI agent
Replace C:\\path\\to with where you cloned the repo.
Claude Code (one command):
claude mcp add rlm-memory -- node C:\\path\\to\\RLM-Memory-MCP-Server\\dist\\index.jsOpenAI Codex CLI β add to ~/.codex/config.toml:
[mcp_servers.rlm-memory]
command = "node"
args = ["C:\\path\\to\\RLM-Memory-MCP-Server\\dist\\index.js"]Gemini CLI β add to ~/.gemini/settings.json:
{
"mcpServers": {
"rlm-memory": {
"command": "node",
"args": ["C:\\path\\to\\RLM-Memory-MCP-Server\\dist\\index.js"]
}
}
}Any other MCP client: launch node dist/index.js over stdio.
π‘ Tell your agent how to use it: copy the rules from example_agents.md into your agent's instructions file (
CLAUDE.md,AGENTS.md,.cursorrules, β¦).
The Workflow
First time on a project β index it once:
rlm_init β rlm_index_codebase β rlm_verify_indexEvery task after that β three steps:
1. rlm_query "User wants X β which files?" β files + history + tips
2. (agent does the actual work)
3. rlm_smart_memory "Here's what I changed" β remembered foreverThat's it. The more the agent works, the smarter the memory gets.
The Tools
Daily drivers
Tool | What it does |
| β Start every task here. Ask about the user's request β get relevant files, past memories, and suggestions |
| β End every task here. Record changes with rich metadata (component types, feature areas, edit history) |
Project setup
Tool | What it does |
| Register a project for memory tracking |
| Scan a codebase and build the semantic file map |
| Post-index check: "Is this everything?" β shows breakdown + gaps |
Maintenance & extras
Tool | What it does |
| Keep the file map in sync when files are deleted/moved/renamed |
| Project statistics |
| All tracked projects |
| Simple keyword memory search (legacy β prefer |
| Semantic file search (legacy β prefer |
| Basic memory creation (legacy β prefer |
Example: rlm_query
{
"project_name": "my-app",
"user_request": "The user wants to fix the submit button color on the login form"
}Returns:
{
"relevant_files": [
{ "path": "src/components/LoginForm.tsx", "description": "Login form with submit button",
"component_type": "form", "feature_area": "auth",
"recent_changes": ["Added hover state to submit button"] }
],
"relevant_memories": [
{ "summary": "Changed submit button to theme primary color", "date": "..." }
],
"ai_analysis": "The submit button lives in LoginForm.tsx and uses theme.ts colors...",
"suggestions": ["Check theme.ts for the color tokens"]
}Example: rlm_smart_memory
{
"project_name": "my-app",
"user_prompt": "Fix the submit button color",
"changes_context": "Changed the submit button in LoginForm to use the primary theme color instead of hardcoded blue. Added hover state.",
"files_modified": [
{ "path": "src/components/LoginForm.tsx", "change_type": "modified",
"change_summary": "Button color now uses theme.primary, added hover state" }
],
"affected_areas": ["auth", "ui"]
}The Web UI (for you, the human)
npm start # β http://localhost:3848Browse all projects, memories, and the semantic file map
Test every MCP tool from the browser
Delete stale memories / file entries
See live AI provider status (e.g.
openrouter Β· google/gemini-3.5-flash)
Configuration Reference
All settings live in .env (see .env.example):
Variable | Default | Description |
| β | OpenRouter key (recommended) β get one |
| β | Google Gemini key β get one |
|
|
|
|
| Any model your provider offers |
|
|
|
|
| Max output tokens per call |
|
| Per-request timeout |
|
| Web UI port |
|
| Where project memories are stored (set it to keep data outside the install tree) |
Scripts: npm start (web UI) Β· npm run mcp (MCP server directly) Β· npm run build Β· npm test (end-to-end smoke test) Β· npm run dev (UI with auto-reload) Β· npm run typecheck
How data is stored
Everything is plain JSON β no database needed:
RLM-Memory-MCP-Server/
βββ projects/
βββ my-app/.rlm/
βββ config.json # project info
βββ memory_log.json # every recorded task
βββ file_map.json # the semantic file indexBack up by copying projects/. Inspect with any text editor or the web UI.
FAQ
Does this work without an API key? Yes β all tools fall back to weighted keyword matching. AI matching is just smarter.
Why store data centrally instead of in each repo?
One place to back up, browsable across projects in the UI, no .rlm clutter in your repos, survives repo deletion.
Which agent works best? Any MCP-capable agent. The tool descriptions teach the agent how to use them, and example_agents.md has drop-in instructions.
rlm_query vs rlm_recall_memory?
rlm_query searches files + memories + edit history and adds AI analysis. rlm_recall_memory only searches memories by keyword. Use rlm_query.
How much does the AI cost?
Helper calls are small and run at low reasoning effort. With google/gemini-3.5-flash ($1.50/M input, $9/M output) typical queries cost fractions of a cent.
Project structure (for contributors)
src/
βββ index.ts # MCP server entry (stdio) β registers all tools
βββ ui/server.ts # Web UI (Express) at localhost:3848
βββ services/
β βββ llm.ts # Multi-provider AI layer (OpenRouter / Gemini + fallbacks)
β βββ database.ts # JSON file storage
βββ tools/ # MCP tool implementations
βββ schemas/index.ts # Zod input validation
βββ types.ts # Shared types
βββ constants.ts # Paths, models, limitsLicense
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.
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/jumpino27/RLM-Memory-MCP-Server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server