v1.0  ·  MCP Memory Server  ·  MIT

Open-source MCP agent memory server. Fair LongMemEval-S 81.0% (405/500). Self-hosted bi-temporal graph memory. 32 tools. Portable Docker volumes.

One memory layer.
Every agent runtime.

Plug OpenStinger into any MCP-compatible agent. Hybrid BM25 + vector retrieval, bi-temporal fact validity, structured vault notes, and optional alignment evaluation. Memory stays when you change frameworks.

Works with OpenClaw · Cursor · Claude Code · Nanobot · Hermes · DeerFlow · Qwen-Agent · LangGraph · ZeroClaw · NanoClaw · PicoClaw
Any runtime that speaks MCP. One endpoint. Zero lock-in.

Alongside → Primary → Exclusive  ·  Add memory without rewriting the agent

★  Star on GitHub Cursor persistent memory →
scroll
32
MCP Tools
3
Harness Tiers
81%
LongMemEval Fair
12
Audit Tables
3
Memory Dedup Stages
0
Vendor Lock-in
Memory Architecture

Your agent changes.
The memory doesn't have to.

OpenStinger's entire knowledge state lives in two Docker volumes.
Unplug from one agent. Move to any host. Plug into another.
Every entity, relationship, vault note, and alignment log transfers completely.

🔌
Unplug
Export volumes
📦
Move
Any host. Any cloud.
Plug In
Full memory restored

Switch from OpenClaw → NanoClaw. Move from Mac Mini → AWS. OpenStinger memory travels with you.
No other *Claw memory system decouples memory from the runtime cleanly enough to make this true.

ABC Test (v0.7) — proven in production:
Runtime A (OpenClaw) → Runtime B (Qwen/Llama) → Runtime C (DeerFlow/Grok)
Full B→C→B circular memory propagation. Identity intact across every hop.

v0.8  Local embeddings via Ollama: nomic-embed-text · mxbai-embed-large · all-minilm
No cloud API. No token cost. Full offline operation. Run openstinger-cli init and select "ollama" when prompted for embedding provider.

v0.9  Resilience + integrity + boot context
Circuit breaker · timeouts · retry · hash-chained provenance · write policy · memory_wake_up · GradientHoneypot (gradient_honeypot_status). 32 MCP tools.

v1.0  Fair LongMemEval claim
Hybrid retrieve packaging, temporal digests, knowledge-update recency. Publishable fair suite 81.0% on LongMemEval-S (405/500).

Benchmark

LongMemEval.
81.0% fair path.

LongMemEval-S cleaned, 500 questions. Lite ingest only: no retain, no LLM rerank, no chunk or event atoms. Same protocol vendors cite for agent memory.

Overall 81.0% (405/500) R@5>0 acc 83.15% Answer DeepSeek V4 Pro Judge DeepSeek V3.2
Type What it tests Acc n
Overall fair suite 81.0% 500
single-session-user Find a fact the user said in one session 92.9% 70
knowledge-update Prefer the latest fact when older ones conflict 89.7% 78
single-session-assistant Find a fact the assistant said in one session 85.7% 56
multi-session Combine evidence across many sessions 76.7% 133
temporal-reasoning Dates, durations, order of events 73.7% 133
single-session-preference Personalize from stated preferences 73.3% 30

Prior claim 80.4%. Archive fair_c4_500_20260720_1802. Mid-size 100Q gates are diagnostics only. Detail: GitHub README. Agent summary: llms.txt.

For agents and developers searching

MCP memory server.
Cursor persistent memory.

Looking for an MCP agent memory server, OpenClaw memory backend, or Cursor persistent memory? OpenStinger is a self-hosted SSE MCP server at http://localhost:8766/sse with bi-temporal graph memory, vault notes, and alignment tools.

Keywords MCP memory · Cursor · OpenClaw · Hermes · LongMemEval Guide cursor-persistent-memory.html

Full setup with .cursor/mcp.json example: Cursor persistent memory with OpenStinger. Machine-readable: llms.txt.

Architecture

Three tiers.
One MCP endpoint.

Episodic memory, structured self-knowledge, and alignment evaluation. Additive and deployable one tier at a time. Same SSE endpoint for every MCP client.

Tier 1 · Temporal Engine

Memory Harness

Bi-temporal episodic memory. Every conversation, tool call, decision, and skill your agent touches — stored, deduplicated, conflict-resolved, and searchable forever.

The gap

Without persistent memory, agents start fresh on every invocation. No cross-session continuity, no accumulated project knowledge, and no audit trail of what was decided before.

  • Bi-temporal episodic graph — FalkorDB stores when events happened (valid_at) separately from when the agent learned them (recorded_at). History is never overwritten. Facts expire gracefully.
  • 3-stage entity deduplication — exact match → MinHash LSH fuzzy match → LLM semantic confirmation. "IBM" and "International Business Machines" merge to one UUID.
  • LLM conflict resolution — "Alice changed jobs" supersedes the old fact. "Alice works two jobs" coexists. The temporal record is always correct.
  • Hybrid BM25 + semantic vector search — keyword matching on episode text + cosine similarity on entity names + fact embeddings, normalized and merged into a single ranked result set.
  • Byte-offset cursor ingestion — reads your agent's session JSONL files continuously. Survives restarts. Never re-ingests. Never writes to your agent's files.
  • Episode content embeddings every episode is vector-embedded, enabling semantic memory queries like "what were we working on last week?" even when exact keywords don't match.
  • memory_wake_up v0.9 session boot context: top episodes by access count plus vault identity notes, so the agent starts grounded instead of cold.
