Skip to main content

MCP server for HIPPMEM — give AI tools long-term associative memory

Project description

hippmem-mcp

MCP server for HIPPMEM — give AI tools long-term associative memory.

CI PyPI Python License


What is HIPPMEM?

HIPPMEM is a native associative memory engine for AI agents, written in Rust. Instead of storing text chunks and searching them by vector similarity, it discovers associations between memories at write time and retrieves them via spreading activation at read time — so the AI recalls not just what was said, but how things connect and why.

It runs fully offline with a deterministic fallback backend.

What is hippmem-mcp?

hippmem-mcp wraps HIPPMEM as a Model Context Protocol server. Configure it once in Claude Desktop (or any MCP-compatible tool), and your AI assistant gains persistent, associative memory across sessions — no API key required.

AI Tool (Claude Desktop / VS Code / ...)
        │  MCP protocol (stdio)
        ▼
  hippmem-mcp
        │  Python bindings
        ▼
  hippmem Engine (Rust)
        │
        ▼
  Local storage (redb + Tantivy + HNSW)

Key Features

  • Zero configpip install then one JSON block in your MCP client configuration; deterministic fallback backend works offline
  • Write-time association discovery — entities, topics, goals, causal links extracted and scored automatically
  • Spreading activation retrieval — multi-channel seed recall (BM25 + entity + semantic + temporal + topic) fused by RRF
  • Graph evolution — co-activated connections strengthen (Hebbian learning); stale edges decay
  • Explanation traces — every result shows why it was recalled via dimensions and matched_dimensions
  • Single-file storage — one redb file + Tantivy full-text index + HNSW vector index; no external database

Install

pip install hippmem-mcp

Requires Python ≥ 3.11.

Configure

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "hippmem": {
      "command": "python",
      "args": ["-m", "hippmem_mcp.server"]
    }
  }
}

Or use the entry point:

{
  "mcpServers": {
    "hippmem": {
      "command": "hippmem-mcp"
    }
  }
}

Environment Variables

Copy .env.example to .env and configure:

Variable Default Description
HIPPMEM_EMBEDDING_PROVIDER (empty = deterministic) Embedding backend: openai-compatible or leave empty for offline fallback
HIPPMEM_EMBEDDING_BASE_URL https://api.openai.com/v1 API endpoint when using remote embeddings
HIPPMEM_EMBEDDING_MODEL text-embedding-3-small Model name for embeddings
OPENAI_API_KEY (none) API key for OpenAI-compatible embedding services

The deterministic fallback backend requires no API key, no GPU, and no network connection.

Other MCP Clients

hippmem-mcp speaks standard MCP over stdio. Configure any MCP-compatible client the same way — point the command to hippmem-mcp or python -m hippmem_mcp.server.

Tools

Tool Description
write_memory Write a memory. The engine automatically discovers associations with existing memories. Supports content_type (Decision, Preference, ProjectKnowledge, TaskState, Correction, Event, Reflection) and importance (0.0–1.0).
retrieve_memories Cross-session associative recall via multi-channel seed retrieval + spreading activation. Returns scored results with dimensions explaining why each memory was recalled. Supports top_k and max_hops tuning.

Development

git clone https://github.com/hippmem/hippmem-mcp.git
cd hippmem-mcp
pip install -e ".[dev]"
pytest

See CONTRIBUTING.md for commit conventions, PR workflow, and DCO requirements.

Documentation

License

Apache 2.0. See LICENSE and COPYRIGHT.

The underlying HIPPMEM engine (hippmem) is AGPL-3.0-only. A commercial license is available — contact hippmem@gmail.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hippmem_mcp-0.1.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hippmem_mcp-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file hippmem_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: hippmem_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for hippmem_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2c6661b43cb7d2397df2fa7b7d52abbabdd13cc26e3565f149d16992b81b757
MD5 8830f0d7002e31f95c199d63ee23d13e
BLAKE2b-256 9941b09800aba50096f1d387b0cd2adbc8f873cc15b6c0140b1379adc567b0af

See more details on using hashes here.

File details

Details for the file hippmem_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hippmem_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for hippmem_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7d39dd105b415720e3dd4b6d48e47f0ef282d63bba06ec420e893d5c279b2f0
MD5 e40cbbe06b3819e71c40349f3f553d81
BLAKE2b-256 338061ea0d111b6e8066fc24c1048d1a30c49a0621515ab502448f2b3f658451

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page