npm.io
0.3.0 • Published 10h agoCLI

multimodemind

Licence
MIT
Version
0.3.0
Deps
10
Size
209 kB
Vulns
0
Weekly
0

Multimode Mind

A multi-store memory layer for AI agents, exposed over the Model Context Protocol (MCP).

Agent memory is an architecture problem, not a storage problem. The differentiator is the router, not the stores.

Most agent-memory tools ask you to pick a store — a vector database, a key-value cache, a pile of Markdown notes — and then bend your workflow to fit it. Multimode Mind takes the opposite position: your knowledge already lives in several places, and it should stay there. Multimode Mind wraps the stores you already have behind a single retrieve() router that returns one ranked context bundle with full provenance.

Design

Multimode Mind is a TypeScript MCP server that sits in front of up to five memory stores (plus an append-only audit log):

Store Backend Role
markdown Plain .md files (Obsidian-compatible, vault-agnostic) Existing notes, read non-destructively
sqlite better-sqlite3 (or Postgres) Structured, queryable memory
leveldb level Fast key-value session state
files Flat files + JSON metadata index Arbitrary document memory
vector vectra (or pgvector) Semantic search

A single router fans out to every available store in parallel, scores each candidate with a blend of vector similarity and keyword relevance, de-duplicates across stores by content fingerprint, and returns a ranked bundle. Every result carries its source, so an agent always knows where a memory came from.

Wrap, don't migrate. Point Multimode Mind at your existing Markdown vault and it reads it in place — no import step, no lock-in.

Pluggable backends

The structured and semantic slots are pluggable. Keep the zero-config local defaults (SQLite + Vectra), or point them at a Postgres database you already run — one connection can back both the structured store and, via pgvector, the semantic store. Same "wrap, don't migrate" principle, scaled from your notes to your database of record.

Select backends in the dashboard ([b]) or via environment:

MMIND_BACKEND_STRUCTURED=postgres   # sqlite | postgres
MMIND_BACKEND_VECTOR=pgvector       # vectra | pgvector
MMIND_POSTGRES_URL=postgresql://user@host/db   # credentials via env, never on disk

Tools

The server exposes three MCP tools:

  • retrieve — search all stores and return a ranked context bundle with provenance
  • store — persist content (with an auto-generated embedding) to a target store
  • sources — report the health and entry counts of every configured store

Install

npm install -g multimodemind

Usage

Run as an MCP server over stdio. Pass your Markdown vault as the first argument:

mmind "/path/to/your/vault"

Store data is written to ~/.mmind by default, so mmind works from any directory. Everything can also be configured via environment variables (which take precedence over the positional argument):

Variable Default Purpose
MMIND_VAULT_PATH (first CLI arg, else disabled) Markdown vault directory
MMIND_SQLITE_PATH ~/.mmind/memory.db SQLite database file
MMIND_LEVELDB_PATH ~/.mmind/leveldb LevelDB directory
MMIND_FILES_PATH ~/.mmind/files Files directory
MMIND_VECTOR_PATH ~/.mmind/vector-index Vector index directory
OPENAI_API_KEY (unset) Enables OpenAI embeddings; falls back to a local model when absent
Embeddings

Embeddings are pluggable. With OPENAI_API_KEY set, Multimode Mind uses text-embedding-3-small. Without it, it falls back to a local @huggingface/transformers model (downloaded once, ~23 MB) so retrieval works fully offline.

Terminal dashboard

A built-in terminal dashboard shows store status and lets you reconfigure paths interactively:

npm run dashboard

Roadmap

v1 ships the three tools, five stores, and the router. The conflicts field is defined in the retrieval contract and reserved for v2, which will add conflict detection and memory decay.

License

MIT Old Cart Technology LLC

Keywords