Stateless Agent

v1.0.0Knowledge & Memorystable

Your AI forgets everything between sessions. SAME fixes that. Local-first, no API keys, single binary.

ai-agentai-memoryclaude-codecontext-surfacingcursor
Share:
17
Stars
0
Downloads
0
Weekly
0/5

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

Provide persistent memory between AI assistant sessions without cloud storage.
Surface relevant context automatically from local history.
Work offline with full privacy using local-first architecture.
sgx-labs

Maintainer

LicenseNOASSERTION
Languagego
Versionv1.0.0
UpdatedMay 10, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx statelessagent

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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 | iex
2

Initialize 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 init
3

Configure 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 = 2
4

Add 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"
      }
    }
  }
}
5

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 doctor
6

Save 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 session

Stateless 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.

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.

Quick Config Preview

{ "mcpServers": { "statelessagent": { "command": "npx", "args": ["-y", "statelessagent"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides