simple-memory-mcp
Provides AI assistants with persistent memory across sessions using local SQLite and keyword search, allowing storage and retrieval of user preferences, project context, and decisions.
README
🧠 Simple Memory MCP Server
Give your AI assistant persistent memory across sessions.
🚀 Looking for the next evolution?
git-memory is now my daily driver — it builds on the ideas from simple-memory and takes them further. If you're starting fresh, check it out! Simple-memory is still functional but is no longer my main focus.
The problem: AI assistants forget everything when you start a new conversation. Your preferences, project context, decisions - all gone.
The solution: Simple Memory lets AI store and retrieve information that persists forever. Local SQLite database, zero cloud, sub-millisecond fast.
Why not RAG? RAG systems need vector databases, embeddings, chunking strategies, and ongoing maintenance. Simple Memory is just keyword search in SQLite - no ML infrastructure, no API costs, works offline. Perfect for personal knowledge that doesn't need semantic similarity.
How It Works
You: "Remember that I prefer TypeScript over JavaScript and use 4-space indentation"
AI: stores this automatically
...days later, new session...
You: "Help me set up a new project"
AI: searches memory, finds your preferences → Sets up TypeScript with 4-space indentation
The AI handles storage and retrieval automatically. You just chat naturally.
Simple by design: Keyword search, not semantic. Local SQLite, not cloud. Zero setup, not configuration hell. If you need vector embeddings or team collaboration, see alternatives.
<details> <summary><strong>📖 End-to-End Example</strong></summary>
Session 1 (January):
You: "I'm using PostgreSQL with TypeScript. Decided on Prisma ORM after
evaluating TypeORM - better type inference and migrations."
AI: → stores automatically with tags [tech-stack, database, decision]
Session 2 (3 weeks later):
You: "Setting up a new microservice, what database setup should I use?"
AI: → searches memories, finds your PostgreSQL + Prisma decision
"Based on your previous work, you standardized on PostgreSQL with Prisma
ORM. You chose it over TypeORM for the better type inference..."
What got stored:
{
"content": "Tech stack decision: PostgreSQL + Prisma ORM. Chose over TypeORM for better type inference and cleaner migrations.",
"tags": ["tech-stack", "database", "decision"],
"relevance": 0.92 // BM25 score when searching "database setup"
}
</details>
🤔 Why I built this
I got tired of every new conversation starting from zero. I use this daily - saving project status, gotchas, ideas that pop up while I’m deep in work. Instead of breaking flow to write things down somewhere, I just tell the assistant to save it and keep going. Having it all central means I can reference old solutions, things that failed, things that worked - across projects, across time. It’s basically an external memory for my dev brain.
✨ Features
- 🧠 Persistent Memory - Survives across sessions, restarts, forever
- 🔍 Full-Text Search - Find memories by keyword, tags, or content
- 🏷️ Smart Tagging - Organize memories with tags
- 💾 Automatic Backups - Optional sync to OneDrive/Dropbox
- 📦 Zero Config - Works out of the box
- 🚀 Fast - Sub-millisecond queries, 2,000-10,000 ops/sec
🚀 Quick Start
Configure MCP Client
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"simple-memory": {
"command": "npx",
"args": ["-y", "simple-memory-mcp"]
}
}
}
VS Code (.vscode/mcp.json):
{
"mcpServers": {
"simple-memory": {
"command": "npx",
"args": ["-y", "simple-memory-mcp"]
}
}
}
Restart your MCP client - that's it! No install needed.
💡 Best Experience: Works best with Claude Sonnet in Agent Mode for optimal auto-capture.
Auto-Configure VS Code & Claude Desktop
npx -y simple-memory-mcp setup
This automatically configures all detected installations.
Optional: Install CLI
For command-line usage (search, stats, export/import):
npm install -g simple-memory-mcp
simple-memory setup # auto-configure VS Code & Claude
For Contributors
git clone https://github.com/chrisribe/simple-memory-mcp.git
cd simple-memory-mcp
npm run setup # installs, builds, links, and configures
That's it! The AI assistant can now remember information across conversations.
💻 CLI Commands
# Setup - auto-configure VS Code and Claude Desktop
simple-memory setup
# Search memories
simple-memory search --query "typescript" --limit 5
simple-memory search --tags "project,work"
# Store a memory
simple-memory store --content "Remember this" --tags "note"
# Other operations
simple-memory get --hash "abc123..."
simple-memory delete --hash "abc123..."
simple-memory stats
# Export/import
simple-memory export-memory --output backup.json
simple-memory import-memory --input backup.json
Run simple-memory --help for all options.
🛠️ MCP Tools
The AI uses these tools automatically - you don't need to call them directly.
| Tool | Purpose |
|---|---|
memory-graphql |
Store, search, update, delete memories |
export-memory |
Backup memories to JSON file |
import-memory |
Restore memories from JSON file |
<details> <summary>GraphQL Schema (for developers)</summary>
type Memory { hash, content, title, preview, tags, createdAt, relevance }
type StoreResult { success, hash, error }
type UpdateResult { success, hash, error }
type DeleteResult { success, hash, deletedCount, error }
type Query {
memories(query: String, tags: [String], limit: Int): [Memory!]!
memory(hash: String!): Memory
related(hash: String!, limit: Int): [Memory!]!
stats: Stats!
}
type Mutation {
store(content: String!, tags: [String]): StoreResult!
update(hash: String!, content: String!, tags: [String]): UpdateResult!
delete(hash: String, tag: String): DeleteResult!
}
Note: Mutation results return minimal data (hash/success). To get full memory fields (title, tags, createdAt), query: { memory(hash: "...") { ... } }
</details>
⚙️ Configuration
Zero config default: ~/.simple-memory/memory.db
Custom database location:
{
"mcpServers": {
"simple-memory": {
"command": "npx",
"args": ["-y", "simple-memory-mcp"],
"env": {
"MEMORY_DB": "/path/to/memory.db"
}
}
}
}
With automatic backups:
{
"env": {
"MEMORY_BACKUP_PATH": "/path/to/OneDrive/backups",
"MEMORY_BACKUP_INTERVAL": "180"
}
}
📖 Full configuration guide: docs/configuration.md
- Environment variables reference
- Backup strategies
- Cloud storage best practices
- HTTP transport setup
- Multiple database instances
🔧 Development
npm install # Install dependencies
npm run build # Build TypeScript
npm test # Run tests
npm run benchmark # Performance benchmarks
Testing:
npm test # GraphQL tests
npm run test:perf # Performance tests
npm run test:migration # Migration tests
📚 Documentation
| Guide | Description |
|---|---|
| Configuration | Full config reference, backups, cloud storage, HTTP transport |
| Examples | Real-world scenarios, namespace patterns |
| Design Philosophy | Trade-offs, BM25 relevance scoring |
| Performance | Benchmarks and optimization details |
| Web Server | Visual memory browser interface |
| Changelog | Version history |
Developer Docs: docs/dev/ - Manual testing, publishing guide, optimization history
🤝 Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
MIT License - see LICENSE for details.
🙏 Acknowledgments
<div align="center">
Made with ❤️ by chrisribe
</div>
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。