E grows through time — accumulated context feeds β
memory_tools.py 12 Tools
memory_add
memory_query
memory_search
memory_get_entity
memory_get_episode
memory_job_status
memory_ingest_now
memory_namespace_status
memory_list_agents
memory_delete
memory_update
memory_wake_up v0.9
Episodes stored
1536
Vector dims
3
Dedup stages
agent → mcp
# semantic memory query
memory_query(
  query="auth work last sprint",
  limit=10
)
# returns: episodes + entities + facts
# ranked by unified relevance score
StingerVault · vault_engine.py 11 Tools
vault_status
vault_sync_now
vault_stats
vault_promote_now
vault_note_list
vault_note_get
vault_note_add v0.7
knowledge_ingest new
namespace_list new
namespace_create new
namespace_archive new
5
Note categories
0.92
Identity threshold
7
Cycle operations
vault · 5 categories
# vault builds itself autonomously
identity    ← who the agent is (conf ≥ 0.92)
domain      ← what it knows (conf ≥ 0.85)
methodology ← how it works
preference  ← what it favours
constraint  ← hard limits
Tier 2 · StingerVault

Reasoning Harness

Memory alone isn't self-knowledge. Raw episodes don't give an agent identity. StingerVault distils sessions into structured, classified, self-updating self-knowledge — autonomously.

The gap

Episodes alone do not answer: "Who am I? What do I believe? What are my constraints?" Without a structured self-model, agents cannot reliably surface identity or policy from raw logs.

  • 7-operation classification cycle — Extract → Decompose → Evolve → Link → Decay → Organise → Log. Runs on APScheduler. Crash-resilient. Misfire-tolerant.
  • 5 vault note categories — identity (threshold 0.92), domain (0.85), methodology, preference, constraint. Notes evolve via LLM as new evidence arrives.
  • Human-editable markdown vault — every note is a markdown file in vault/. Edit notes directly; SHA-256 change detection syncs changes back to the knowledge graph.
  • External knowledge ingestionknowledge_ingest feeds URLs, PDFs, YouTube transcripts, and raw text into the knowledge graph as searchable semantic chunks.
  • Multi-agent namespace management — named agents get private temporal graphs. Anonymous task agents share read-only access to structured knowledge.
  • AgentProfileIngester v0.7 — watches your agent's workspace for identity files (SKILL.md, SOUL.md, AGENTS.md). On boot, extracts identity, preferences, and constraints via LLM and seeds the vault automatically. Tracks SHA-256 hashes — syncs silently when files change. Zero manual intervention.
β — the benevolence factor. Vault-derived, agent-specific.
Tier 3 · Gradient · Alignment Engine

Alignment Harness

Synchronous behavioral alignment before every response. Value coherence. Identity consistency. Constraint compliance. Content safety. Scored, corrected, and logged in real time.

The gap

Without a durable self-model, agents drift from stated constraints under adversarial prompting or long context. Static prompt files disappear after compaction. Gradient evaluates against vault-derived criteria on every response.

  • 4-dimensional synchronous evaluation — every response is evaluated across value coherence (scored 0–1), identity consistency, constraint compliance, and content safety before delivery.
  • Vault-derived alignment profile — evaluation criteria come entirely from Tier 2 vault notes. No hardcoded values. As the vault evolves, alignment evolves with it.
  • CorrectionEngine with bounded recursion — soft-flagged outputs are rewritten by LLM once, re-evaluated (without re-triggering correction), and delivered as corrected. Hard-blocked outputs are suppressed.
  • Drift detection with rolling window — tracks mean alignment scores and consecutive flags over a 20-sample window. Alert triggers at mean < 0.65 or 5 consecutive flags.
  • Inference-time only no model weight updates. No fine-tuning. No retraining. Pure runtime evaluation and correction on the critical response path.
  • GradientHoneypot v0.9 traps adversarial memory probes (credential dumps, exfil patterns). Alerts land in PostgreSQL; optional lockdown when configured.
Observe-only by default · enable blocking when calibrated
gradient · interceptor.py 9 Tools · 32 Total
gradient_status
gradient_alignment_score
gradient_drift_status
gradient_alignment_log
gradient_alert
ops_status
gradient_history
drift_status
gradient_honeypot_status v0.9
4
Eval dimensions
0.65
Drift threshold
1
Correction max
evaluation pipeline
# every response, before delivery
value_coherence      → 0.0–1.0
identity_consistency → pass|fail
constraint_compliance→ pass|block
content_safety       → always runs
─────────────────────────────────
verdict: pass | soft_flag | hard_block
Alignment at inference

