Labsco
For-Sunny logo

Hebbian Mind Enterprise

β˜… 5

from For-Sunny

MCP memory server with Hebbian learning β€” concept connections strengthen through co-activation and weaken through disuse.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

Hebbian Mind Enterprise

<!-- mcp-name: io.github.For-Sunny/hebbian-mind-enterprise --> <a href="https://glama.ai/mcp/servers/For-Sunny/hebbian-mind-enterprise"> <img width="380" height="200" src="https://glama.ai/mcp/servers/For-Sunny/hebbian-mind-enterprise/badge" /> </a>

Memory that learns. Connections that fade.

An MCP server that builds knowledge graphs through use. Concepts connect when they activate together. Unused connections decay. The more you use it, the smarter it gets.


What It Does

  • Associative Memory - Save content. Query content. Related concepts surface automatically.
  • Hebbian Learning - Edges strengthen through co-activation. No manual linking required.
  • Concept Nodes - 100+ pre-defined enterprise concepts across Systems, Security, Data, Operations, and more.
  • MCP Native - Works with Claude Desktop, Claude Code, any MCP-compatible client.

Claude Desktop Integration

Add to your claude_desktop_config.json:

Native Install:

{
  "mcpServers": {
    "hebbian-mind": {
      "command": "python",
      "args": ["-m", "hebbian_mind.server"]
    }
  }
}

Docker Install:

{
  "mcpServers": {
    "hebbian-mind": {
      "command": "docker",
      "args": ["exec", "-i", "hebbian-mind", "python", "-m", "hebbian_mind.server"]
    }
  }
}

Restart Claude Desktop. The tools appear automatically.


MCP Tools

Eight tools. All available through any MCP client.

save_to_mind

Store content with automatic concept activation and edge strengthening.

{
  "content": "Microservices architecture enables independent deployment",
  "summary": "Optional summary",
  "source": "ARCHITECTURE_DOCS",
  "importance": 0.8
}

Activates matching concept nodes. Strengthens edges between co-activated concepts.

query_mind

Query memories by concept nodes.

{
  "nodes": ["architecture", "deployment"],
  "limit": 20
}

Returns memories that activated those concepts.

analyze_content

Preview which concepts would activate without saving.

{
  "content": "API authentication using JWT tokens",
  "threshold": 0.3
}

get_related_nodes

Get concepts connected via Hebbian edges.

{
  "node": "security",
  "min_weight": 0.1
}

Returns the neighborhood graph - concepts that have fired together with "security".

list_nodes

List all concept nodes, optionally filtered.

{
  "category": "Security"
}

mind_status

Server health and statistics.

{}

Returns node count, edge count, memory count, strongest connections, dual-write status.

faiss_search

Semantic search via external FAISS tether (if enabled).

{
  "query": "authentication patterns",
  "top_k": 10
}

faiss_status

Check FAISS tether connection status.


Temporal Decay

Memories and edges both decay over time unless reinforced.

Memory decay: Same formula as CASCADE and PyTorch Memory. Memories lose effective importance over time. Accessed memories reset their clock. Immortal memories (importance >= 0.9) never decay.

Edge decay: Connections between concepts weaken if not co-activated. This is the inverse of Hebbian learning -- "neurons that stop firing together, stop wiring together." Edges decay toward a minimum weight (0.1), never to zero, preserving the structure of learned associations.

Decay Configuration

VariableDefaultDescription
HEBBIAN_MIND_DECAY_ENABLEDtrueEnable memory decay
HEBBIAN_MIND_DECAY_BASE_RATE0.01Base exponential decay rate
HEBBIAN_MIND_DECAY_THRESHOLD0.1Memories below this are hidden
HEBBIAN_MIND_DECAY_IMMORTAL_THRESHOLD0.9Memories at or above this never decay
HEBBIAN_MIND_DECAY_SWEEP_INTERVAL60Minutes between sweep cycles
HEBBIAN_MIND_EDGE_DECAY_ENABLEDtrueEnable edge weight decay
HEBBIAN_MIND_EDGE_DECAY_RATE0.005Edge decay rate (slower than memory decay)
HEBBIAN_MIND_EDGE_DECAY_MIN_WEIGHT0.1Minimum edge weight floor

Decayed memories are hidden from query_mind by default. Pass include_decayed: true to retrieve them.


Architecture

Dual-Write Pattern

  • Write: Disk first (crash-safe) -> RAM second (speed)
  • Read: RAM (instant) with disk fallback
  • Startup: Copies disk to RAM if RAM is empty

Disk commits before RAM updates. If the RAM write fails, the data is already on disk -- the failure gets logged but nothing is lost. This order guarantees durability. A power loss mid-write never leaves you with RAM-only data that never reached disk.

RAM disk is optional. Without it, reads and writes go directly to SQLite on disk.

Concept Nodes

100+ pre-defined nodes across categories:

  • Systems & Architecture - service, api, component, integration
  • Security - authentication, authorization, encryption, access
  • Data & Memory - database, cache, persistence, schema
  • Logic & Reasoning - pattern, rule, validation, analysis
  • Operations - workflow, pipeline, monitoring, health
  • Quality - performance, reliability, scalability, test

Nodes have keywords and prototype phrases. Content activates nodes when keywords match.

Hebbian Learning

When concepts co-activate (appear in the same saved content):

  1. Edge created if none exists (initial weight: 0.15)
  2. Existing edges strengthen via asymptotic formula:
delta = (MAX_WEIGHT - current_weight) * LEARNING_RATE
new_weight = current_weight + delta

Each co-activation closes 10% of the gap between current weight and MAX_WEIGHT (10.0). An edge at 2.0 gains 0.8. An edge at 9.0 gains 0.1. Edges approach the ceiling but never hit it -- no saturation, no runaway weights.

Combined with time-based decay (idle edges lose 2% per tick) and homeostatic scaling (total edge weight per node stays near 50.0), the graph self-regulates. Active paths strengthen. Neglected paths fade. The topology stays meaningful.

"Neurons that fire together, wire together."


Performance

MetricValueNotes
Save latency<10msIncludes activation, Hebbian strengthening, and commit
Query latency<5msNode lookup + JOIN + sort
RAM disk reads<1msWhen HEBBIAN_MIND_RAM_DISK=true
Analyze latency<1msContent analysis without save
Memory per node~1KBSQLite row with keywords and phrases
Memory per edge~100 bytesSQLite row with weight and timestamps
Startup (100 nodes)<1 secondSchema creation + node loading + edge initialization

Reproducing Benchmarks

A benchmark script is included to verify these claims on your hardware:

python benchmarks/benchmark_performance.py

The script creates an isolated temp database, runs 200 iterations of each operation, and reports mean/median/P95/P99 latencies. Results are saved to benchmarks/latest_results.json with full system info for reproducibility.

Test conditions: Disk-only mode (no RAM disk), WAL journal mode, 20 enterprise nodes, single-threaded. RAM disk mode will produce faster read latencies.


Testing

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

# Run tests
pytest

# Run with coverage
pytest --cov=hebbian_mind

Support


License

MIT License. See LICENSE for terms.


Memory that learns. Concepts that connect. The more you use it, the smarter it gets.


Made by CIPS Corp

Website | Store | GitHub | glass@cipscorps.io

Enterprise cognitive infrastructure for AI systems: PyTorch Memory, Soul Matrix, CMM, and the full CIPS Stack.

Copyright (c) 2025-2026 C.I.P.S. LLC