Install
$ agentstack add mcp-mienetic-mnema Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
β Flagged1 finding(s); flagged for manual review. Β· v0.1.0 How review works β
- β’ Prompt-injection patterns
- β’ Secret / credential exfiltration
- β’ Dangerous shell & filesystem operations
- β’ Untrusted network calls
- β’ Known-malicious package signatures
- high Pipes remote content directly into a shell (remote code execution).
What it can access
- β Network access Used
- β Filesystem access No
- β Shell / process execution No
- β Environment & secrets Used
- β Dynamic code execution No
From automated source analysis of v0.1.0. βUsedβ means the capability is present in the source β more access means more to trust, not that itβs unsafe.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work βAbout
π§ Mnema β Long-term Memory for AI
> Give your AI agents persistent, searchable memory. Solve the context-window problem with MCP Γ Vector DB.
[](#-quick-start) [](https://www.python.org/downloads/) [](LICENSE) [](https://modelcontextprotocol.io/) [](#status)
Mnema (ΞΌΞ½αΏΞΌΞ± β Greek for "memory") is an open-source Model Context Protocol server that gives language-model agents a long-term memory layer. Instead of stuffing every relevant fact into a single conversation (and paying for it in tokens, latency, and lost context), store durable facts once and recall them later β by meaning, not by keyword.
β¨ Features
- π MCP-native β drop it into Claude Desktop, ZCode, Cursor, or any MCP-compatible client.
- ποΈ Pluggable vector backends β ChromaDB (embedded, default), Qdrant (local or remote), or sqlite-vec (pure-SQLite, zero-dep).
- π§ Hybrid search β combines semantic similarity + tag overlap + decay scoring into a single ranked score.
- β³ Memory decay β a forgetting curve (
recency Γ frequency Γ importance) so the store stays focused on what matters. - π Summarization β plans how to condense many memories into a few high-level ones; the calling AI executes the plan (Mnema never calls an LLM on its own).
- π₯ Multi-user / multi-session β scope-based namespace isolation (
user:alice,session:abc,agent:bot-1). - π§ Offline by default β local sentence-transformers embeddings; no API keys required to start.
- π¦ Programmatic SDK β use Mnema from Python without standing up an MCP server.
- π» CLI β
mnema add,mnema recall,mnema statsβ¦ for terminal-first workflows. - π§ͺ Well-tested β pure-function unit tests + a backend matrix that runs against every supported store.
π Quick start
One-line install (recommended)
curl -fsSL https://raw.githubusercontent.com/mienetic/mnema/main/scripts/install.sh | bash
That's it. The installer:
- Installs
uv(no pip / no virtualenv wrangling). - Clones Mnema from GitHub.
- Creates an isolated Python 3.11 environment with all dependencies.
- Installs the
mnemaandmnema-updatecommands. - Runs
mnema --doctorto verify.
> πΉπ New to this? See [GETTINGSTARTED.md](GETTINGSTARTED.md) β step-by-step guide (in Thai).
Verify & update
mnema --doctor # check backend + embedding loaded
mnema # run the MCP server (stdio, for clients)
mnema-update # git pull + reinstall + verify (run this to upgrade)
Pick different backends / embeddings (optional)
The default install ships Chroma + local embeddings β enough for most users. To use another backend, reinstall with the matching extra(s):
# Qdrant (local or remote)
curl -fsSL https://raw.githubusercontent.com/mienetic/mnema/main/scripts/install.sh \
| MNEMA_EXTRAS="qdrant,local" bash
# sqlite-vec (smallest footprint)
curl -fsSL https://raw.githubusercontent.com/mienetic/mnema/main/scripts/install.sh \
| MNEMA_EXTRAS="sqlite_vec,local" bash
# Everything (all backends + OpenAI embeddings)
curl -fsSL https://raw.githubusercontent.com/mienetic/mnema/main/scripts/install.sh \
| MNEMA_EXTRAS=all bash
Available extras: chroma, qdrant, sqlite_vec, local, openai, default (= chroma,local), all. See [docs/backends.md](docs/backends.md) and [docs/embedding-providers.md](docs/embedding-providers.md).
Manual / from source
git clone https://github.com/mienetic/mnema
cd mnema/packages/mnema-python
uv venv --python 3.11 .venv
VIRTUAL_ENV=.venv uv pip install -e '.[default]'
.venv/bin/mnema --doctor
Wire it into your AI client
Pick your client below. Each example assumes Mnema is already installed (mnema is on your PATH after running the installer).
Claude Desktop (Anthropic's desktop app)
- Find or create the config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
(in Finder, press Cmd+Shift+G and paste the path)
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- Paste this into the file (merge with existing
mcpServersif present):
``json { "mcpServers": { "mnema": { "command": "mnema", "env": { "MNEMA_BACKEND": "chroma", "MNEMA_BACKEND_PATH": "~/.mnema-data", "MNEMA_DEFAULT_SCOPE": "user:me" } } } } ``
- Fully quit Claude Desktop (menu β Quit, not just close the window) and reopen it.
- Verify: click the π plug icon in the chat β
mnemashould appear in the list. - Try: "Remember that I prefer dark mode." then, in a new chat, "What do you know about my preferences?"
Claude Code (the claude CLI)
- From your project root, add the server:
``bash claude mcp add mnema mnema ` Or add it to ~/.claude.json` (user scope) directly:
``json { "mcpServers": { "mnema": { "command": "mnema", "env": { "MNEMA_DEFAULT_SCOPE": "user:me" } } } } ``
- Start
claudeand run/mcpto confirmmnemais connected. - Tools are available automatically β try "remember that this project uses Postgres".
Cursor (the AI code editor)
- Create
~/.cursor/mcp.json(global) or.cursor/mcp.json(project-level):
``json { "mcpServers": { "mnema": { "command": "mnema", "env": { "MNEMA_BACKEND": "chroma", "MNEMA_BACKEND_PATH": "~/.mnema-data", "MNEMA_DEFAULT_SCOPE": "project:current" } } } } ``
- Open Cursor β Settings β MCP (or reload the window:
Cmd+Shift+Pβ "Reload Window"). mnemashould show a green dot. If red, check the path withwhich mnema.- Use it in chat: "search my memory for past decisions about the auth module."
Zed (the editor)
- Open
~/.config/zed/settings.json(macOS) and add undercontext_servers:
``json { "context_servers": { "mnema": { "command": { "path": "mnema" }, "env": { "MNEMA_DEFAULT_SCOPE": "user:me" } } } } ``
- Restart Zed, then enable the server in Assistant panel settings.
- In the Assistant, tag
@mnemato pull memory context into the conversation.
Cline (VS Code extension)
- Open the Cline sidebar β MCP icon β "Edit MCP Settings".
- Add the entry to
cline_mcp_settings.json:
``json { "mcpServers": { "mnema": { "command": "mnema", "env": { "MNEMA_DEFAULT_SCOPE": "workspace" }, "disabled": false, "alwaysAllow": [] } } } ``
- Cline auto-detects the change β no restart needed.
- Ask Cline: "search memory for anything I decided about testing strategy."
Continue.dev (VS Code / JetBrains)
- Open
~/.continue/config.jsonand add underexperimental.modelContextProtocolServers:
``json { "experimental": { "modelContextProtocolServers": [ { "transport": { "type": "stdio", "command": "mnema" } } ] } } ``
- Reload the window (
Cmd+Shift+Pβ "Reload Window"). - Use
@mnemain the Continue chat to scope memory tools.
Windsurf (Codeium's editor)
- Open Settings β MCP Servers β "Add Server" (or edit
~/.codeium/windsurf/mcp_config.json):
``json { "mcpServers": { "mnema": { "command": "mnema" } } } ``
- Click Refresh on the MCP panel β
mnemashould turn active. - Use Cascade with
@mnemato recall project context.
Any other MCP client (generic)
Mnema is a standard stdio MCP server. Any client that supports the Model Context Protocol can launch it:
{
"mcpServers": {
"mnema": { "command": "mnema" }
}
}
For remote / multi-client setups, run Mnema over streamable HTTP:
mnema --transport http --host 127.0.0.1 --port 8000
# then point clients at http://127.0.0.1:8000/mcp
Ready-to-copy configs for all clients are in [examples/](examples/).
π οΈ Tools
| Tool | Description | Read-only? | |---|---|---| | mnema_remember | Store a new memory | βοΈ | | mnema_recall | Pure semantic vector search | π | | mnema_search | Hybrid: vector + tags + decay | π | | mnema_get_memory | Fetch one memory by id | π | | mnema_update_memory | Patch text/tags/importance/metadata | βοΈ | | mnema_forget | Delete one memory | ποΈ | | mnema_forget_scope | Delete all memories in a scope | ποΈ | | mnema_list_scopes | Enumerate scopes + counts | π | | mnema_summarize | Plan how to condense a scope | π | | mnema_apply_decay | Find/forget low-value memories | ποΈ | | mnema_stats | Aggregate store stats | π |
Plus resources (mnema://memory/{id}, mnema://scope/{s}/summary, mnema://stats) and prompt templates (summarize_scope, recall_for).
See [SKILL.md](SKILL.md) for the full agent-facing usage guide.
π» CLI
You don't need an AI client to use Mnema β the mnema command works as a terminal tool too. (Comes free with the installer.)
# Store a memory
mnema add "Alice prefers Earl Grey tea" --tags pref,tea --scope user:alice
# Recall by meaning
mnema recall "what does alice drink?" --scope user:alice
# Hybrid search (vector + tags + decay)
mnema search "preferences" --tag pref --scope user:alice
# Inspect
mnema get
mnema list-scopes
mnema stats
# Maintain
mnema decay --threshold 0.1 # dry-run: list low-value memories
mnema decay --threshold 0.1 --apply # actually forget them
mnema summarize session:abc # plan how to condense a scope
# Backup / migrate
mnema export -o memories.json
mnema import -i memories.json
Add --json to any read command for machine-readable output. Run mnema --help for full options.
π§βπ» Programmatic SDK
Use Mnema from Python without MCP β same engine, no IPC:
import asyncio
from mnema.sdk import MemoryClient
async def main():
async with MemoryClient() as client:
await client.remember(
"Alice's deployment target is fly.io (region sin).",
scope="project:web",
tags=["deploy", "infra"],
importance=8,
)
hits = await client.search("where do we deploy?", scope="project:web")
print(hits.results[0].memory.text)
asyncio.run(main())
Synchronous helper for scripts:
from mnema.sdk import sync_client
with sync_client() as client:
client.remember("a durable fact", tags=["x"])
print(client.recall("durable").results)
βοΈ Configuration
All settings are environment-driven (or .env):
| Variable | Default | Description | |---|---|---| | MNEMA_BACKEND | chroma | chroma \| qdrant \| sqlite_vec | | MNEMA_BACKEND_PATH | .mnema/data | Local path or remote URL (http://β¦) | | MNEMA_BACKEND_COLLECTION | memories | Collection/table name | | MNEMA_EMBEDDING | local | local (offline) \| openai | | MNEMA_EMBEDDING_MODEL | all-MiniLM-L6-v2 | Model name | | MNEMA_EMBEDDING_DIM | auto | Override vector dim | | MNEMA_OPENAI_API_KEY | β | Required when embedding=openai | | MNEMA_DEFAULT_SCOPE | global | Scope when a tool omits it | | MNEMA_DECAY_HALF_LIFE_DAYS | 30 | Recency half-life | | MNEMA_DECAY_FLOOR | 0.05 | Min decay score | | MNEMA_VECTOR_WEIGHT | 0.7 | Hybrid score weight (must sum to 1) | | MNEMA_KEYWORD_WEIGHT | 0.2 | Hybrid score weight | | MNEMA_DECAY_WEIGHT | 0.1 | Hybrid score weight | | MNEMA_TRANSPORT | stdio | stdio \| http | | MNEMA_HTTP_HOST | 127.0.0.1 | HTTP bind host | | MNEMA_HTTP_PORT | 8000 | HTTP bind port |
ποΈ Choosing a backend
| Backend | Install extra | Embedded? | Best for | |---|---|---|---| | Chroma (default) | chroma | β
in-process + persistent | Quick start, single-user, dev | | Qdrant | qdrant | β
local path / :memory: / remote | Production, high scale, metadata filtering | | sqlite-vec | sqlite_vec | β
pure SQLite | Smallest footprint, constrained envs |
Switch backends by reinstalling with the right extra and setting the env var:
curl -fsSL https://raw.githubusercontent.com/mienetic/mnema/main/scripts/install.sh \
| MNEMA_EXTRAS="qdrant,local" bash
export MNEMA_BACKEND=qdrant
mnema --doctor
See [docs/backends.md](docs/backends.md) for full details.
π§ Embedding providers
| Provider | Install extra | Mode | Dim | |---|---|---|---| | sentence-transformers (default) | local | Offline (CPU/GPU) | 384 (all-MiniLM-L6-v2) | | OpenAI | openai | API (requires key) | 1536 (text-embedding-3-small) |
curl -fsSL https://raw.githubusercontent.com/mienetic/mnema/main/scripts/install.sh \
| MNEMA_EXTRAS="chroma,openai" bash
export MNEMA_EMBEDDING=openai
export MNEMA_OPENAI_API_KEY=sk-...
mnema --doctor
See [docs/embedding-providers.md](docs/embedding-providers.md) for model options.
π§ͺ Development
git clone https://github.com/mienetic/mnema.git
cd mnema/packages/mnema-python
# Install with dev deps + all backends
uv venv --python 3.11 .venv
VIRTUAL_ENV=.venv uv pip install -e '.[all,dev]'
# Run tests (skips backends whose deps are missing)
pytest
# Run a specific backend's tests after installing its extra
pytest -m chroma
# Lint + typecheck
ruff check .
mypy src/mnema
Test the server interactively
npx @modelcontextprotocol/inspector uv run mnema
This opens the MCP Inspector web UI where you can call every tool.
π³ Docker
docker compose -f docker/docker-compose.yml up mnema
# Streamable HTTP on http://localhost:8000/mcp
See [docker/](docker/) for the Dockerfile and compose setup.
π¦ Project layout
mnema/
βββ packages/
β βββ mnema-python/ # β MCP server + SDK (Python)
β β βββ src/mnema/
β β β βββ backends/ # chroma, qdrant, sqlite_vec
β β β βββ embeddings/ # sentence_transformers, openai
β β β βββ tools/ # 10 MCP tools
β β β βββ service.py # orchestration
β β β βββ decay.py # forgetting curve
β β β βββ summarize.py # summarization planner
β β β βββ sdk.py # programmatic SDK
β β β βββ server.py # FastMCP bootstrap
β β βββ tests/
β βββ mnema-ts/ # TypeScript MCP server (planned)
β βββ mnema-cli/ # Node CLI (planned)
βββ docker/ # Dockerfile + compose
βββ docs/ # architecture, backends, deployment
βββ examples/ # client config examples
βββ SKILL.md # agent-facing usage guide
βββ README.md
π€ How it works
ββββββββββββββββ MCP ββββββββββββββββββββ
β AI Client βββββββββββββΊβ Mnema Server β
ββββββββββββββββ (stdio/ β ββββββββββββββ β
HTTP) β β 10 tools β β
β ββββββββ¬ββββββ β
β ββββββββΌββββββ β
β β Service β β
β ββββ¬ββββββ¬ββββ β
β ββββββΌββ βββΌβββββ β
β βembed β βvectorβ β
β ββββ¬ββββ ββββ¬ββββ β
ββββββΌββββββββββΌβββββ
β β
sentence- β Chroma/Qdrant/
transformers β sqlite-vec
(local) β
βΌ βΌ
vectors + metadata
Every memory is embedded, stored alongside its scope/tags/importance, and ranked on retrieval by:
score = 0.7Β·vector + 0.2Β·keyword + 0.1Β·decay
where decay = recency(half-life) Γ frequency Γ importance.
πΊοΈ Roadmap
- [x] Python MCP server (FastMC
β¦
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source β we do not rehost the code.
- Author: mienetic
- Source: mienetic/mnema
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.