mcp-memory
Provides persistent memory with semantic search for MCP-based AI agents, enabling them to store and recall information across sessions using vector embeddings.
README
mcp-memory
Your AI agent forgets everything between sessions. This fixes that.
An MCP server that gives any AI agent persistent memory with semantic search. Store decisions, context, and knowledge once -- recall them with natural language queries across any future session.
Built on ChromaDB embeddings, scoped per project, runs entirely locally.
Why
Every MCP-based agent (Claude Desktop, Claude Code, Cursor) starts each session with amnesia. Decisions made yesterday are gone. Context from last week is gone. You re-explain the same things every time.
mcp-memory adds four tools -- remember, recall, forget, list_memories -- that persist knowledge across sessions with vector similarity search. Your agent remembers what matters and finds it when relevant.
Features
- Semantic recall -- vector embeddings (all-MiniLM-L6-v2) find related memories, not just keyword matches
- Per-project scoping -- memories don't leak between projects
- Importance scoring -- prioritize critical decisions (1-5 scale)
- Tag-based filtering -- organize memories by category
- Fully local -- ChromaDB on disk, no cloud, no API keys, no telemetry
Installation
pip install -e .
Configuration
| Environment Variable | Default | Description |
|---|---|---|
MCP_MEMORY_DATA_DIR |
~/.mcp-memory/ |
Where memories are stored on disk |
MCP_MEMORY_DEFAULT_PROJECT |
global |
Default project scope |
MCP_MEMORY_MAX_RESULTS |
10 |
Default number of recall results |
MCP Client Setup
Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"memory": {
"command": "mcp-memory",
"env": {
"MCP_MEMORY_DATA_DIR": "~/.mcp-memory"
}
}
}
}
Claude Code
Add to .claude/settings.json:
{
"mcpServers": {
"memory": {
"command": "mcp-memory"
}
}
}
Tools
remember
Store a memory for later recall.
| Arg | Type | Default | Description |
|---|---|---|---|
content |
string | required | The text to remember |
project |
string | "global" | Project scope |
tags |
list[string] | [] | Tags for filtering |
source |
string | "" | Where this memory came from |
importance |
int | 3 | Priority 1-5 |
recall
Search memories by semantic similarity.
| Arg | Type | Default | Description |
|---|---|---|---|
query |
string | required | Natural language search |
project |
string | all | Limit to project |
tags |
list[string] | none | Filter by tags |
n_results |
int | 10 | Max results |
min_relevance |
float | none | Minimum relevance 0.0-1.0 |
forget
Delete stored memories.
| Arg | Type | Default | Description |
|---|---|---|---|
memory_ids |
list[string] | none | Specific IDs to delete |
project |
string | none | Delete all in project |
tags |
list[string] | none | Delete by tags |
list_memories
Browse stored memories with pagination.
| Arg | Type | Default | Description |
|---|---|---|---|
project |
string | all | Filter to project |
tags |
list[string] | none | Filter by tags |
page |
int | 1 | Page number |
page_size |
int | 20 | Results per page |
Development
pip install -e ".[dev]"
pytest # run tests
ruff check . # lint
ruff format . # format
mypy mcp_memory # type check
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 模型以安全和受控的方式获取实时的网络信息。