Relax Memory MCP
Persistent, structured memory server for AI agents using the Model Context Protocol, with categorized storage and tools to add, get, delete, and list memories.
README
Relax! Memory MCP
Archived. Claude can now use multiple files for memories.
A persistent memory server for AI agents, built on the Model Context Protocol.
Why this server?
Most AI agents lose context between sessions. Built-in memory features (like Claude Code's MEMORY.md) are plain files the agent must read and write manually — they have no structure, no categories, and no way to list or search entries without reading the entire file.
Relax! Memory MCP fixes this by giving agents structured, persistent memory via tools:
- Categorised storage — memories are grouped by category (e.g.
config,design,architecture), so an agent can store and retrieve related facts without scanning everything. - Minimal token cost —
list_memoriesreturns a lightweight hierarchical index. The agent only fetches full values when it needs them, keeping context windows small. - Upsert semantics — storing a memory with the same
category + nameoverwrites the previous value. No duplicates, no cleanup needed. - Instant persistence — every write is flushed to a single JSON file on disk. Survives crashes, restarts, and agent re-connections.
- Zero dependencies at runtime — just Node.js and the MCP SDK. No database, no cloud service, no API key.
- Multi-instance friendly — use
--dirand--nameto run separate memory stores for different projects or agents from the same binary.
Tools exposed
| Tool | Description |
|---|---|
add_memory |
Store or update a memory (category, name, description, value) |
get_memory |
Retrieve a specific memory by category and name |
delete_memory |
Delete a memory by category and name |
list_memories |
List all memories as a hierarchical index grouped by category |
Installation
npm install
npm run build
This compiles TypeScript into dist/ and makes dist/index.js the executable entry point.
Configuration
Add the server to your MCP client config. Ommit --dir for currently running project.
Claude Code (CLI)
claude mcp add --scope user memory -- node d:/installdir/dist/index.js --dir d:/my-project
Claude Desktop / Claude Code (manual)
Add to your claude_desktop_config.json or .claude.json:
{
"mcpServers": {
"memory": {
"command": "node",
"args": [
"d:/src/AI/MCP/Memory/dist/index.js",
"--name", "Project Memory",
"--dir", "d:/my-project"
]
}
}
}
CLI flags
| Flag | Default | Description |
|---|---|---|
--name |
Memory MCP for current project |
Server name reported to the MCP client (set if you have a general server that all projects shpuld be able to access) |
--description |
Persistent memory storage |
Server description |
--dir |
Current working directory | Directory where memories.json is stored |
Running
Start the server directly (stdio transport):
node dist/index.js
Or with flags:
node dist/index.js --dir ./my-project --name "My Project Memory"
The server communicates over stdin/stdout using the MCP stdio transport. It is designed to be launched by an MCP client, not called directly from a browser or HTTP client.
Debugging
Run tests
npm test
Uses Vitest. Tests create temporary directories and verify the full lifecycle: add, get, update, delete, persistence, and hierarchical indexing.
Inspect the stored data
Memories are stored as plain JSON in memories.json inside the configured --dir:
cat memories.json
[
{
"name": "tech-stack",
"category": "architecture",
"description": "Chosen technology stack",
"value": "TypeScript, PostgreSQL, OpenLayers"
}
]
Debug with MCP Inspector
Use the MCP Inspector to interactively call tools:
npx @modelcontextprotocol/inspector node dist/index.js -- --dir .
This opens a web UI where you can invoke add_memory, list_memories, etc. and see the raw JSON responses.
Attach a Node debugger
node --inspect dist/index.js --dir .
Then open chrome://inspect in Chrome or attach from VS Code using a launch configuration:
{
"type": "node",
"request": "launch",
"name": "Debug Memory MCP",
"program": "${workspaceFolder}/dist/index.js",
"args": ["--dir", "."],
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
}
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。