Using Memori with AI Coding Assistants
Give Claude Code, Cursor, and Cline persistent memory across sessions. Remember coding preferences, project context, and architectural decisions.
Supported Tools
Claude Code
Anthropic's official CLI for Claude. Full MCP support for memory tools.
Fully SupportedCursor
AI-first code editor. Configure MCP servers in settings for memory integration.
Fully SupportedCline
VS Code extension for AI coding. Supports MCP for external tools like Memori.
Fully SupportedHow It Works
AI coding assistants own the LLM call internally, so you can't wrap their client directly with Memori's SDK. Instead, Memori runs as an MCP (Model Context Protocol) server that exposes memory tools the assistant can call.
┌─────────────────────┐ MCP Protocol ┌─────────────────────┐
│ │ │ │
│ Claude Code │ ◄─── remember / recall ───► │ Memori MCP │
│ Cursor │ │ Server │
│ Cline │ │ │
│ │ └──────────┬──────────┘
└─────────────────────┘ │
▼
┌─────────────────────┐
│ Local Database │
│ (SQLite/Postgres) │
└─────────────────────┘
Quick Start: Claude Code
-
Install the Memori MCP Server
pip install memori-mcp
See Memori MCP Server for details.
-
Configure Claude Code
Add to your MCP configuration (
~/.claude/claude_desktop_config.json):{ "mcpServers": { "memori": { "command": "memori-mcp-server", "args": ["--db", "sqlite:///~/.memori/claude-code.db"], "env": { "MEMORI_ATTRIBUTION": "claude-code:${USER}" } } } } -
Restart Claude Code
Restart to load the MCP server configuration.
-
Test It
Try these prompts:
# Store a memory Remember that I prefer TypeScript over JavaScript for new projects. # Recall later (even in a new session) What are my coding preferences?
Quick Start: Cursor
-
Install the MCP Server
pip install memori-mcp
-
Configure Cursor
Edit
~/.cursor/mcp.json:{ "mcpServers": { "memori": { "command": "memori-mcp-server", "args": ["--db", "sqlite:///~/.memori/cursor.db"] } } } -
Enable MCP in Settings
Open Settings (
Cmd/Ctrl + ,) → Search "MCP" → Enable "Model Context Protocol" - Restart Cursor
Quick Start: Cline
-
Install the MCP Server
pip install memori-mcp
-
Configure Cline
In VS Code, open Cline settings and add:
{ "cline.mcpServers": { "memori": { "command": "memori-mcp-server", "args": ["--db", "sqlite:///~/.memori/cline.db"] } } } - Reload VS Code Window
Practical Use Cases
🏗️ Codebase Onboarding
Remember key facts about a new project's architecture, conventions, and patterns.
✨ Coding Style
Store personal preferences so generated code matches your style.
🐛 Bug Investigation
Record debugging context and solutions for future reference.
📐 Architecture Decisions
Document why certain technical choices were made.
Available Memory Tools
Once configured, the AI assistant has access to these tools:
memori_remember
Store a memory for later recall.
memori_recall
Retrieve relevant memories based on semantic similarity.
memori_forget
Remove specific memories or by query.
memori_list
List all memories for inspection and debugging.
Frequently Asked Questions
Do I need vLLM to use Memori with Claude Code?
No. vLLM is for self-hosting open-source LLMs. When using Claude Code, Cursor, or Cline, the LLM is already provided by the tool. You only need Memori's MCP server for memory storage.
Can I use the Anthropic API directly with Memori?
Yes! If you're writing your own code that calls the Anthropic API, you can integrate Memori directly by registering the client:
Are my memories sent to the cloud?
No, by default. The MCP server runs locally with a local SQLite database. Your memories stay on your machine. For team features, you can optionally connect to Memori's cloud service.
How do I share memories between Claude Code and Cursor?
Point both tools to the same database file:
Can I scope memories to a specific project?
Yes! Use a project-local database path:
This keeps memories isolated per project.
Resources
- GitHub Issue: Issue #66 - Using Memori with Claude Code
- Full Tutorial: Complete Markdown Guide
- MCP Specification: modelcontextprotocol.io
- Memori Documentation: memorilabs.ai/docs
- Memori Cookbook: github.com/MemoriLabs/memori-cookbook
Questions or feedback? Open an issue on GitHub or join the community Discord.
Back to Home