roampal-core
About
Persistent memory for Claude Code with outcome-based learning. Tracks what helped vs failed, auto-injects context via hooks.
Details
- Author
- roampal-ai
- Categories
- Productivity, Other, AI
Jump to
Setup
Install roampal-core in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/roampal-ai/roampal-core
Follow the installation instructions in the repository README, then restart your MCP client.
Outcome-Based Persistent Memory MCP Server
Two commands. Your AI coding assistant gets outcome-based memory.
Works withClaude CodeandOpenCode.
85.8% on the corrected LoCoMo benchmark(non-adversarial, end-to-end answer accuracy) — validated on 1,986 questions across 10 conversations with dual grading. All figures in this section are sourced from the paper androampal-labs(see citations at the bottom of this section).
Benchmark pipeline runs on a single GPU with no cloud dependencies. Roampal itself runs on CPU — no GPU required. Full methodology, data, and evaluation scripts:roampal-labs
Paper:"Beyond Ingestion: What Conversational Memory Learning Reveals on a Corrected LoCoMo Benchmark"(Logan Teague, April 2026)
Auto-detects installed tools. Restart your editor and start chatting.
Target a specific tool:roampal init --claude-codeorroampal init --opencode
The core loop is identical — both platforms inject context, capture exchanges, and score outcomes. The delivery mechanism differs:
Claude Code prompts the main LLM to score each exchange via thescore_memoriestool. OpenCode never self-scores — an independent sidecar (a separate API call) reviews each exchange as a third party, removing self-assessment bias. Thescore_memoriestool is not registered on OpenCode. Scoring is disabled by default until you explicitly configure it viaroampal sidecar setup. During setup, Roampal detects local models (Ollama, LM Studio, etc.) and lets you choose a scoring model. Zen free models are available as an explicit opt-in choice for users without a local model or API key — they route through OpenCode's proxy which may log data. A cheap or local model works great — scoring doesn't need a powerful model.
v0.5.8:Crash-resilience release — enables SQLite WAL + FULL durability on the ChromaDB catalog so hard terminations (Windows port conflicts, external process kills, power loss) no longer corrupt or empty the database. RewritesSessionManager.mark_scored()to perform an atomic temp-file replace, guaranteeing the JSONL transcript survives a crash mid-write. Also ships 16 new automated tests covering both fixes, fixes pre-existing test debt that left the full suite red on Windows, and adds dev tooling (pytest-timeout,pytest-forked,build,twine). No data migration required; WAL is applied on the next server start.
v0.5.7:Startup garbage collection for the MCP hook's_completion_state.json. The file accumulated one entry perconversation_idever seen with no cleanup, driving I/O amplification on every write and leaving stuckscored_this_turn=Trueflags that could poison the cross-session scoring fallback. New_cleanup_completion_statepass drops entries older than 30 days or with no matching transcript, enforces a 500-entry hard ceiling, and writes atomically. JSONL transcript TTL bumped 7 → 30 days to stay in lockstep with the state-file TTL. Ships paired with Roampal Desktop v0.3.3.
v0.5.6:Hardening release — closes remaining coverage gaps from the v0.5.5.x verification audit. Phantom sweep after archived cleanup, auto-cleanup under capacity pressure, dedup observability, hardened delete permissions, archive-then-add cycle tests, sidecar prompt alignment with benchmark, async scoring queue (per-session deferred retry), MCP tool definition quality rewrite (TDQS), OpenCode Go auto-detect in sidecar setup wizard, and user name extraction fix.
v0.5.5.2:Hotfix — Windows plugin install now verifies copy succeeded (post-copy size check + manual read/write fallback for OneDrive/antivirus interference). Also installs to%APPDATA%\opencode\pluginsas fallback since some Electron apps resolve config paths differently on Windows. Fixes remaining cases of issue #11 whereroampal init --forcereported success but the plugin was empty or in the wrong directory.
v0.5.5.1:Hotfix — OpenCode Desktop now correctly switches profiles when you switch projects in the UI (issue #10). Plugin reads the active session'sdirectoryviaclient.session.get()instead of caching the profile at module load, so a singleton plugin across a multi-project workspace still hits the right profile per message. Also:roampal init --forceactually overwrites the OpenCode plugin file now (issue #11), with clearer errors when Desktop holds a file lock.
v0.5.5:Soft-delete for memory_bank — ChromaDB hard delete doesn't actually remove vectors from HNSW, causing phantom dedup matches that block new memories after GUI deletion. Replaced withstatus=archivedmetadata update plus status filter on all query/dedup paths. Also: scoring mutex → async queue (eliminates dropped requests), sidecar summary contamination fix (delimiter fencing).
v0.5.4:Profile binding is now per-request, not per-process. Every client (MCP server, OpenCode plugin, Python hooks for Claude Code / Cursor) sends anX-Roampal-Profileheader so a single FastAPI server can cleanly serve multiple profiles simultaneously. Fixes issue #7 where OpenCode Desktop's per-projectROAMPAL_PROFILEinopencode.jsonwas ignored because the singleton FastAPI bound the profile once at startup.
v0.5.3:Sidecar scoring now requires explicit configuration (no automatic fallback to Zen or localhost). Small local models (qwen2.5:3b, etc.) that return bare JSON arrays instead of OpenAI-shaped responses are handled transparently via server-side shape tolerance.
When you type a message, Roampal automatically injects relevant context before your AI sees it:
═══ KNOWN CONTEXT ═══ • JWT refresh pattern fixed auth loop [id:patterns_a1b2] (3d, 90% proven, patterns) • User prefers: never stage git changes [id:mb_c3d4] (memory_bank) ═══ END CONTEXT ═══ fix the auth bug
No manual calls. No workflow changes. It just works.
- You typea message
- Roampal injectsrelevant context automatically (hooks in Claude Code, plugin in OpenCode)
- AI respondswith full awareness of your history, preferences, and what worked before
- Outcome scored— good advice gets promoted, bad advice gets demoted
- Repeat— the system gets smarter every exchange
roampal init # Auto-detect and configure installed tools roampal init --claude-code # Configure Claude Code explicitly roampal init --opencode # Configure OpenCode explicitly roampal init --no-input # Non-interactive setup (CI/scripts) roampal start # Start the HTTP server manually roampal stop # Stop the HTTP server roampal status # Check if server is running roampal status --json # Machine-readable status (for scripting) roampal stats # View memory statistics roampal stats --json # Machine-readable statistics (for scripting) roampal doctor # Diagnose installation issues roampal summarize # Summarize long memories (retroactive cleanup) roampal score # Score the last exchange (manual/testing) roampal context # Output recent exchange context roampal ingest <file> # Add documents to books collection roampal books # List all ingested books roampal remove <title> # Remove a book by title roampal sidecar status # Check scoring model configuration (OpenCode) roampal sidecar setup # Configure scoring model (OpenCode) roampal sidecar test # Test scoring model response format (OpenCode) roampal retag # Re-extract tags on memories using sidecar LLM roampal sidecar disable # Disable scoring (removes config, retrieval still works) # Sidecar scope flags (v0.5.3+) — OpenCode merges project-local over user-global config: roampal sidecar setup --scope user # Write only to user-global config (~/.config/opencode/) roampal sidecar setup --scope project # Write only to project-local opencode.json in cwd ancestry roampal sidecar setup # Auto-detects: uses project-local if shadow exists, otherwise user-global # Sidecar scope flags for disable (v0.5.3+): roampal sidecar disable --scope user # Clear only from user-global config roampal sidecar disable --scope project # Clear only from project-local opencode.json roampal sidecar disable # Auto-detects scope same as setup # Named memory profiles (v0.5.1) — isolate memory per project, per client, etc. roampal profile list # List registered profiles roampal profile show # Show active profile and its path roampal profile create <name> # Create auto-located profile roampal profile register <name> --path <dir> # Register an existing directory roampal profile use <name> # Persist as user-global default roampal profile unuse # Clear persistence roampal profile switch <name> # Persist + kill running server roampal profile delete <name> # Remove from registry roampal start --profile <name> # One-off launch on a profile
Run separate memory stores for different contexts — per project, per client (Claude Code vs OpenCode), work vs home. Profiles are managed entirely through the CLI; no config files to hand-edit.
roampal profile create work # auto-located at <appdata>/Roampal/data/work/ roampal profile switch work # persist + kill running server # next MCP tool call spawns a fresh server on 'work'
Register an existing directory as a profile (no data migration):
roampal profile register project-a --path /existing/custom/path
- --profile <name>flag
- ROAMPAL_PROFILE=<name>env var (set per-project inopencode.jsonor.claude.jsonenv: {})
- roampal profile use <name>persisted default
- "default"fallback
How scoring works:Claude Code's hooks prompt the main LLM to callscore_memoriesevery turn. OpenCode uses an independent sidecar that scores silently in the background — the model never sees a scoring prompt andscore_memoriesis not registered as a tool. If the sidecar is unavailable, a warning prompts the user to runroampal sidecar setup. Choose your scoring model duringroampal initor viaroampal sidecar setup.
┌─────────────────────────────────────────────────────────┐ │ pip install roampal && roampal init │ │ Claude Code: hooks + MCP → ~/.claude/ │ │ OpenCode: plugin + MCP → ~/.config/opencode/ │ └─────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────┐ │ HTTP Hook Server (port 27182) │ │ Auto-started on first use, self-heals on failure │ │ Manual control: roampal start / roampal stop │ └─────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────┐ │ User types message │ │ → Hook/plugin calls HTTP server for context │ │ → AI sees relevant memories, responds │ │ → Exchange stored, scored (hooks or sidecar) │ └─────────────────────────────────────────────────────────┘ │ ▼ ┌─────────────────────────────────────────────────────────┐ │ Single-Writer Backend │ │ FastAPI → UnifiedMemorySystem → ChromaDB │ │ All clients share one server, isolated by session │ └─────────────────────────────────────────────────────────┘
Seedev/docs/for full technical details.
- Python 3.10+
- One of:Claude CodeorOpenCode
- Platforms:Windows, macOS, Linux (primarily developed and tested on Windows)
- RAM:~800MB available (cross-encoder reranker + embeddings + ChromaDB)
- Disk:~500MB for models (multilingual embedding + reranker, downloaded automatically on first use)
- CPU:Any modern x86-64 processor with AVX2 (Intel Haswell 2013+ / AMD Excavator 2015+)
- GPU:Not required — all inference runs on CPU via ONNX Runtime
- Restart Claude Code (hooks load on startup)
- Check HTTP server:curl http://127.0.0.1:27182/api/health
- Verify~/.claude.jsonhas theroampal-coreMCP entry with correct Python path
- Check Claude Code output panel for MCP errors
- Make sure you ranroampal init --opencode
- Check that the server auto-started:curl http://127.0.0.1:27182/api/health
- If not, start it manually:roampal start
This is expected. Roampal has self-healing -- if the HTTP server stops responding, it is automatically restarted and retried.
Still stuck?Ask your AI for help — it can read logs and debug Roampal issues directly.
Roampal Core is completely free and open source.
- Support development:roampal.gumroad.com
- Feature ideas & feedback:Discord
- Bug reports:GitHub Issues
- Need help with AI memory? Reach out:roampal@protonmail.com|LinkedIn
Persistent memory for any AI assistant. Zero token cost until recall. Stores memories in local SQLite, ranks by 6-factor scoring, returns results 79% smaller than JSON. Works with Claude, ChatGPT, Grok, Cursor, Windsurf, and any MCP client.
After Effects MCP is a full-featured automation bridge that connects AI clients (like VS Code, Claude Desktop, and Claude Code) to Adobe After Effects through MCP, enabling scripted control of compositions, layers, effects, keyframes/graph easing, presets, markers, audio levels, waveform analysis, and effect discovery via a live bridge panel.
Project management your AI can actually run — connect Claude, ChatGPT, Cursor & Codex to one board over MCP.
AIOProductOS spine over MCP — customers, revenue, feedback, work, analytics on one typed record.
The memory layer for AI coding tools. Local-first, semantic, 9 MCP tools with consolidation and project scoping. Works with Claude Code, Cursor, Windsurf & any MCP client.
One MCP server for Claude, ChatGPT & Gemini — wraps your ERPs, CRMs, APIs and knowledge base into a single governed endpoint.
Run your field service business from Claude: answer calls, book and dispatch jobs, build estimates, chase invoices. Built for HVAC, plumbing, electrical, roofing and pest control.
Complete Swiss accounting integration for Bexio via MCP. Works with Claude Desktop, n8n, and any MCP client. 221 tools for invoices, contacts, projects & more.
Persistent memory MCP server for Claude Desktop — remembers context, time, and topics across sessions
An MCP extension for the Claude Desktop application that enables automation and integration.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





