Stateless Agent
Your AI forgets everything between sessions. SAME fixes that. Local-first, no API keys, single binary.
What is Stateless Agent?
Stateless Agent is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to your ai forgets everything between sessions. same fixes that. local-first, no api keys, single binary.
Your AI forgets everything between sessions. SAME fixes that. Local-first, no API keys, single binary.
This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Your AI forgets everything between sessions. SAME fixes that
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx statelessagentConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Stateless Agent
SAME (Stateless Agent Memory Engine) is a local-first, privacy-preserving MCP server that gives AI coding assistants persistent memory between sessions. Distributed as a single Go binary, it stores notes, decisions, and session handoffs in a local vault using SQLite and optional semantic embeddings, then surfaces relevant context automatically at the start of each new session. Developers using Claude Code, Cursor, or other AI assistants use SAME to ensure the AI retains architectural decisions, team conventions, and project context without relying on cloud storage or external APIs.
Prerequisites
- macOS, Linux, or Windows operating system
- No external runtime required — SAME is a single self-contained binary
- Optional: Ollama running locally for offline semantic search (e.g., with nomic-embed-text model)
- Optional: OpenAI API key if using OpenAI embeddings instead of Ollama
- An MCP-compatible client such as Claude Code or Cursor
Install the SAME binary
Choose the installation method for your platform. The curl installer is fastest for macOS/Linux; npm works on all platforms.
# macOS/Linux:
curl -fsSL https://statelessagent.com/install.sh | bash
# All platforms via npm:
npm install -g @sgx-labs/same
# Windows (PowerShell):
irm https://statelessagent.com/install.ps1 | iexInitialize SAME in your project
Navigate to your project directory and run same init. This generates a .same/config.toml file with sensible defaults including vault path, embedding provider, and memory budget settings.
cd ~/my-project
same initConfigure your embedding provider (optional)
Edit .same/config.toml to choose your embedding backend. Ollama with nomic-embed-text works fully offline; OpenAI text-embedding-3-small requires an API key. Setting provider to 'none' falls back to keyword search.
[vault]
path = "/home/user/notes"
handoff_dir = "sessions"
decision_log = "decisions.md"
[embedding]
provider = "ollama"
model = "nomic-embed-text"
[memory]
max_token_budget = 800
max_results = 2Add SAME to your MCP client configuration
Register the SAME MCP server in your AI client's configuration file. SAME exposes 19 tools including search_notes, save_note, save_decision, create_handoff, get_session_context, and mem_brief.
{
"mcpServers": {
"same": {
"command": "same",
"args": ["serve"],
"env": {
"SAME_VAULT_PATH": "/Users/me/my-project/.same"
}
}
}
}Verify health and status
Run the status and doctor commands to confirm the vault, embedding index, and MCP server are all healthy before your first session.
same status
same doctorSave your first decision
Store an architectural decision so SAME can surface it in future sessions. Decisions are logged with timestamp and optional tags for easy retrieval.
same search "authentication"
# Or let the AI save decisions through the MCP tools during a sessionStateless Agent Examples
Client configuration
Add this to claude_desktop_config.json or your Claude Code MCP configuration to enable persistent memory.
{
"mcpServers": {
"same": {
"command": "same",
"args": ["serve"],
"env": {
"SAME_VAULT_PATH": "/Users/me/my-project/.same"
}
}
}
}Prompts to try
After connecting SAME to your AI client, use these prompts to build and retrieve persistent context.
- "Remember this decision: we use JWT for stateless auth, not server-side sessions. Tag it as auth, architecture."
- "What did we decide about the database schema for the users table?"
- "Create a session handoff summarizing what we accomplished today"
- "Search my notes for anything related to rate limiting"
- "Give me a briefing to get me up to speed on this project before we start coding"Troubleshooting Stateless Agent
Semantic search returns no results even after saving notes
Run `same reindex` to rebuild the embedding index after adding notes via the CLI. If using Ollama, confirm it is running and the nomic-embed-text model is pulled: `ollama pull nomic-embed-text`. If Ollama is not available, set provider = 'none' in config.toml to fall back to keyword search.
MCP client cannot find the 'same' command
Ensure the binary is on your PATH by verifying `which same` returns a path. If installed via npm with -g, check that npm's global bin directory is in your PATH. You may need to use the full path in the MCP config command field, e.g., /usr/local/bin/same.
SAME vault accumulates too much context and token budget is exceeded
Adjust max_token_budget and max_results in .same/config.toml to lower values. Use `same mem_consolidate` to merge related notes via LLM and reduce vault size. You can also run `same mem_health` to audit trust levels and prune low-value notes.
Frequently Asked Questions about Stateless Agent
What is Stateless Agent?
Stateless Agent is a Model Context Protocol (MCP) server that your ai forgets everything between sessions. same fixes that. local-first, no api keys, single binary. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Stateless Agent?
Follow the installation instructions on the Stateless Agent GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Stateless Agent?
Stateless Agent works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Stateless Agent free to use?
Yes, Stateless Agent is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
Stateless Agent Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Stateless Agent? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Stateless Agent in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Stateless Agent?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.