Skip to main content
Glama
Hippocampal Memory MCP

Hippocampal Memory MCP

by harbz07

🧠 Hippocampal Memory MCP Server

An MCP server for neuroanatomically-inspired memory consolidation using Neo4j and semantic search.

Features

  • Episodic Memory Encoding: Create memory events with emotional valence and temporal context

  • Semantic Retrieval: Vector similarity search using OpenAI embeddings

  • Graph Operations: Full Cypher query support for reading and writing

  • Relationship Tracking: Monitor bond strength evolution over time

  • Extensible Schema: Additional tools in hippocampus-extension.mjs ready for integration

Related MCP server: RAG Memory MCP

Quick Start

See CHECKLIST.md for daily startup instructions.

1. Install Dependencies

npm install

2. Setup Neo4j

You need Neo4j Desktop running locally with a database on port 7687.

3. Initialize Schema

npm run setup-schema

4. Setup Tunnel (for remote access)

Start ngrok to expose your local Neo4j:

ngrok tcp 7687

Copy the tunnel URL (e.g., tcp://2.tcp.us-cal-1.ngrok.io:12841)

5. Configure Claude Desktop

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "hippocampal-memory": {
      "command": "node",
      "args": ["C:\\Users\\harve\\Neo4j\\hippocampal-mcp-server.mjs"],
      "env": {
        "NEO4J_URI": "bolt://YOUR_NGROK_URL",
        "NEO4J_USER": "neo4j",
        "NEO4J_PASSWORD": "your_password",
        "OPENAI_API_KEY": "your_openai_key"
      }
    }
  }
}

6. Start Claude Desktop

The MCP server will connect automatically.

Available Tools (8)

Hippocampus Module (Biomimetic Schema)

  1. hippocampus_write_event - Structured event creation with Who/Why/What/Where/Effects blocks

  2. hippocampus_write_reflection - Agent-relative memory slices with egocentric perspective

  3. hippocampus_search_events - Pattern completion retrieval with temporal/participant/effect filters

Core Memory Tools

  1. encode_memory - Save episodic memories with vector embeddings

  2. recall_memory - Semantic + temporal + emotional search

  3. query_graph - Read-only Cypher queries

  4. mutate_graph - Write operations (CREATE, MERGE, etc.)

  5. evolve_bond - Track relationship dynamics over time

Architecture

Current Setup:

Files:

Schema

Core Nodes:

  • Event - Episodic memories with vector embeddings

  • Person - Human and AI entities

  • Project - Ongoing work

  • Concept - Abstract ideas

  • Place, Catalyst, Entity, Target, Effect, Reflection, Agent (extension schema)

Key Relationships:

  • INVOLVES - Event → Entity (with role & salience)

  • PRECEDED - Event → Event (causal chains)

  • CONSOLIDATED_TO - Event → Concept/Person/Project

  • BOND - Person ↔ Person (with strength trajectory)

  • PARTICIPATED_IN, CATALYZED_BY, HELD_AT, HAD_EFFECT_ON, etc. (extension schema)

Indexes:

  • Vector index on Event.embedding (1536 dimensions, cosine similarity)

  • Unique constraints on id fields for Person, Project, Concept, Event

Important Notes

  • ngrok URL changes on every restart (unless you pay for static URL)

  • Update NEO4J_URI in Claude Desktop config when ngrok URL changes

  • Neo4j Desktop must be running before starting Claude Desktop

  • Environment variables are in Claude Desktop config (NOT .env file)

  • Render deployment requires persistent Neo4j (Aura) - local tunnel won't work

Testing

Test local connection:

node test-connection.mjs

Test tunnel connection:

node test-tunnel.mjs

Documentation

Deployment

Currently deployed to Render at: https://hippocampal-memory-mcp.onrender.com

For deployment details, see archived docs.

Available Tools

8 tools
encode_memoryA

Create episodic memory event with emotional valence, temporal context, and entity involvement. Automatically generates embeddings for semantic retrieval.

Inputs: event (required), involves, precedes, consolidates_to.

evolve_bondA

Update bond strength between entities and track relationship trajectory over time. Automatically records milestones and calculates momentum.

Inputs: new_strength (required), to_entity_id (required), from_entity_id (required), milestone, +2 more.

hippocampus_search_eventsA

Retrieve events using pattern completion. Supports semantic search, temporal filters, participant filters, and effect filters.

Inputs: limit, place, entities, effects_on, +4 more.

hippocampus_write_eventB

Create an episodic Event with Who/Why/What/Where/Effects blocks. Mimics hippocampal CA3 pattern separation and binding.

Inputs: event (required).

hippocampus_write_reflectionB

Create agent-relative Reflection about an event. Mimics prefrontal cortex self-referential processing with egocentric perspective.

Inputs: agent_id (required), event_id (required), reflection (required).

mutate_graphA

Execute arbitrary Cypher write operations for creating/updating nodes, relationships, and properties. Use for operations beyond specialized tools.

Inputs: cypher (required), params.

query_graphA

Execute read-only Cypher queries for complex data retrieval. Use for custom queries, analytics, and exploring the graph structure.

Inputs: cypher (required), params.

recall_memoryA

Retrieve memories using semantic similarity, emotional valence, temporal range, or entity involvement. Returns ranked results combining vector similarity with Cypher filters.

Inputs: limit, query, event_types, temporal_range, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 8 tools

    Disambiguation2/5

    There is significant overlap between hippocampus_write_event and encode_memory, both creating episodic memory events with similar semantics. Similarly, hippocampus_search_events and recall_memory both retrieve memories with overlapping filters, making it unclear which tool to select. The distinction between generic graph operations (mutate_graph/query_graph) and specialized tools adds further ambiguity.

    Naming Consistency2/5

    Naming mixes a hippocampus_ prefix on three tools (write_event, write_reflection, search_events) with plain verb_noun names on the rest (encode_memory, recall_memory, mutate_graph, evolve_bond, query_graph). While the verbs are fairly descriptive, the inconsistent prefix and overlapping vocabulary (write vs encode, search vs recall) break a predictable pattern.

    Tool Count4/5

    Eight tools is a reasonable count for a memory and knowledge graph server. However, the presence of redundant event creation and retrieval tools means the count is slightly padded; the true functional set is smaller. Still, the overall number is appropriate for the domain.

    Completeness3/5

    The server covers creation (events, reflections), retrieval (search, recall), relationship manipulation (evolve_bond), and custom graph operations (mutate_graph, query_graph). However, there are no dedicated tools for updating or deleting memories, and mutating via raw Cypher is an indirect workaround. Notable gaps exist for lifecycle management of memories.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enhanced knowledge graph memory server for AI assistants that uses Neo4j as the backend storage engine, enabling powerful graph queries and efficient storage of user interaction information with full MCP protocol compatibility.
      23
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An advanced MCP server providing RAG-enabled memory through a knowledge graph with vector search capabilities, enabling intelligent information storage, semantic retrieval, and document processing.
      49 npm
      47
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A universal MCP server providing persistent, structured memory through a knowledge graph with graph storage, semantic vector search, and multi-hop traversal for AI agents and IDEs.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A persistent, self-organizing memory MCP server for AI assistants, using semantic search, knowledge graphs, and reinforcement learning to automatically manage and retrieve memories.
      13
      MIT