Forever Brain MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Forever Brain MCP
Local-first, encrypted, source-attributed, bi-temporal memory for AI agents.
Built with FastMCP for POSIX hosts. Verified host: Hermes Agent 0.23.3 on macOS. Other stdio clients below are example configurations.
Why Forever Brain (Instead of Markdown Files or Vector RAG)?
Capability | Plain Markdown | Typical Vector RAG | Forever Brain MCP |
Encrypted at rest locally | No | Cloud-hosted / plaintext | AES-256-GCM ( |
Corrections without stale ghosts | Manual edits | Returns old & new together | Non-destructive |
Bi-temporal truth (when true vs. when learned) | No | Rarely | Stores both timestamps. |
Source attribution & trust tiers | Informal | Usually lost | Required |
Full revision lineage | Git only | No |
|
Bounded startup budget | Manual | Top-K noise |
|
Related MCP server: Cortex
60-Second Quickstart
1. Install
In a Python 3.11+ virtual environment on a POSIX host, run:
git clone https://github.com/NextArkDAO/forever-brain-mcp.git
cd forever-brain-mcp
pip install -e .To run the test suite from the repository root:
pip install -e '.[dev]'
python -m pytest -qTry point-in-time recall
This example calls the MCP tools in a temporary vault. It uses the first write’s returned recorded_at as the historical cutoff.
FOREVER_BRAIN_DIR="$(mktemp -d)" python - <<'PYTHON'
import asyncio
from fastmcp import Client
from forever_brain_mcp.server import mcp
async def demo():
async with Client(mcp) as client:
saved = await client.call_tool("brain_remember", {
"record_id": "demo.room.v1", "topic": "demo.room",
"text": "Meet in Room A.", "source": "fictional invitation",
})
cutoff = saved.data["record"]["recorded_at"]
await asyncio.sleep(1.1) # The vault records timestamps to the second.
await client.call_tool("brain_correct", {
"old_record_id": "demo.room.v1", "new_record_id": "demo.room.v2",
"text": "Meet in Room B.", "source": "fictional update",
})
for label, filters in [("As of first write", {"as_of": cutoff}), ("Now", {})]:
result = await client.call_tool("brain_recall", {"query": "room", **filters})
print(label, result.data["records"][0]["text"], sep=": ")
asyncio.run(demo())
PYTHONExpected output:
As of first write: Meet in Room A.
Now: Meet in Room B.2. Wire into Hermes Agent (~/.hermes/config.yaml)
mcp_servers:
forever-brain:
command: forever-brain-mcp
env:
FOREVER_BRAIN_DIR: ~/.forever-brain/vaultRestart Hermes, and your agent immediately gets brain_startup, brain_remember, brain_correct, brain_recall, brain_trace, and brain_health.
3. Or Install into Claude Code / Claude Desktop / Cursor
fastmcp install claude-code src/forever_brain_mcp/server.py:mcp
fastmcp install claude-desktop src/forever_brain_mcp/server.py:mcp
fastmcp install cursor src/forever_brain_mcp/server.py:mcp -e .4. Local Validation (Hermes FastMCP Quality Bar)
fastmcp inspect src/forever_brain_mcp/server.py:mcp
fastmcp list src/forever_brain_mcp/server.py --json
fastmcp call src/forever_brain_mcp/server.py brain_health --jsonTools, Resources & Prompts
Surface | Name | Purpose |
Tool |
| Bounded session-start context (identity, principles, decisions, preferences, focus). |
Tool |
| Save an encrypted, source-attributed, bi-temporal record (idempotent on |
Tool |
| Non-destructively supersede an outdated record while preserving full history. |
Tool |
| Search active truth by default; optional |
Tool |
| Trace full revision chain from original record to current truth. |
Tool |
| Verify encryption, capacity pressure, record counts, and vault SHA-256. |
Resource |
| Read-only vault health summary. |
Resource |
| 10 most recent active records. |
Prompt |
| Reusable end-of-session memory hygiene template. |
Environment Variables
Variable | Default | Description |
|
| Private ( |
|
| Base64 encoding of 32 random bytes in an owner-private file. The default key is generated for a new vault. Provision any external key in advance. |
| (unset) | Optional passphrase (PBKDF2-HMAC-SHA256, 200k iterations) instead of a keyfile. |
Recovery and local access
For keyfile mode, back up the ciphertext and its original key. Anyone holding both can decrypt the vault. For passphrase mode, retain the ciphertext, original vault.salt and the passphrase. Restore into a dedicated directory owned by the current user (0700), with owner-private files (0600). Back up a consistent snapshot while the server is stopped.
The supported transport is stdio for a trusted local client on POSIX. Every connected client can read and change the entire selected vault. Use a separate vault per trust boundary. Source and trust labels are supplied by the client. Corrections inherit the old trust label unless explicitly set. Keep untrusted inputs attributed as such. A third-party HTTP wrapper is outside the supported configuration.
A correction records its effective date in event_at. The as_of query shows the history the vault knew by the specified recorded time. A future effective date does not defer a saved correction. Set explicit event_at when effective time matters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Cross-session memory for AI agents with a Source Receipt for every memory, over MCP.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
MCP-native Trust Infrastructure for AI Agents. Persistent encrypted memory with Trust Quotient.
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
Related MCP Servers
- AlicenseCqualityBmaintenanceProvides persistent, local-first AI memory across sessions via MCP tools for storing, searching, and retrieving context from past interactions.3175 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceLocal-first AI memory layer with hybrid retrieval and brain-inspired namespaces. Enables agents to save, search, and manage memories directly via MCP tools.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store, search, assemble, and manage local-first memories through seven MCP tools, including conversation turns, feedback, status, and dashboard access without cloud dependencies.AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceProvides AI agents with persistent local memory management, including semantic recall, knowledge graph traversal, and automatic memory consolidation, enabling structured long-term memory across MCP clients.Apache 2.0