VOOZH about

URL: https://mcp.so/server/same---stateless-agent-memory-engine/sgx-labs

โ‡ฑ Stateless Agent Memory Engine (SAME) MCP Server


Stateless Agent Memory Engine (SAME)

@sgx-labs

Memory with integrity for AI coding agents. SAME tracks provenance, flags stale knowledge, and surfaces contradictions; so your AI trusts what's current, not what's outdated. 17 MCP tools: semantic search, cross-vault federation, session handoffs, decision logging, knowledge graph, trust-aware retrieval, consolidation, health analysis. Provenance on every write. Stale notes rank lower automatically. SQLite + vector search. Ollama, OpenAI, LM Studio, or keyword-only. One 12MB Go binary. No cloud, no API keys, no telemetry. Your notes never leave your machine. Claude Code, Cursor, Windsurf, Codex CLI, Gemini CLI, and any MCP client.
Overview

SAME โ€” Stateless Agent Memory Engine

๐Ÿ‘ License: BSL 1.1
๐Ÿ‘ Go
๐Ÿ‘ Latest Release
๐Ÿ‘ GitHub Stars
๐Ÿ‘ MCP Tools
๐Ÿ‘ Discord

Your AI forgets everything between sessions. Not anymore.

Every time you start a new session with Claude Code, Cursor, or any AI coding tool, your agent starts from zero. Decisions you made yesterday? Gone. Context from last week? Gone. That architectural choice you spent 30 minutes discussing? You'll explain it again.

SAME gives your AI persistent memory from your existing markdown notes (any folder of .md files โ€” no Obsidian required). No cloud. No API keys. One binary.

See it in 60 seconds

curl -fsSL statelessagent.com/install.sh | bash
same demo

same demo creates a temporary vault with sample notes, runs semantic search, and shows your AI answering questions from your notes โ€” all locally, no accounts, no API keys.


Quickstart

# 1. Install (pick one)
curl -fsSL statelessagent.com/install.sh | bash # direct binary
npm install -g @sgx-labs/same # or via npm
# 2. Point SAME at your project
cd ~/my-project && same init
# 3. Ask your notes a question
same ask "what did we decide about authentication?"
# 4. Your AI now remembers (hooks + MCP tools active)
# Start Claude Code, Cursor, or any MCP client โ€” context surfaces automatically

That's it. Your AI now has memory.


Add to Your AI Tool

Claude Code (hooks + MCP โ€” full experience)

same init # sets up hooks + MCP in one step

SAME installs 6 Claude Code hooks automatically. Context surfaces on every session start. Decisions extracted on stop. No config file to edit.

Claude Code / Cursor / Windsurf (MCP only)

Or add manually to your MCP config (.mcp.json, .claude/settings.json, Cursor MCP settings):

{
 "mcpServers": {
 "same": {
 "command": "npx",
 "args": ["-y", "@sgx-labs/same", "mcp", "--vault", "/absolute/path/to/your/notes"]
 }
 }
}

Replace /absolute/path/to/your/notes with the actual path to your project or notes directory. 12 tools available instantly. Works without Ollama (keyword fallback).


Why SAME

ProblemWithout SAMEWith SAME
New session startsRe-explain everythingAI picks up where you left off
"Didn't we decide to use JWT?"Re-debate for 10 minutesDecision surfaces automatically
Switch between projectsManually copy contextEach project has its own memory
Close terminal accidentallyAll context lostNext session recovers via handoff
Ask about your own notesCopy-paste into chatsame ask with source citations
Context compacted mid-taskAI restarts from scratchPinned notes + handoffs survive compaction

The Numbers

MetricValueWhat it means
Retrieval precision99.5%When SAME surfaces a note, it's almost always the right one
MRR0.949The right note surfaces first, almost every time
Coverage90.5%9 out of 10 relevant notes found
Prompt overhead<200msYou won't notice it
Binary size~10MBSmaller than most npm packages
Setup time<60 secondsOne curl command

Benchmarked against 105 ground-truth test cases. Methodology


