MemoryMesh

by sparkvibe-io

Not rated
GitHub

About

Zero-dependency persistent AI memory using SQLite. Dual-store, pluggable embeddings, 10 MCP tools.

Details

Author
sparkvibe-io
Categories
Productivity, Other, Knowledge Base

Option 2: Install locally (recommended for production)

Install once, then add the config to your tool of choice:

Claude Code(~/.claude/settings.json):

{ "mcpServers": { "memorymesh": { "command": "memorymesh-mcp" } } }
{ "mcpServers": { "memorymesh": { "command": "memorymesh-mcp" } } }
{ "mcpServers": { "memorymesh": { "command": "memorymesh-mcp" } } }

Your AI now has persistent memory across sessions. Preferences, decisions, and patterns survive context window resets.

from memorymesh import MemoryMesh memory = MemoryMesh() memory.remember("User prefers Python and dark mode") results = memory.recall("What does the user prefer?")

That is it. Three lines to give your AI application persistent, semantic memory.

# Works with any LLM -- inject recalled context into your prompts context = memory.recall("What do I know about this user?") # Claude response = claude_client.messages.create( model="claude-sonnet-4-20250514", system=f"User context: {context}", messages=](https://smithery.ai/servers/sparkvibe-io/memorymesh)[{"role": "user", "content": "Help me design an API"}], ) # GPT response = openai_client.chat.completions.create( model="gpt-4", messages=[ {"role": "system", "content": f"User context: {context}"}, {"role": "user", "content": "Help me design an API"}, ], ) # Or Ollama, Gemini, Mistral, Llama, or literally anything else

- Store-- After each interaction,remember()the key facts, decisions, and patterns (not the full conversation).
- Recall-- At the start of the next session,recall()retrieves only the most relevant memories ranked by semantic similarity, recency, and importance.
- Persist-- Memories live in SQLite on your machine. They survive session restarts, tool switches, and context window resets.

- Cross-session persistence-- Decisions made Monday are still known Friday.
- Cross-tool memory-- What you teach Claude stays available in Gemini, Codex, and Cursor.
- Structured recall-- Categories, importance scoring, time decay, and semantic search instead of brute-force history replay.
- Privacy-- Everything local. No cloud, no telemetry, no data leaves your machine.

# Base installation (no external dependencies, uses built-in keyword matching) pip install memorymesh # With local embeddings (sentence-transformers, runs entirely on your machine) pip install "memorymesh[local]" # With Ollama embeddings (connect to a local Ollama instance) pip install "memorymesh[ollama]" # With OpenAI embeddings pip install "memorymesh[openai]" # Everything pip install "memorymesh[all]"

- Simple API--remember(),recall(),forget(). That is the core interface. No boilerplate, no configuration ceremony.
- SQLite-Based-- All memory stored in SQLite files. No database servers, no infrastructure. Automatic schema migrations.
- Framework-Agnostic-- Works with any LLM, any framework, any architecture. Use it with LangChain, LlamaIndex, raw API calls, or your own setup.
- Pluggable Embeddings-- Choose from local models, Ollama, OpenAI, or plain keyword matching with zero dependencies.
- MCP Support-- Built-in MCP server for seamless integration with Claude Code, Cursor, Gemini CLI, and other MCP-compatible tools.
- Memory Categories-- Automatic categorization with scope routing. Preferences go global; decisions stay in the project. MemoryMesh decides where memories belong.
- Encrypted Storage-- Optionally encrypt memory text and metadata at rest with zero external dependencies.
- Privacy-First-- All data stays on your machine. No telemetry, no cloud calls, no data collection. You own your data.
- Auto-Compaction-- Transparent deduplication that runs automatically during normal use. Like SQLite's auto-vacuum, you never need to think about it.
- Cross-Platform-- Runs on Linux, macOS, and Windows. Anywhere Python runs, MemoryMesh runs.

- Bulk Access Updates--recall()batches N access-time updates into 1-2 SQL calls instead of N.
- Light Listing--session_startandsmart_syncskip loading embedding blobs, reducing I/O.
- Recency Fix--update_access()no longer setsupdated_at, fixing a recency feedback loop.

