Memory MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Memory MCP Search for previous decisions about database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Memory MCP
Persistent memory for AI agents. Plug-and-play with zero infrastructure.
A Model Context Protocol (MCP) server that gives your AI agents persistent, searchable memory. Works out of the box with zero configuration using local embeddings and file-based storage.
Features
π Semantic Search - Find memories by meaning, not keywords
π Auto-Linking - Related memories are automatically connected
π·οΈ Auto-Categorization - Memories are categorized by type (knowledge, decision, pattern, etc.)
β Importance Scoring - Automatic priority based on content
π Pluggable Embeddings - Transformers.js (default), OpenAI, Ollama, or custom
π¦ Zero Config - No database or API keys required to start
π€ Agent Instructions - Agents automatically learn when and how to use memory tools via MCP protocol
Web Dashboard
Browse and search your memories in the browser with memory-mcp-dashboard β cyberpunk-themed UI, neural graph visualization, same storage.
Related MCP server: SharedBrain
Quick Start
Start the server immediately with zero configuration.
# Run using npx (requires Node 18+)
npx @aalokjha/mem-ajOr install locally:
npm i @aalokjha/mem-ajHow it works by default:
Embeddings: Uses in-process Transformers.js (
all-MiniLM-L6-v2, 384 dimensions). No external server or Python needed.Storage: Uses a local JSON vector store at
~/.memory-mcp/.Initialization: The first run downloads a ~90MB model file. Every run after that is instant.
MCP Client Configuration
Add Memory MCP to your favorite AI tools by adding these configurations.
OpenCode / Claude Desktop / Cursor
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "@aalokjha/mem-aj"]
}
}
}Production Setup
Configure environment variables to use high-performance storage and external embedding providers.
Qdrant + External Embeddings
Run your own Qdrant instance.
Set environment variables to point to your services:
export VECTORDB_PROVIDER=qdrant
export QDRANT_URL=http://localhost:6333
export EMBEDDING_PROVIDER=openai
export EMBEDDING_API_KEY=sk-your-keyConfiguration
Environment Variables
Variable | Default | Description |
|
| Embedding provider: |
|
| Storage provider: |
| - | Embedding service URL (for Ollama/Custom) |
| - | API key for OpenAI |
| Provider default | Model name |
| Provider default | Vector dimensions |
| Provider default | Max token context window for embeddings |
|
| Qdrant endpoint |
|
| Collection name |
|
| Log level: debug, info, warn, error |
Embedding Providers
Transformers.js (Default - Zero Config)
Runs locally in your Node.js process. No external services needed.
export EMBEDDING_PROVIDER=transformersjsOpenAI
export EMBEDDING_PROVIDER=openai
export EMBEDDING_API_KEY=sk-your-key
export EMBEDDING_MODEL=text-embedding-3-smallOllama
export EMBEDDING_PROVIDER=ollama
export EMBEDDING_URL=http://localhost:11434
export EMBEDDING_MODEL=nomic-embed-textCustom
Any HTTP endpoint that accepts POST /embed with { inputs: string[] } and returns number[][].
export EMBEDDING_PROVIDER=custom
export EMBEDDING_URL=http://your-service:portMCP Tools
memory_add
Store a memory with automatic categorization and importance scoring.
{
"content": "Decided to use PostgreSQL for the main database",
"type": "auto",
"tags": ["database", "architecture"],
"project": "my-app"
}memory_search
Semantic search across all memories.
{
"query": "database decisions",
"limit": 10,
"min_score": 0.7
}memory_list
Browse memories by type, tags, or project.
{
"type": "decision",
"project": "my-app",
"limit": 20
}memory_forget
Delete a memory by ID.
{
"memoryId": "uuid-here"
}memory_link
Manually link two related memories.
{
"id1": "uuid-1",
"id2": "uuid-2"
}memory_profile
Store user preferences.
{
"action": "set",
"key": "preferred_language",
"value": "typescript"
}Memory Types
Type | Description | Keywords Detected |
| Facts and information | (default) |
| Choices made | decided, chose, will use, picked |
| Recurring solutions | pattern, always, convention, best practice |
| User preferences | prefer, like, dislike, want, hate |
| Situational context | working on, currently, project |
| Debug notes | error, bug, fix, crash, issue |
Development
# Install dependencies
npm install
# Build
npm run build
# Run in dev mode
npm run dev
# Run tests
npm testAgent Instructions
The server automatically injects usage instructions into the connected agent's context via the MCP instructions protocol field. Agents learn:
When to search, store, and link memories
How to write effective memories (word limits adapted to the configured embedding model)
What memory types to use and cross-tool workflows
No manual prompt engineering or AGENTS.md configuration needed. Just connect and the agent knows what to do.
Token limits per provider default:
Provider | Max Tokens | Max Words |
Transformers.js | 512 | ~384 |
OpenAI | 8,191 | ~6,143 |
Ollama | 8,192 | ~6,144 |
Custom | 512 | ~384 |
Override with EMBEDDING_MAX_TOKENS if using a non-default model.
Architecture
Memory MCP supports two modes:
Zero-Config Mode (Default)
Simple, file-based storage for personal use.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β MCP Client ββββββΆβ Memory MCP ββββββΆβ Local JSON β
β (Claude/AI) β β Server β β Vector Store β
βββββββββββββββββββ ββββββββββ¬βββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β Transformers.js β
β (In-process) β
βββββββββββββββββββProduction Mode
High-performance configuration for shared environments.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β MCP Client ββββββΆβ Memory MCP ββββββΆβ Qdrant β
β (Claude/AI) β β Server β β Vector DB β
βββββββββββββββββββ ββββββββββ¬βββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β External β
β Provider β
β (OpenAI/Ollama) β
βββββββββββββββββββLicense
MIT License - see LICENSE
Contributing
Contributions welcome! Please read our contributing guidelines.
Credits
Built by Aalok Jha
Available Tools
7 toolsmemory_addA
Store a memory with auto-categorization and importance scoring. Use this to persist decisions, findings, debug insights, infrastructure details, user preferences, and session summaries.
Inputs: content (required), tags, type, project, +1 more.
memory_forgetA
Delete a memory by ID. Memories are never automatically deleted β use this for outdated or incorrect information.
Inputs: memoryId (required).
memory_helpA
Show server configuration and available tools.
Inputs: no named parameters.
memory_linkA
Link two related memories bidirectionally. Memories with similarity > 0.7 are auto-linked on store, but use this for connections the auto-linker missed.
Inputs: id1 (required), id2 (required).
memory_listA
Browse memories by type, tags, or project with pagination. Use this when you need to review all memories in a category rather than searching by meaning.
Inputs: tags, type, limit, offset, +1 more.
memory_profileA
Key-value store for user preferences and settings. Use this for structured data like preferred_language, editor, timezone β not for general knowledge (use memory_add for that).
Inputs: action (required), key, value.
memory_searchA
Semantic search across all memories. Use this at the start of a session, before making decisions, or when you need context about a topic. Returns results ranked by relevance.
Inputs: query (required), tags, type, limit, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 7 tools
Each tool targets a distinct operation: add, link, search, list, forget, profile, and help. The search vs list distinction is explicitly described as semantic versus metadata browsing, and memory_profile is clearly separated from general knowledge storage.
All tools share the memory_ prefix, which is highly predictable. Most suffixes are verb-style actions like add, link, search, list, and forget, though profile and help are nouns rather than actions, creating a minor inconsistency.
Seven tools is well-scoped for a memory server: core CRUD, linking, browsing, preference storage, and help each have a clear place. There is no apparent redundancy or excessive surface area.
The core memory lifecycle is covered: add, read/search/list, delete, link, and profile storage. An explicit update operation and an unlink operation are missing, but these can be worked around with forget+add, so they are minor gaps rather than critical dead ends.
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceSelf-hosted memory service that gives AI agents persistent, searchable memory across sessions, machines, and projects.1MIT
- AlicenseNot gradedqualityBmaintenanceLocal-first, multi-user shared memory for AI agents with semantic search, offline support, and team synchronization.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to maintain persistent, local memory with retrieval-augmented search, knowledge graphs, and context surfacing, without any cloud dependencies.416 npmMIT
- FlicenseNot gradedqualityCmaintenanceProvides AI agents with persistent, local cross-session shared memory by combining vector semantic retrieval with knowledge graph relationships, and supports short/long-term memory management and local backups.-