LabscoMCP early access ↗
thegoodguyslaMCP SERVER

Myco Brain

Agent memory on your own Postgres where every fact traces back to its source document, corroboration raises confidence, and a contradiction supersedes without deleting.

by thegoodguysla ↗Agent MemoryCommunity

LABSCO SUMMARY

A contradiction is recorded, not overwritten.

Most agent memory silently replaces a fact when a new one arrives; here the old fact is closed and weakened but kept, with the supersession written to an audited ledger you can read back. Combined with per-relationship distinct-source counting — ten chunks of one document corroborate nothing — that is what makes the confidence number mean something. Everything runs keyless if you want it to: full-text search, local embeddings and local extraction all have no hosted dependency.

What it is

A persistent memory server for AI agents, self-hosted on plain Postgres tables. Its contract is the opposite of letting an LLM maintain its own notes: the model proposes, deterministic rules decide what becomes a fact, and you set the bar — from corroboration-gated auto-promotion by default to human review of every fact.

What you get

  • 13 MCP tools — brain_context_pack, brain_search, brain_why, brain_neighbors, brain_ingest, brain_propose_fact, brain_annotate, brain_save_memory, brain_recall_memory, brain_get_related, brain_stats, brain_set_mode, brain_self_check
  • Provenance on demand — brain_why returns a fact's distinct source count, its confidence trend over time, and any superseded history
  • Compounding confidence: an independent source agreeing raises a fact's confidence, and a confident contradiction on a single-valued relationship supersedes the old one, which is closed and weakened but kept, with the supersession recorded in an audited claims ledger
  • Full-text BM25 search working immediately with no key; semantic search through local Ollama embeddings or OpenAI; a knowledge graph through local extraction or Anthropic for the most accurate result
  • A usage contract shipped over MCP's instructions channel, so a connected agent knows when to recall, save and cite without per-project prompting
  • Your ChatGPT or Claude data export imported as provenance-tracked, deduplicated memory, one document per conversation
  • A schema that grows — the extraction worker proposes entity kinds and relationship types your catalog does not have, and promotion is yours by default

Requirements

DATABASE_URL is the only hard requirement — a Postgres connection string. The Docker quickstart needs nothing else: docker compose up -d starts Postgres 16 with pgvector, the MCP server and the extraction worker, with seeded localdev credentials. Connect with claude mcp add myco-brain --env DATABASE_URL=… --env BRAIN_API_KEY=… -- npx -y @mycobrain/mcp-server, or the equivalent mcpServers block. BRAIN_EMBED_PROVIDER=ollama turns on keyless local semantic search; BRAIN_ANTHROPIC_API_KEY gives the most accurate graph. Governance dials: BRAIN_REQUIRE_HUMAN_REVIEW and BRAIN_SCHEMA_AUTO_PROMOTE, both 0 by default. Run mycobrain-doctor to confirm the setup — it live-verifies the Ollama path rather than only checking that variables are set. Apache-2.0.

Setup effort

Follow the published steps — git clone https://github.com/thegoodguysla/myco-brain.git