- Contradiction Scan-- 10K→500 candidate limit for contradiction detection (biggest perf win).
- Security-- CORS same-origin, 1MB body limit, SSRF blocklist expansion, MCP assert→if/raise.
- Correctness-- Atomic scope migration (save-first-then-delete),on_conflictvalidation.
- Infra--PRAGMA busy_timeout=5000, PEP 561py.typed, expanded secret regex patterns.

- Smart Sync-- Export the top-N most relevant memories to.mdfiles, ranked by importance and recency.
- Configurable Relevance Weights-- Tune recency, importance, and similarity weights via environment variables or constructor parameters.
- EncryptedStore Completeness--EncryptedMemoryStorenow supportssearch_filteredandupdate_fields, matching the fullMemoryStoreinterface.
- Security Hardening-- SQL injection fix insearch_filtered(strict allowlist for metadata keys) and explicit file permissions on database files.

v4.3.0is the latest release. Available onPyPI.

v5.0 -- Performance & Scaleis next. sqlite-vec ANN indexing, FTS5 keyword search, batch operations, and NumPy-accelerated cosine similarity for 5K+ memory stores.

See thefull roadmapfor details, strategic context, and completed milestones.

Full documentation:sparkvibe-io.github.io/memorymesh

We welcome contributions from everyone. SeeCONTRIBUTING.mdfor guidelines on how to get started.

MIT License. SeeLICENSEfor the full text.

MemoryMesh is part of theSparkVibeopen-source AI initiative. We believe that foundational AI tools should be free, open, and accessible to everyone -- not locked behind paywalls, cloud subscriptions, or proprietary platforms.

Our mission is to reduce the cost and complexity of building AI applications, so that developers everywhere -- whether at a startup, a research lab, a nonprofit, or learning on their own -- can build intelligent systems without barriers.

If AI is going to shape the future, the tools that power it should belong to all of us.

Chartbrew + AI agents. MCP server exposing Chartbrew's documented API: teams, connections, datasets, dashboards, charts, live queries, and secure embedding. TypeScript · stdio · restricted/unrestricted tool modes.

Codebase memory for coding agents, with no embeddings and no API key. A deterministic AST index answers "which files are relevant to this task?" in milliseconds, and agents write durable notes about the repo that are content-hash checked — a note flags itself stale the moment the code it describes changes. Notes are markdown inside the repo, so they commit and review alongside your code.

Perform semantic search and retrieval augmented generation over your Apple Notes.

Search 286 episodes of product management wisdom from Lenny Rachitsky. Semantic search across 300+ hours of transcripts.

Personal knowledge graph AI memory. 15 tools, 89 actions. Semantic search, emotional intelligence, CRM, life management, social, self-training, autonomous insights, research agent, automations.

Embeddings, vector search, document storage, and full-text search with the open-source AI application database

Semantic search through Dickens' classic tale. Find passages by meaning, theme, or concept - not just keywords.

Discovery & reputation layer for AI agents: semantic search over 15,000+ agents and MCP servers, cross-registry reputation, remote MCP over Streamable HTTP, no auth.

A local, high-performance memory server for AI agents, built with SQLite, vector embeddings, and a knowledge graph. Packaged for npm and Docker.

MCP server for Apache AGE graph databases on PostgreSQL. 21 MCP tools — the most comprehensive Apache AGE MCP server (graph CRUD, Cypher queries, batch transactions, semantic search, Graph RAG, vis.js visualization, export/import) - F#/.NET — the only non-Python Apache AGE MCP server, installs as a single dotnet tool - Production-grade — BenchmarkDotNet-verified performance (cached queries in 62 ns, Cypher in 1 ms) - Open source — MIT license, published on NuGet - Documentation — full docs site at neftedollar.com/age-mcp

Give any LLM persistent memory in 3 lines of Python. Zero dependencies. Fully local.

AI tools start every session with amnesia. Your preferences, decisions, past mistakes -- all gone. You repeat yourself. The AI re-discovers things you already told it. Context windows reset, and weeks of accumulated knowledge vanish.