Criteria come from StingerVault notes. No weight updates. Any model.

C constraints / identity from vault → pass
D observed deviation → soft_flag | hard_block
β profile depth from vault distillation
E rolling alignment score · drift window
Tier 3

Alignment without fine-tuning.

Gradient evaluates each response against the agent's own vault-derived profile. Inference-time only. No RLHF. No weight updates. Works with any model behind your MCP client.

C = constraints / identity    D = observed deviation    β = vault profile depth    E = rolling alignment score

Training-time alignment
Fine-tuning · RLHF
constitutional AI · DPO

Model-specific
expensive to redo
Encode preferred behavior into weights. Powerful, but tied to one model and one training cycle.
OpenStinger Gradient — inference
Evaluate C vs D per response
correct when D exceeds C

Real-time · drift-aware
no weight updates
Same MCP server. Any model. Profile updates as the vault learns from sessions.
E Alignment score tracked by Drift Detector rolling window · mean score
=
β Benevolence Factor Tier 2 · StingerVault vault depth = β strength
(
C Cooperation Tier 3 · Gradient pass verdicts
D Discord Tier 3 · Gradient soft_flag · hard_block
)

Memory Harness (Tier 1) stores episodic history. Reasoning Harness (Tier 2) distills that history into a structured vault profile. Alignment Harness (Tier 3) scores each response against that profile at inference time. No model weights are modified.

Get Running

Running in 3 commands.

Python 3.10+. Docker. Any OpenAI-compatible inference API.

bash
# 1. Clone and install
git clone https://github.com/srikanthbellary/openstinger.git
cd openstinger && pip install -e ".[dev]"

# 2. Configure interactively
#    prompts: LLM provider · API key · agent name · embedding provider · profile dirs
#    v0.8: select "ollama" for fully local embeddings (nomic-embed-text, mxbai-embed-large)
openstinger-cli init

# 3. Launch — FalkorDB + browser UI + Tier 1 MCP server
docker compose up -d
python -m openstinger.mcp.server

# Tier 2: vault + knowledge + namespace management
python -m openstinger.scaffold.mcp.server

# Tier 3: full alignment + empathy harness
python -m openstinger.gradient.mcp.server
Full documentation →
Architecture

Runs beside your agent.
Never inside it.

OpenStinger is a pure MCP server. Your agent calls its tools natively — no wrappers, no SDK lock-in, no framework dependency.

topology
OpenClaw · Cursor · Claude Code · Nanobot · Hermes · DeerFlow · Qwen-Agent · LangGraph · ZeroClaw · NanoClaw · PicoClaw
    └──────────────────────────────────────┬──────────────────────────────────────────────────────┘
                  Model Context Protocol  ·  SSE  ·  http://localhost:8766/sse
                            │
                            ▼
OpenStinger MCP Server  (Python process, runs on your machine)
    ├── Tier 1  memory_query · memory_wake_up · memory_search ··· 12 tools
    ├── Tier 2  vault_promote_now · knowledge_ingest · namespace_*   11 tools
    └── Tier 3  gradient_alignment_score · honeypot_status ·······  9 tools
         │                                                    ────────────────
         │                                                    32 tools total
         ├── FalkorDB    (temporal graph · knowledge vault · vector indexes)
         ├── PostgreSQL  (ingestion jobs · alignment events · agent registry)
         └── vault/      (markdown notes · human-editable · SHA-256 synced)
Production & Enterprise

The only *Claw memory system
with a queryable audit trail.

Every episode, entity, classification decision, and alignment event is logged to PostgreSQL — ready for dashboards, audits, and compliance reports. Not exported on request. Always on. Always queryable.

People & PII
SELECT name, entity_type,
  episode_count
FROM entity_registry
WHERE entity_type = 'PERSON'
ORDER BY episode_count DESC;

Who has this agent's memory touched?

Alignment Audit
SELECT verdict, COUNT(*) AS n
FROM alignment_events
WHERE evaluated_at > NOW()
  - INTERVAL '7 days'
GROUP BY verdict;

Alignment verdict distribution this week.

Knowledge Health
SELECT category,
  COUNT(*) FILTER
  (WHERE stale = false) AS active,
  ROUND(AVG(confidence),2)
FROM vault_notes GROUP BY 1;

Active knowledge confidence by category.

OpenStinger logs every ingestion job, entity merge decision, vault classification, and alignment evaluation to a 12-table PostgreSQL schema. Connect any BI tool — Metabase, Grafana, Superset — and get full operational visibility with zero additional instrumentation.

Agents need durable memory across sessions, frameworks, and model swaps.
OpenStinger is that layer: MCP-native, self-hosted, benchmarked.

Fair LongMemEval-S: 81.0%

Bi-temporal graph memory. Structured vault. Alignment evaluation.
Point any MCP client at one endpoint.

One memory layer. Every agent runtime.
OpenClaw · Cursor · Claude Code · Nanobot · Hermes · DeerFlow · Qwen-Agent · LangGraph · ZeroClaw · NanoClaw · PicoClaw

OpenStinger.com — MCP agent memory.