SAME — Claude Code MCP server: memory and setup
SAME gives AI coding agents persistent project context in local storage. Use it when sessions need to retain decisions and handoffs.
claude mcp add same -e VAULT_PATH=<VAULT_PATH> -- npx -y @sgx-labs/sameWhat SAME - Stateless Agent Memory Engine does
SAME indexes a project’s Markdown notes, stores them in SQLite, and exposes relevant context through MCP. It records decisions and task handoffs, while same init configures hooks and MCP tools for the project.
Search works locally with SQLite FTS5 and keywords. Ollama can add semantic search after same reindex, but the server also runs without it. SAME can flag stale notes, scan for PII, and protect files when several agents work on the same codebase. Without Ollama, retrieval uses keyword matching.
What it helps with
- retain agent decisions across sessions
- retrieve context from Markdown notes
- restore handoffs for the next session
- flag stale knowledge in the vault
- scan notes for PII before git pushes
Example prompts for the agent
- Remember that this project uses JWT for authentication and save the decision.
- What did we decide about authentication? Search the project memory.
- Create a handoff for the next session with the unfinished tasks.
How to install SAME - Stateless Agent Memory Engine
Platform CLI
claude mcp add same -e VAULT_PATH=<VAULT_PATH> -- npx -y @sgx-labs/sameReplace <…> with your own values
Platform CLI
codex mcp add same-stateless-agent-memory-engine --env VAULT_PATH=<VAULT_PATH> -- npx -y @sgx-labs/sameReplace <…> with your own values
Config file
{
"mcpServers": {
"same-stateless-agent-memory-engine": {
"command": "npx",
"args": [
"-y",
"@sgx-labs/same"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"same-stateless-agent-memory-engine": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sgx-labs/same"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e VAULT_PATH=<VAULT_PATH> same-stateless-agent-memory-engine npx -y @sgx-labs/sameReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about SAME - Stateless Agent Memory Engine
How do I install SAME in Claude Code?
Run claude mcp add same -e VAULT_PATH=<VAULT_PATH> -- npx -y @sgx-labs/same.
What does SAME do?
This MCP server indexes Markdown notes, keeps decisions and handoffs, and supplies relevant project context across sessions. Data stays in a local SQLite store.
Does SAME require Ollama?
No. It can use local SQLite FTS5 keyword search on its own. Ollama adds semantic retrieval when you run same reindex.