MemoryMesh fixes this. Install once, and your AI remembers everything -- across sessions, across tools, across projects.

Like SQLite revolutionized embedded databases, MemoryMesh brings the same philosophy to AI memory: simple, reliable, embeddable. No infrastructure. No lock-in. No surprises.

Connect to the hosted MemoryMesh server -- no local installation needed:

npx -y @smithery/cli install @sparkvibe-io/memorymesh --client claude

Or browse and connect atsmithery.ai/servers/sparkvibe-io/memorymesh. Supports 20+ MCP clients including Claude Code, Cursor, Windsurf, and Cline.

Option 2: Install locally (recommended for production)

Install once, then add the config to your tool of choice:

Claude Code(~/.claude/settings.json):

{ "mcpServers": { "memorymesh": { "command": "memorymesh-mcp" } } }
{ "mcpServers": { "memorymesh": { "command": "memorymesh-mcp" } } }
{ "mcpServers": { "memorymesh": { "command": "memorymesh-mcp" } } }

Your AI now has persistent memory across sessions. Preferences, decisions, and patterns survive context window resets.

from memorymesh import MemoryMesh memory = MemoryMesh() memory.remember("User prefers Python and dark mode") results = memory.recall("What does the user prefer?")

That is it. Three lines to give your AI application persistent, semantic memory.

# Works with any LLM -- inject recalled context into your prompts context = memory.recall("What do I know about this user?") # Claude response = claude_client.messages.create( model="claude-sonnet-4-20250514", system=f"User context: {context}", messages=[{"role": "user", "content": "Help me design an API"}], ) # GPT response = openai_client.chat.completions.create( model="gpt-4", messages=[ {"role": "system", "content": f"User context: {context}"}, {"role": "user", "content": "Help me design an API"}, ], ) # Or Ollama, Gemini, Mistral, Llama, or literally anything else

- Store-- After each interaction,remember()the key facts, decisions, and patterns (not the full conversation).
- Recall-- At the start of the next session,recall()retrieves only the most relevant memories ranked by semantic similarity, recency, and importance.
- Persist-- Memories live in SQLite on your machine. They survive session restarts, tool switches, and context window resets.

- Cross-session persistence-- Decisions made Monday are still known Friday.
- Cross-tool memory-- What you teach Claude stays available in Gemini, Codex, and Cursor.
- Structured recall-- Categories, importance scoring, time decay, and semantic search instead of brute-force history replay.
- Privacy-- Everything local. No cloud, no telemetry, no data leaves your machine.

# Base installation (no external dependencies, uses built-in keyword matching) pip install memorymesh # With local embeddings (sentence-transformers, runs entirely on your machine) pip install "memorymesh[local]" # With Ollama embeddings (connect to a local Ollama instance) pip install "memorymesh[ollama]" # With OpenAI embeddings pip install "memorymesh[openai]" # Everything pip install "memorymesh[all]"

- Simple API--remember(),recall(),forget(). That is the core interface. No boilerplate, no configuration ceremony.
- SQLite-Based-- All memory stored in SQLite files. No database servers, no infrastructure. Automatic schema migrations.
- Framework-Agnostic-- Works with any LLM, any framework, any architecture. Use it with LangChain, LlamaIndex, raw API calls, or your own setup.
- Pluggable Embeddings-- Choose from local models, Ollama, OpenAI, or plain keyword matching with zero dependencies.
- MCP Support-- Built-in MCP server for seamless integration with Claude Code, Cursor, Gemini CLI, and other MCP-compatible tools.
- Memory Categories-- Automatic categorization with scope routing. Preferences go global; decisions stay in the project. MemoryMesh decides where memories belong.
- Encrypted Storage-- Optionally encrypt memory text and metadata at rest with zero external dependencies.
- Privacy-First-- All data stays on your machine. No telemetry, no cloud calls, no data collection. You own your data.
- Auto-Compaction-- Transparent deduplication that runs automatically during normal use. Like SQLite's auto-vacuum, you never need to think about it.
- Cross-Platform-- Runs on Linux, macOS, and Windows. Anywhere Python runs, MemoryMesh runs.

