Uses .env files for configuration of Ollama host and database path settings.
Runs as a Node.js application and is required as a prerequisite (v18 or later).
Uses Ollama for generating embeddings with the nomic-embed-text model to enable semantic search across memory entries.
Stores memory data in SQLite database with tables for projects, memories, embeddings, tags, and relationships.
Built with TypeScript for type safety and compiled to JavaScript for execution.
Provides runtime type checking and validation for the MCP server's data structures.
Memory MCP Server
A long-term memory storage system for LLMs using the Model Context Protocol (MCP) standard. This system helps LLMs remember the context of work done over the entire history of a project, even across multiple sessions. It uses semantic search with embeddings to provide relevant context from past interactions and development decisions.
Features
Project-based memory organization
Semantic search using Ollama embeddings (nomic-embed-text model, 768 dimensions)
Multiple memory types:
Conversations: Dialog context and important discussions
Code: Implementation details and changes
Decisions: Key architectural and design choices
References: Links to external resources and documentation
Rich metadata storage including:
Implementation status
Key decisions
Files created/modified
Code changes
Dependencies added
Tagging system for memory organization
Relationship tracking between memories
Prerequisites
Node.js (v18 or later)
Ollama running locally (for embeddings)
Must have the
nomic-embed-text
model installed
SQLite3
Installation
Clone the repository
Install dependencies:
Build the project:
Create a
.env
file with required configuration:
Usage
Start the server in development mode:
This will:
Compile TypeScript
Copy schema files
Start the server with auto-reload
The server connects via stdio for Cursor compatibility
Database Schema
The system uses SQLite with the following tables:
Core Tables
projects
: Project information and metadatamemories
: Memory entries storing various types of development contextembeddings
: Vector embeddings (768d) for semantic search capabilities
Organization Tables
tags
: Memory organization tagsmemory_tags
: Many-to-many relationships between memories and tagsmemory_relationships
: Directed relationships between memory entries
MCP Tools
The following tools are available through the MCP protocol:
Memory Management
store-dev-memory
: Create new development memories with:Content
Type (conversation/code/decision/reference)
Tags
Code changes
Files created/modified
Key decisions
Implementation status
list-dev-memories
: List existing memories with optional tag filteringget-dev-memory
: Retrieve specific memory by IDsearch
: Semantic search across memories using embeddings
Development
For development:
This will:
Kill any existing server instances
Rebuild the TypeScript code
Copy the schema.sql to the dist directory
Start the server in development mode
Dependencies
Key dependencies:
@modelcontextprotocol/sdk@^1.7.0
: MCP protocol implementationbetter-sqlite3@^9.4.3
: SQLite database interfacenode-fetch@^3.3.2
: HTTP client for Ollama APIzod@^3.22.4
: Runtime type checking and validation
Project Structure
Contributing
Contributions are welcome! Please ensure you:
Write clear commit messages
Add appropriate documentation
Follow the existing code style
Add/update tests as needed
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A long-term memory storage system for LLMs that helps them remember context across multiple sessions using semantic search with embeddings to provide relevant historical information from past interactions and development decisions.
Related MCP Servers
- -securityAlicense-qualityProvides a semantic memory layer that integrates LLMs with OpenSearch, enabling storage and retrieval of memories within the OpenSearch engine.Last updated -4Apache 2.0
- -securityAlicense-qualityA Model Context Protocol server enabling LLMs to search, retrieve, and manage documents through Rememberizer's knowledge management API.Last updated -34Apache 2.0
- -securityFlicense-qualityA server that manages conversation context for LLM interactions, storing recent prompts and providing relevant context for each user via REST API endpoints.Last updated -595
- AsecurityAlicenseAqualityA Model Context Protocol server that provides knowledge graph-based persistent memory for LLMs, allowing them to store, retrieve, and reason about information across multiple conversations and sessions.Last updated -971,1662MIT License