memory-api-mcp-server
v1.1.5
Published
MCP Server for Memory API integration with Cursor - enables automatic code context saving and intelligent memory management
Downloads
43
Maintainers
Readme
Memory API MCP Server
🧠 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.
✨ Features
- 🤖 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
🚀 Quick Start
Installation
npm install -g memory-api-mcp-serverSetup with Cursor
Install the package globally:
npm install -g memory-api-mcp-serverConfigure Cursor MCP: Add to your
~/.cursor/mcp.json:{ "mcpServers": { "memory-api": { "command": "memory-api-mcp-server" } } }Restart Cursor and start coding!
Auto-Configuration Script
For easier setup, use our configuration script:
npx memory-api-mcp-server configure🛠️ Available Tools
Core Memory Operations
create_memory- Create new memories manuallysearch_memories- Search existing memories by contentlist_memories- List all memories with paginationget_memory- Retrieve specific memory by IDdelete_memory- Remove memories
Intelligent Auto-Save
smart_auto_save- Automatically save interesting code contexts- Detects complex solutions
- Identifies reusable patterns
- Captures bug fixes and optimizations
- Saves configurations and utilities
🧠 Intelligent Auto-Save
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
Example Auto-Save
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"]
}📝 Usage Examples
Manual Memory Creation
// In Cursor chat
"Create a memory about this regex pattern for email validation"Searching Memories
// In Cursor chat
"Search for memories about database optimization"
"Find all JavaScript utility functions"
"Show me high reusability patterns"Auto-Save Configuration
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🔧 Configuration
Environment Variables
MEMORY_API_URL- Your Memory API endpoint (default: https://memory-api-mvp.fly.dev)MEMORY_API_TOKEN- Authentication token (optional)
Memory API Compatibility
This server is compatible with any Memory API that implements the Supermemory AI specification:
POST /v3/memories- Create memoriesPOST /v3/search- Search memoriesGET /v3/memories- List memoriesGET /v3/memories/{id}- Get specific memoryDELETE /v3/memories/{id}- Delete memory
🏗️ Architecture
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
🔗 Links
📧 Contact
- Email: [email protected]
Made with 🧠 by Italo Coimbra
