Fusing vector and keyword search by rank rather than by score avoids the usual problem of two systems whose numbers are not comparable, and it happens in a single Postgres query rather than a pipeline of rerankers. The design detail worth copying is confidence: reinforce_memory and contradict_memory adjust a score instead of deleting, so an assistant that learns something was wrong records that rather than losing the history. Refusing to store a git diff is a small thing that saves the memory from filling with noise.
A memory server backed by your own PostgreSQL with pgvector. Retrieval fuses vector similarity with full-text search in a single query, and a relationship graph over the memories lets a search follow edges rather than only rank rows. Memories are grouped into profiles, so work and personal context stay apart.
- Store what matters — store_memory runs the enrichment pipeline, store_decision records a decision with its rationale, alternatives and reasoning trace, linked to the memories that support it
- Content is validated before it lands: too short, too long, or recognisably a git diff or shell dump and it is refused with a suggestion to store a summary instead
- hybrid_search — semantic and keyword together, filterable by tags and source, and able to follow relationship edges when you set a graph depth
- explore_knowledge and find_related — seed a search then traverse several hops out, or trace impact from one specific memory
- list_recent for the chronological view
- Confidence rather than deletion — reinforce_memory raises a memory's score, contradict_memory lowers it, so being wrong is recorded rather than erased
- update_memory, which re-embeds when the content changes, and delete_memory
- Profiles — switch_profile, current_profile, list_profiles with their memory counts, and set_profile_ttl for auto-expiry
- Maintenance that keeps it from rotting — compress_old_memories in tiers while preserving the original, link_unlinked to backfill relationships, cleanup_expired, and re_embed_all after switching embedding provider
- export_profile as JSON or markdown and import_memories_tool with similarity-based deduplication
- health_check and get_cache_stats for the database, embedding provider and cache
- An append-only audit log of every store, search, update and delete, in the same database
A PostgreSQL database with pgvector — a free Supabase project, a Neon database, or your own Postgres — and the schema migration run against it. Set SUPABASE_URL and SUPABASE_KEY for Supabase, or DATABASE_URL for a direct connection, in which case install the postgres extra so the driver is present. Run it with uvx ogham-mcp, which starts ogham-serve. Stdio by default; OGHAM_TRANSPORT, OGHAM_HOST and OGHAM_PORT switch it to streamable HTTP with a health endpoint. An embedding provider is needed for semantic search. The data is in a database you control, and nothing leaves it except what your client asks for.
One command plus a key — uvx --from ogham-mcp ogham init, then supply credentials
