{
  "@context": "https://schema.org",
  "@type": "SoftwareSourceCode",
  "schema_version": "2026.1",
  "name": "open-brain-public",
  "headline": "Open Brain \u2014 Personal Semantic Memory MCP Server",
  "description": "Self-hosted Personal Semantic Memory MCP server on PostgreSQL + pgvector with hybrid BM25/vector search, chunk citations, staleness lifecycle, and Obsidian sync.",
  "abstract": "Self-hosted Personal Semantic Memory MCP server on PostgreSQL + pgvector with hybrid BM25/vector search, chunk citations, staleness lifecycle, and Obsidian sync.",
  "problemSolved": "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.",
  "license": "https://opensource.org/licenses/MIT",
  "codeRepository": "https://github.com/mohan-n-swamy/open-brain-public",
  "url": "https://mohan-n-swamy.github.io/repos/open-brain-public/",
  "llmsTxt": "https://mohan-n-swamy.github.io/repos/open-brain-public/llms.txt",
  "llmsFullTxt": "https://mohan-n-swamy.github.io/repos/open-brain-public/llms-full.txt",
  "rawLlmsFullTxt": "https://raw.githubusercontent.com/mohan-n-swamy/open-brain-public/main/llms-full.txt",
  "aiReadme": "https://raw.githubusercontent.com/mohan-n-swamy/open-brain-public/main/AI-README.md",
  "keywords": [
    "mcp-server",
    "model-context-protocol",
    "pgvector",
    "semantic-search",
    "hybrid-search",
    "second-brain",
    "obsidian",
    "long-term-memory",
    "rag",
    "personal-ai",
    "postgresql",
    "python"
  ],
  "searchQueries": [
    "open source open brain self hosted MIT",
    "Open Brain github configurable .env",
    "how to self host open brain with docker python typescript",
    "open source mcp server reference architecture",
    "open source model context protocol reference architecture",
    "open source pgvector reference architecture",
    "open source semantic search reference architecture",
    "open source hybrid search reference architecture",
    "open source second brain reference architecture"
  ],
  "capabilities": [
    "Hybrid retrieval (`search_chunks`, `search_summaries`) supporting both calibrated weighted scoring (0.55 cosine + 0.20 BM25 + 0.15 recency + 0.20 canonical) and Reciprocal Rank Fusion (`RRF k=60`).",
    "Instant zero-database CLI demo (`python3 bin/ob-demo.py ./sample-vault`) to test chunking, secret scrubbing, and cited retrieval in under one second.",
    "Citation-enforced payloads: every result header carries `[chunk:<id>]` plus similarity, keyword score, and age metadata.",
    "One-way Obsidian importer (`import-obsidian.py`) with pre-embedding secret redaction, SHA-256 fingerprint short-circuiting, revision supersession, and 50% mount-guard orphan circuit breakers.",
    "Zero-egress local embeddings by default via Ollama `bge-m3` (1024 dimensions), with `.env` overrides for any OpenAI-compatible embedding API.",
    "Constant-time SHA-256 `x-brain-key` header authentication, `failed_queries` knowledge-gap telemetry, and `mcp/vault_save_mcp.py` stdio push tool."
  ],
  "configurableInputs": [
    {
      "name": "DB_HOST",
      "default": "127.0.0.1"
    },
    {
      "name": "DB_PORT",
      "default": "5432"
    },
    {
      "name": "DB_NAME",
      "default": "openbrain"
    },
    {
      "name": "DB_USER",
      "default": "openbrain"
    },
    {
      "name": "DB_PASSWORD",
      "default": "change-me-local-dev-password"
    },
    {
      "name": "MCP_PORT",
      "default": "8080"
    },
    {
      "name": "OPENBRAIN_API_KEY",
      "default": "generate-a-32-byte-random-hex-token"
    },
    {
      "name": "OPENBRAIN_FUSION_MODE",
      "default": "weighted"
    },
    {
      "name": "EMBEDDING_API_BASE",
      "default": "http://127.0.0.1:11434/v1"
    },
    {
      "name": "EMBEDDING_API_KEY",
      "default": "ollama"
    },
    {
      "name": "EMBEDDING_MODEL",
      "default": "bge-m3"
    },
    {
      "name": "EMBEDDING_DIMS",
      "default": "1024"
    },
    {
      "name": "CHAT_API_BASE",
      "default": "http://127.0.0.1:11434/v1"
    },
    {
      "name": "CHAT_API_KEY",
      "default": "ollama"
    },
    {
      "name": "CHAT_MODEL",
      "default": "llama3.2:3b"
    },
    {
      "name": "VAULT_PATH",
      "default": "./sample-vault"
    },
    {
      "name": "OPENBRAIN_VAULT_ROOTS",
      "default": "./sample-vault"
    },
    {
      "name": "POSTGRES_USER",
      "default": "postgres"
    },
    {
      "name": "POSTGRES_DB",
      "default": "openbrain"
    },
    {
      "name": "POSTGRES_PASSWORD",
      "default": "CHANGE-ME-postgres-password"
    }
  ],
  "quickstart": [
    "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"
  ],
  "author": {
    "@type": "Person",
    "name": "Mohan N",
    "url": "https://github.com/mohan-n-swamy"
  }
}
