🧠 Intelligent Memory Management for Cursor - Automatically save and retrieve code contexts, patterns, and solutions using the Model Context Protocol (MCP).
⚠️ Important Note: This project is not Open Source. All data is encrypted and embedded in a way that only AI can read and interpret the content.
- 🤖 Automatic Context Saving: Cursor intelligently decides when to save interesting code
- 🔍 Semantic Search: Find code patterns and solutions using natural language
- 🏷️ Smart Tagging: Automatic categorization by language, complexity, and reusability
- 📊 Structured Metadata: Rich context with file paths, complexity levels, and more
- 🚀 Zero Configuration: Works out of the box with any Memory API instance
- 🔄 Real-time Sync: Instant saving and retrieval of memories
npm install -g memory-api-mcp-server
-
Install the package globally:
npm install -g memory-api-mcp-server
-
Configure Cursor MCP: Add to your
~/.cursor/mcp.json
:{ "mcpServers": { "memory-api": { "command": "memory-api-mcp-server" } } }
-
Restart Cursor and start coding!
For easier setup, use our configuration script:
npx memory-api-mcp-server configure
-
create_memory
- Create new memories manually -
search_memories
- Search existing memories by content -
list_memories
- List all memories with pagination -
get_memory
- Retrieve specific memory by ID -
delete_memory
- Remove memories
-
smart_auto_save
- Automatically save interesting code contexts- Detects complex solutions
- Identifies reusable patterns
- Captures bug fixes and optimizations
- Saves configurations and utilities
The server includes smart auto-save functionality that automatically captures:
- ✅ Complex Solutions - Code that took significant effort to implement
- ✅ Reusable Patterns - Functions and classes with high reuse potential
- ✅ Bug Fixes - Interesting problem resolutions
- ✅ Optimizations - Performance improvements
- ✅ Configurations - Useful setup and config code
- ✅ Utilities - Helper functions and tools
When you write something like this:
const optimizeQuery = (sql) => {
// Complex optimization logic
return optimizedSql;
};
Cursor automatically saves it with structured metadata:
{
"content": "CONTEXTO: optimization\nARQUIVO: utils/db.js\n\nconst optimizeQuery = (sql) => {\n // Complex optimization logic\n return optimizedSql;\n};",
"containerTags": ["optimization", "javascript", "medium_complexity", "high_reusability"]
}
// In Cursor chat
"Create a memory about this regex pattern for email validation"
// In Cursor chat
"Search for memories about database optimization"
"Find all JavaScript utility functions"
"Show me high reusability patterns"
Add a .cursorrules
file to your project:
# Auto-Memory Rules
Use `smart_auto_save` automatically when detecting:
- Complex algorithms
- Reusable utilities
- Bug fixes
- Performance optimizations
- Configuration patterns
-
MEMORY_API_URL
- Your Memory API endpoint (default: https://memory-api-mvp.fly.dev) -
MEMORY_API_TOKEN
- Authentication token (optional)
This server is compatible with any Memory API that implements the Supermemory AI specification:
-
POST /v3/memories
- Create memories -
POST /v3/search
- Search memories -
GET /v3/memories
- List memories -
GET /v3/memories/{id}
- Get specific memory -
DELETE /v3/memories/{id}
- Delete memory
Cursor ←→ MCP Server ←→ Memory API ←→ PostgreSQL + Vector DB
- Cursor: Provides the AI interface and code context
- MCP Server: Handles protocol translation and intelligent decisions
- Memory API: Manages storage and semantic search
- Database: Stores memories with vector embeddings for similarity search
- Email: theefipe@gmail.com
Made with 🧠 by Italo Coimbra