How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Your Notes โ”‚ โ”‚ Ollama โ”‚ โ”‚ SQLite โ”‚ โ”‚ Your AI Tool โ”‚
โ”‚ (.md) โ”‚โ”€โ”€โ”€โ”€>โ”‚ (embed) โ”‚โ”€โ”€โ”€โ”€>โ”‚ (search) โ”‚โ”€โ”€โ”€โ”€>โ”‚ Claude / Cursor โ”‚
โ”‚ โ”‚ โ”‚ local โ”‚ โ”‚ + FTS5 โ”‚ โ”‚ via Hooks + MCP โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
 โ”‚ โ”‚
 โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”
 โ”‚ Ranking โ”‚ โ”‚ Write โ”‚
 โ”‚ Engine โ”‚ โ”‚ Side โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
 semantic + decisions,
 recency + handoffs,
 confidence notes

Your markdown notes are embedded locally via Ollama and stored in a SQLite database with vector search. When your AI tool starts a session, SAME surfaces relevant context automatically. Decisions get extracted. Handoffs get generated. The next session picks up where you left off. Everything stays on your machine.

No Ollama? No problem. SAME Lite runs with zero external dependencies. Keyword search via SQLite FTS5 powers all features. Install Ollama later and same reindex upgrades to semantic mode instantly.


Features

FeatureDescriptionRequires Ollama?
Semantic searchFind notes by meaning, not keywordsYes
Keyword search (FTS5)Full-text search fallbackNo
same ask (RAG)Ask questions, get cited answers from your notesYes (chat model)
Session handoffsAuto-generated continuity notesNo
Session recoveryCrash-safe โ€” next session picks up even if terminal closedNo
Decision extractionArchitectural choices remembered across sessionsNo
Pinned notesCritical context always includedNo
File claims (same claim)Advisory read/write ownership for multi-agent coordinationNo
Context surfacingRelevant notes injected into AI promptsNo*
same demoTry SAME in 60 secondsNo
same tutorial6 hands-on lessonsNo
same doctor18 diagnostic checksNo
Push protectionSafety rails for multi-agent workflowsNo
same seed installOne-command install of pre-built knowledge vaultsNo*
Cross-vault federationSearch across all vaults at onceNo*
MCP server (12 tools)Works with any MCP clientNo*
Privacy tiers_PRIVATE/ never indexed, research/ never committedNo

*Semantic mode requires Ollama; keyword fallback is automatic.


Seed Vaults

Pre-built knowledge vaults that give your AI expert-level context in one command.

same seed install claude-code-power-user
SeedNotesWhat you get
claude-code-power-user52Master-level Claude Code patterns, workflows, and tricks
ai-agent-architecture58Agent design patterns, orchestration, memory strategies
personal-productivity-os118GTD, time blocking, habit systems, review frameworks

10 seeds available โ€” 622+ notes of expert knowledge. Browse with same seed list.

Browse all seeds


MCP Tools

SAME exposes 12 tools via MCP for any compatible client.

Read

ToolWhat it does
search_notesSemantic search across your knowledge base
search_notes_filteredSearch with domain/workstream/tag/agent filters
search_across_vaultsFederated search across multiple vaults
get_noteRead full note content by path
find_similar_notesDiscover related notes by similarity
get_session_contextPinned notes + latest handoff + recent activity + git state + active claims
recent_activityRecently modified notes
reindexRe-scan and re-index the vault
index_statsIndex health and statistics

Write

ToolWhat it does
save_noteCreate or update a markdown note (auto-indexed, optional agent attribution)
save_decisionLog a structured project decision (optional agent attribution)
create_handoffWrite a session handoff for the next session (optional agent attribution)

Your AI can now write to its own memory, not just read from it. Decisions persist. Handoffs survive. Every session builds on the last.


Works With

ToolIntegrationExperience
Claude CodeHooks + MCPFull (automatic context surfacing + 12 tools)
CursorMCP12 tools for search, write, session management
WindsurfMCP12 tools for search, write, session management
ObsidianVault detectionIndexes your existing vault
LogseqVault detectionIndexes your existing vault
Any MCP clientMCP server12 tools via stdio transport

SAME works with any directory of .md files. No Obsidian required.

