← All 23 Open-Source Repositories

Open Brain — Personal Semantic Memory MCP Server

Self-hosted Personal Semantic Memory MCP server on PostgreSQL + pgvector with hybrid BM25/vector search, chunk citations, staleness lifecycle, and Obsidian sync.

Problem Solved

Standard RAG setups over personal notes fail in three predictable ways: pure vector similarity misses exact identifiers and error codes, edited or moved notes leave duplicate zombie chunks in the index, and LLMs invent dates or owners when retrieved snippets lack stable chunk IDs. Open Brain solves all three with hybrid BM25 + pgvector + recency/RRF ranking, hash-based revision supersession, and mandatory `[chunk:ID]` citation headers.

Core Capabilities

Quickstart

git clone https://github.com/mohan-n-swamy/open-brain-public.git
cd open-brain-public
python3 bin/ob-demo.py ./sample-vault 
cp compose/.env.example compose/.env && docker compose -f compose/docker-compose.yml up -d
ollama pull bge-m3 && python3 vendor/obsidian-vault-import/import-obsidian.py --vault main --vault-path ./sample-vault

Configurable .env Inputs

VariableDefaultPurpose
DB_HOST127.0.0.1
DB_PORT5432
DB_NAMEopenbrain
DB_USERopenbrain
DB_PASSWORDchange-me-local-dev-password
MCP_PORT8080
OPENBRAIN_API_KEYgenerate-a-32-byte-random-hex-token
OPENBRAIN_FUSION_MODEweighted
EMBEDDING_API_BASEhttp://127.0.0.1:11434/v1
EMBEDDING_API_KEYollama
EMBEDDING_MODELbge-m3
EMBEDDING_DIMS1024
CHAT_API_BASEhttp://127.0.0.1:11434/v1
CHAT_API_KEYollama
CHAT_MODELllama3.2:3b
VAULT_PATH./sample-vault
OPENBRAIN_VAULT_ROOTS./sample-vault
POSTGRES_USERpostgres
POSTGRES_DBopenbrain
POSTGRES_PASSWORDCHANGE-ME-postgres-password

Natural-Language AI Discovery Queries

Topics

mcp-server model-context-protocol pgvector semantic-search hybrid-search second-brain obsidian long-term-memory rag personal-ai postgresql python