Persistent AI Memory
A persistent local memory for AI, LLMs, or Copilot in VS Code.
What is Persistent AI Memory?
Persistent AI Memory is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to persistent local memory for ai, llms, or copilot in vs code.
A persistent local memory for AI, LLMs, or Copilot in VS Code.
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A persistent local memory for AI, LLMs, or Copilot in VS Cod
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx persistent-ai-memoryConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Persistent AI Memory
Persistent AI Memory is a local memory management system for AI assistants that stores, indexes, and retrieves information across sessions using SQLite databases and vector embeddings, enabling AI tools like GitHub Copilot in VS Code, OpenWebUI, LM Studio, and other MCP-compatible clients to remember facts, conversation history, and project context between separate chat sessions. It exposes a standard MCP server interface so any compatible AI client can call memory operations including storing memories, semantic search over past conversations, conversation tracking, and tool call logging. Developers and teams who want their local AI assistants to build up persistent knowledge without sending data to external cloud services will find this system especially useful.
Prerequisites
- Python 3.8 or higher
- An embedding provider: Ollama (free, local), LM Studio (free, local), or OpenAI API key
- An MCP-compatible client such as Claude Desktop, VS Code with GitHub Copilot, or OpenWebUI
- 1-2 GB of free disk space for the SQLite databases and embedding model caches
Install persistent-ai-memory from GitHub
Install the package directly from the GitHub repository using pip. This sets up all required Python dependencies.
pip install git+https://github.com/savantskie/persistent-ai-memory.gitRun the health check to verify the installation
Run the built-in health check script to confirm the databases and embedding configuration are set up correctly before connecting an MCP client.
python tests/test_health_check.pyConfigure your embedding provider
Edit the embedding configuration file to select your preferred embedding backend. Ollama is the recommended free local option. The config file is created at ~/.ai_memory/embedding_config.json after the first run.
# For Ollama (recommended — free and local):
# Ensure Ollama is running: ollama serve
# Then pull an embedding model:
ollama pull nomic-embed-text
# ~/.ai_memory/embedding_config.json
{
"provider": "ollama",
"model": "nomic-embed-text",
"base_url": "http://localhost:11434"
}Add the MCP server to your client configuration
Configure your MCP-compatible client to start the persistent-ai-memory MCP server. The server is started as a Python module.
{
"mcpServers": {
"persistent-ai-memory": {
"command": "python",
"args": ["-m", "ai_memory_mcp"]
}
}
}Restart your MCP client and test memory storage
Restart your MCP client and ask the AI to store a test memory to confirm the pipeline is working end to end.
Persistent AI Memory Examples
Client configuration
Claude Desktop configuration to launch the Persistent AI Memory MCP server. All memory data is stored locally under ~/.ai_memory/.
{
"mcpServers": {
"persistent-ai-memory": {
"command": "python",
"args": ["-m", "ai_memory_mcp"],
"env": {
"EMBEDDING_PROVIDER": "ollama",
"EMBEDDING_MODEL": "nomic-embed-text"
}
}
}
}Prompts to try
Memory operations you can invoke through your MCP-connected AI assistant once the server is running.
- "Remember that the API rate limit for our production service is 1000 requests per minute."
- "Search your memory for anything I've told you about the authentication system."
- "What do you remember from our conversation last week about the database migration?"
- "Store this meeting summary: we decided to use PostgreSQL for the new service."
- "Show me the most recent 10 things you have stored in memory."Troubleshooting Persistent AI Memory
Health check fails with 'embedding_config.json not found'
The config file is created automatically on first run in ~/.ai_memory/. If the directory does not exist, create it manually: 'mkdir -p ~/.ai_memory'. Then re-run the health check to generate the default config, and edit it to set your embedding provider.
Semantic search returns no results or wrong results
Ensure your embedding provider is running (for Ollama: 'ollama serve') and that the model name in embedding_config.json matches a model you have pulled ('ollama list'). Also confirm that memories have been stored first — the system can only retrieve what has been saved.
Memory operations fail with 'user_id required' errors
All memory operations require user_id and model_id parameters for multi-tenant isolation. When calling tools from your MCP client, pass a consistent user_id string (such as your username) and a model_id string (such as 'claude-sonnet'). This is enforced to prevent data leakage between users.
Frequently Asked Questions about Persistent AI Memory
What is Persistent AI Memory?
Persistent AI Memory is a Model Context Protocol (MCP) server that persistent local memory for ai, llms, or copilot in vs code. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Persistent AI Memory?
Follow the installation instructions on the Persistent AI Memory GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Persistent AI Memory?
Persistent AI Memory works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Persistent AI Memory free to use?
Yes, Persistent AI Memory is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Persistent AI Memory Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Persistent AI Memory? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Persistent AI Memory in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Persistent AI Memory?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.