Use same init --mcp-only to skip Claude Code hooks and just register the MCP server.


SAME vs. Alternatives

SAMEmem0LettaBasic Memorydoobidoo
Setup1 commandpip + configDocker + PGpip + configpip + ChromaDB
Runtime depsNonePython + LLM APIDocker + PG + LLMPythonPython + ChromaDB
Offline capableFull (Lite mode)NoNoPartialYes
Cloud requiredNoDefault yesYesNoNo
TelemetryNoneDefault ONUnknownNoneNone
MCP tools124-60 (REST)7+24
Hook integrationYes (Claude Code)NoNoNoNo
Session continuityHandoffs + pins + recoverySession-scopedCore featureNoNo
Published benchmarksP=0.995, MRR=0.949Claims "26% better"NoneNoneNone
Binary size~10MB~100MB+ (Python)~500MB+ (Docker)~50MB+~80MB+
LanguageGoPythonPythonPythonPython
LicenseBSL 1.1 [1]Apache 2.0Apache 2.0MITMIT

[1] BSL 1.1: Free for personal, educational, hobby, research, and evaluation use. Converts to Apache 2.0 on 2030-02-02.


Privacy by Design

SAME creates a three-tier privacy structure:

DirectoryIndexed?Committed?Use for
Your notesYesYour choiceDocs, decisions, research
_PRIVATE/NoNoAPI keys, credentials, secrets
research/YesNoStrategy, analysis โ€” searchable but local-only

Privacy is structural โ€” filesystem-level, not policy-based. same init creates a .gitignore that enforces these boundaries automatically.

Security hardening: Path traversal blocked across all tools. Dot-directory writes blocked. Symlink escapes prevented. Error messages sanitized โ€” no internal paths leak to AI. Config files written with owner-only permissions (0o600). Ollama URL validated to localhost-only. Prompt injection patterns scanned before context injection. Push protection available for multi-agent workflows.


Install

# macOS / Linux
curl -fsSL statelessagent.com/install.sh | bash
# Or via npm (any platform โ€” downloads prebuilt binary)
npm install -g @sgx-labs/same
# Windows (PowerShell)
irm statelessagent.com/install.ps1 | iex

If blocked by execution policy, run first: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser



FAQ

Do I need Obsidian? No. Any directory of .md files works.

Do I need Ollama? Recommended, not required. Semantic search understands meaning; without Ollama, SAME falls back to keyword search (FTS5). You can also use OpenAI embeddings (SAME_EMBED_PROVIDER=openai) or any OpenAI-compatible server like llama.cpp, VLLM, or LM Studio (SAME_EMBED_PROVIDER=openai-compatible). If your embedding server goes down temporarily, SAME falls back to keywords automatically.

Does it slow down my prompts? 50-200ms. Embedding is the bottleneck โ€” search and scoring take <5ms.

Is my data sent anywhere? SAME is fully local. Context surfaced to your AI tool is sent to that tool's API as part of your conversation, same as pasting it manually.

How much disk space? 5-15MB for a few hundred notes.

What are seeds? Pre-built knowledge vaults. Install one and your AI has expert-level context immediately. same seed list to browse, same seed install <name> to install. All local, all free.

Can I use multiple vaults? Yes. same vault add work ~/work-notes && same vault default work. Search across all of them with same search --all "your query" or via the search_across_vaults MCP tool.


Community

Discord ยท GitHub Discussions ยท Report a Bug

Support

Buy me a coffee ยท GitHub Sponsors

Built with

Go ยท SQLite + sqlite-vec ยท Ollama / OpenAI

License

Source available under BSL 1.1. Free for personal, educational, hobby, research, and evaluation use. Converts to Apache 2.0 on 2030-02-02. See LICENSE.


๐Ÿ‘ Image

Server Config

{
 "mcpServers": {
 "same": {
 "command": "npx",
 "args": [
 "-y",
 "@sgx-labs/same",
 "mcp",
 "--vault",
 "/path/to/your/notes"
 ]
 }
 }
}
ยฉ 2025 MCP.so. All rights reserved.

Build with ShipAny.