- Bulk Access Updates--recall()batches N access-time updates into 1-2 SQL calls instead of N.
- Light Listing--session_startandsmart_syncskip loading embedding blobs, reducing I/O.
- Recency Fix--update_access()no longer setsupdated_at, fixing a recency feedback loop.

- Contradiction Scan-- 10K→500 candidate limit for contradiction detection (biggest perf win).
- Security-- CORS same-origin, 1MB body limit, SSRF blocklist expansion, MCP assert→if/raise.
- Correctness-- Atomic scope migration (save-first-then-delete),on_conflictvalidation.
- Infra--PRAGMA busy_timeout=5000, PEP 561py.typed, expanded secret regex patterns.

- Smart Sync-- Export the top-N most relevant memories to.mdfiles, ranked by importance and recency.
- Configurable Relevance Weights-- Tune recency, importance, and similarity weights via environment variables or constructor parameters.
- EncryptedStore Completeness--EncryptedMemoryStorenow supportssearch_filteredandupdate_fields, matching the fullMemoryStoreinterface.
- Security Hardening-- SQL injection fix insearch_filtered(strict allowlist for metadata keys) and explicit file permissions on database files.

v4.3.0is the latest release. Available onPyPI.

v5.0 -- Performance & Scaleis next. sqlite-vec ANN indexing, FTS5 keyword search, batch operations, and NumPy-accelerated cosine similarity for 5K+ memory stores.

See thefull roadmapfor details, strategic context, and completed milestones.

Full documentation:sparkvibe-io.github.io/memorymesh

We welcome contributions from everyone. SeeCONTRIBUTING.mdfor guidelines on how to get started.

MIT License. SeeLICENSEfor the full text.

MemoryMesh is part of theSparkVibeopen-source AI initiative. We believe that foundational AI tools should be free, open, and accessible to everyone -- not locked behind paywalls, cloud subscriptions, or proprietary platforms.

Our mission is to reduce the cost and complexity of building AI applications, so that developers everywhere -- whether at a startup, a research lab, a nonprofit, or learning on their own -- can build intelligent systems without barriers.

If AI is going to shape the future, the tools that power it should belong to all of us.

Chartbrew + AI agents. MCP server exposing Chartbrew's documented API: teams, connections, datasets, dashboards, charts, live queries, and secure embedding. TypeScript · stdio · restricted/unrestricted tool modes.

Codebase memory for coding agents, with no embeddings and no API key. A deterministic AST index answers "which files are relevant to this task?" in milliseconds, and agents write durable notes about the repo that are content-hash checked — a note flags itself stale the moment the code it describes changes. Notes are markdown inside the repo, so they commit and review alongside your code.

Perform semantic search and retrieval augmented generation over your Apple Notes.

Search 286 episodes of product management wisdom from Lenny Rachitsky. Semantic search across 300+ hours of transcripts.

Personal knowledge graph AI memory. 15 tools, 89 actions. Semantic search, emotional intelligence, CRM, life management, social, self-training, autonomous insights, research agent, automations.

Embeddings, vector search, document storage, and full-text search with the open-source AI application database

Semantic search through Dickens' classic tale. Find passages by meaning, theme, or concept - not just keywords.

Discovery & reputation layer for AI agents: semantic search over 15,000+ agents and MCP servers, cross-registry reputation, remote MCP over Streamable HTTP, no auth.

A local, high-performance memory server for AI agents, built with SQLite, vector embeddings, and a knowledge graph. Packaged for npm and Docker.

MCP server for Apache AGE graph databases on PostgreSQL. 21 MCP tools — the most comprehensive Apache AGE MCP server (graph CRUD, Cypher queries, batch transactions, semantic search, Graph RAG, vis.js visualization, export/import) - F#/.NET — the only non-Python Apache AGE MCP server, installs as a single dotnet tool - Production-grade — BenchmarkDotNet-verified performance (cached queries in 62 ns, Cypher in 1 ms) - Open source — MIT license, published on NuGet - Documentation — full docs site at neftedollar.com/age-mcp

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.