Back to Browse

Ariel Memory MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Two-layer memory MCP server for AI agents with 37 tools, RAG, graphs, wiki, auth

About

Two-layer memory MCP server for AI agents with 37 tools, RAG, graphs, wiki, auth

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (1 strong, 4 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

4 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

network_websocket

Check that this permission is expected for this type of plugin.

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-cipher208-ariel-memory": {
      "args": [
        "-y",
        "mcp-ariel-memory"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

mcp-ariel-memory

Give your AI agents real memory — episodic recall, knowledge graphs, hybrid search, and envelope encryption in a single MCP server. 19 tools. 4-layer hierarchy. 250+ tests.

CI codecov License: MIT Python 3.10+ Ruff MCP Compatible Docs Release


About

mcp-ariel-memory is a production-ready MCP (Model Context Protocol) server that provides persistent, searchable memory for AI agents. It implements a two-layer architecture:

  • Layer 1 (User) — stores facts about users: preferences, conversation history, emotional context, relationships
  • Layer 2 (Agent) — stores agent identity: decisions, errors, personality evolution, learning patterns

The server is built with the official MCP Python SDK (FastMCP), supports both stdio and HTTP transports, and includes enterprise features like authentication, rate limiting, automatic backups, and a real-time dashboard.

Architecture

graph TD
    A[LLM Agent] -->|MCP Protocol| B[mcp_server]
    B --> C{ImportanceGate}
    C -->|score > 0.3| D[L1: ReflexBuffer]
    C -->|score ≤ 0.3| E[Filtered Out]
    D --> F[L2: SessionStore]
    F --> G{EmotionTrigger?}
    G -->|high emotion| H[L3: EpisodicMemory]
    G -->|normal| I[Consolidation]
    H --> J[L4: CoreMemory]
    I --> J

    B --> K[RAG Engine]
    K --> L[FTS5 Search]
    K --> M[MIB Binary Search]
    K --> N[Hybrid Scoring]

    B --> O[Wiki System]
    O --> P[.md Files]
    O --> Q[SQLite Index]

    B --> R[Knowledge Graphs]
    R --> S[Epistemic Graph]
    R --> T[Temporal Graph]

Why mcp-ariel-memory?

Featuremcp-ariel-memoryTypical Memory
Memory hierarchyL1→L2→L3→L4 (4 layers)Flat key-value store
Adaptive ThresholdDynamic EMA-based noise filteringStatic threshold
Hybrid searchFTS5 + binary embeddings + RRFFTS or vector only
ITS scoringNovelty + relevance via document frequencyNone
Knowledge graphsEpistemic + TemporalNone
Typed memory13 categories with per-type retentionNone
Two layersUser (about people) + Agent (self-knowledge)User only
Wiki14 types, .md files as source of truth, FTS5None
Auto-CompactionPeriodic archiving of low-importance itemsNone
Encryptionlibsodium secretbox (keychain-first)Usually none
MetricsReal-time Prometheus exporter (port 9120)None
Tests250 (79 property-based/logic/chaos)
DashboardReal-time HTML dashboard

Who needs this?

  • AI agent developers — give your agent memory that persists across sessions
  • Multi-agent systems — one database, isolated tables, shared memory on demand
  • Anyone tired of "forget context every request" — mcp-ariel-memory remembers for you
  • Data-conscious teams — everything local, no cloud dependency

Installation

Option 1: npm (recommended for MCP clients)

npx mcp-ariel-memory --transport stdio

Requires Python 3.10+ on the system. The npm wrapper automatically installs the Python package.

Option 2: pip

pip install git+https://github.com/Cipher208/mcp-ariel-memory.git
python -m mcp_server --transport stdio

Option 3: Docker

docker build -t ariel-memory .
docker run -p 8000:8000 ariel-memory

Option 4: From source

git clone https://github.com/Cipher208/mcp-ariel-memory.git
cd mcp-ariel-memory
pip install -e ".[all]"
python -m mcp_server.server --transport stdio

Monitoring & Maintenance

mcp-ariel-memory includes built-in tools for keeping the system healthy:

  • Prometheus Metrics — The server exports real-time metrics on port 9120. Monitor search latency, operation counts, and memory growth.
  • Memory Auto-Compaction — Automatically archives old memories with low importance scores to keep the context window efficient.
  • Adaptive Threshold (EMA) — The importance filter dynamically adjusts to your conversation style, ensuring only high-signal data reaches long-term storage.
  • Alembic Migrations — Versioned database schema management for reliable updates.

Quick Start

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "ariel-memory": {
      "command": "npx",
      "args": ["mcp-ariel-memory", "--transport", "stdio"]
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "ariel-memory": {
      "command": "docker",
      "args": ["run", "--rm", "-i", "ariel-memory", "--transport", "stdio"]
    }
  }
}

Hermes Agent

Add to Hermes config (YAML format):

mcpServers:
  ariel-memory:
    command: npx
    args:
      - mcp-ariel-memory
      - --transport
      - stdio

HTTP Server

# Start HTTP server (no auth required for MCP endpoint)
python -m mcp_server.server --transport http --port 8000

# With dashboard (disabled by default)
python -m mcp_server.server --transport http --port 8000 --dashboard

# Development mode (no auth at all)
python -m mcp_server.server --transport http --port 8000 --no-auth

# Or with Docker
docker run -p 8000:8000 ariel-memory --transport http --port 8000

docker-compose

docker-compose up

Platform Support

PlatformMethodNotes
Windowsnpm / pip / Dockeraiosqlite fallback (sync sqlite3 + to_thread)
Linuxnpm / pip / Dockeraiosqlite (native async)
macOSnpm / pip / Dockeraiosqlite (native async)
DockerAnyWorks on all platforms with Docker

Database Schema (21 tables)

Single memory.db file — no external database required.

TableModulePurpose
core_memorycore/memory.pyL4 key-value facts
sessionscore/session.pyL2 session history
episodescore/episodic.pyL3 episodic memories
staging_memoriesshared/dream_buffer.pyTemporary staging
archived_memoriesshared/archived_memories.pyArchived memories
audit_logfeatures/audit_trail.pyAudit trail
`rate_limits"features/rate_limiting.pyRate limiting
embedding_cacheshared/embeddings.pyCached embeddings
rag_pagesrag/engine.pyRAG document pages
rag_chunksrag/engine.pyRAG document chunks
rag_relationsrag/engine.pyRAG relations
epi_nodesgraph/epistemic.pyEpistemic graph nodes
epi_edgesgraph/epistemic.pyEpistemic graph edges
temporal_eventsgraph/temporal.pyTemporal events
temporal_linksgraph/temporal.pyTemporal links
user_wikiwiki/models.pyUser wiki entries
agent_wikiwiki/models.pyAgent wiki entries
wiki_indexwiki/index.pyWiki FTS5 index
memory_conflictsrag/conflict.pyMemory conflicts
migration_logshared/migrations.pyMigration history

Features

FeatureDescription
19 MCP ToolsLayer tools (11): remember, recall, forget, session, episode, graph, stats, context. Ops tools (8): api_key, backup, saga, data, replica, cleanup, purge, search
Two-Layer MemoryL1 ReflexBuffer → L2 SessionStore → L3 EpisodicMemory → L4 CoreMemory
Envelope Encryptionlibsodium secretbox (AES-256-GCM) for API keys, tokens, saga state
Unified Search APISingle search() method with 4 strategies: fts, mib, hybrid, auto
MultiSourceRAGUnified search across RAG + Wiki with deduplication and reranking
ITS ScoringNovelty component using document frequency as prior for better ranking
Supervised ThresholdsPer-dimension MIB thresholds trained on labeled data (+10-15% recall)
Knowledge GraphEpistemic graph (facts, decisions) + Temporal graph (timeline)
Wiki System14 types (7 user + 7 agent), .md files as source of truth, FTS5 index
24 Hooks12 user hooks + 12 agent hooks, integrated into tool pipeline
Saga PatternMulti-step operations with compensation, timeout, watchdog
DashboardHTML dashboard with stats, facts, episodes, audit log
AuthAPI keys + Bearer tokens, encrypted at rest
Rate LimitingPer-user limits on write operations (100 req/min default)
BackupAuto-backups with jitter, restore, cleanup
MetricsPrometheus-compatible metrics endpoint
Read-Only ReplicaSQLite read-only replica for queries
EmbeddingsMultilingual (100+ languages including Russian)

Architecture

Memory Hierarchy

Message → L1 (ReflexBuffer, ring buffer, 50 items)
         → ImportanceGate (noise filter, threshold 0.3)
         → L2 (SessionStore, SQLite, 100 sessions)
         → EmotionTrigger (emotional analysis)
         → L3 (EpisodicMemory, SQLite, 1000 episodes)
         → L4 (CoreMemory, key-value, 5000 facts)

Secret Resolution Order

1. OS keychain (keyring library) — recommended for production
2. .env file (MCP_MASTER_KEY=...)
3. config.yaml (crypto.master_key_hex)
4. Environment variable (MCP_MASTER_KEY)

Search Strategies

StrategyDescriptionWhen to Use
ftsFull-text search via FTS5 with LIKE fallbackShort queries (<3 words), keyword-heavy
mibBinary embedding similarity (Hamming distance)Semantic similarity, concept-based
hybridCombines FTS5 + MIB with Scorer rankingGeneral-purpose, best recall
autoAutomatically selects fts for short queries, hybrid for longerDefault for most use cases

Documentation

Full documentation with API reference, architecture diagrams, and guides:

Read the Docs →

TopicLink
ArchitectureOverview
MCP ToolsReference
ConfigurationGuide
API ReferenceSecrets, Importance

Testing

# Run all tests (250 passed, 39 property-based)
pytest tests/ -v

# Run with parallel execution
pytest tests/ -v -n auto

# Run only integration tests
pytest tests/test_integration.py -v

# Run with coverage
pytest tests/ --cov=. --cov-report=term-missing

# Run performance benchmark
python -m tests.benchmark_perf

Benchmark

OperationSpeedNotes
memory_remember1533 ops/sSQLite + encryption
memory_recall6739 q/sFTS5 search
encrypt+decrypt402 ops/sargon2id KDF
fts_search1817 ops/sFTS5 full-text search
mib_search215 ops/sBinary embedding search (batched)
hybrid_search178 ops/sFTS5 + MIB combined
epi_tags_join1850 ops/sTag lookup via epi_tags table
rag_chunks_join3537 ops/srag_chunks + rag_pages JOIN

Configuration

# config.yaml (optional, mounted as volume)
layers: { user: { enabled: true }, agent: { enabled: true } }
limits: { l1_buffer_size: 50, l4_core_limit: 5000 }
hooks: { user: { message_received: true }, agent: { error_occurred: true } }
forgetting: { decay_rate: 0.01, archive_threshold_days: 90 }
rag: { fts_enabled: true, vec_enabled: true }
embeddings: { model: "BAAI/bge-small-en-v1.5" }
wiki:
  user: { diary: true, external_dirs: ["/path/to/notes"] }
  agent: { decision_log: true, external_dirs: ["/path/to/lore"] }
auth: { api_keys_enabled: true, bearer_token_enabled: true }
backup: { auto_backup: true, backup_interval_hours: 24 }

# Security: master key (add config.yaml to .gitignore!)
# crypto:
#   master_key_hex: "your-32-byte-hex-key"

Secrets Management

On first run without a master key, the server auto-generates a key and saves it to .env for development convenience.

# Check if .env was created
cat .env

# For production, set explicitly:
export MCP_MASTER_KEY="your-32-byte-hex-key"

# Or use OS keychain (recommended)
pip install keyring
python -c "from features.secrets import install_master_key_to_keychain; install_master_key_to_keychain('your-key')"

Development

# Install dev dependencies
pip install -e ".[dev,binary]"

# Run linter
ruff check .

# Format code
ruff format .

# Type check
mypy --config-file pyproject.toml features/ shared/ mcp_server/ rag/ hooks/ wiki/ lifecycle/ graph/ core/

# Run tests
pytest tests/ -v --timeout=30

Community


License

MIT License - see LICENSE for details.


Star History Chart

Reviews

No reviews yet

Be the first to review this server!

Ariel Memory MCP Server - Two-layer memory MCP server for AI agents with 37 tools, | MCP Marketplace