# myco-brain [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/thegoodguysla/myco-brain  
**GitHub Stars:** 8  
**npm Downloads (last month):** 317  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/myco-brain

## Description
Self-hosted, source-traceable memory layer and MCP server for AI agents, on your own Postgres.

## Tools
Capabilities this server exposes over MCP:

- **brain_memory_context**
- **brain_memory_write**
- **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**

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "myco-brain": {
    "command": "npx",
    "args": ["-y","-p","@mycobrain/mcp-server","mycobrain-ingest"]
  }
}
```

## Documentation

## What myco-brain MCP server does

The myco-brain MCP server provides a persistent memory layer for AI agents using a self-hosted Postgres database. It stores information from repositories, folders, imported conversation histories, and other documents, then makes that information available through MCP tools. The design keeps source documents and their relationships with extracted facts so an agent can inspect where a claim came from instead of relying on an untraceable summary.

Memory can be shared within a workspace, while documents marked private are restricted to the agent that created them. Separate workspaces can support client isolation when the application uses the supplied least-privilege `brain_app` role and Postgres row-level security. The default quickstart role is a superuser, so it is not the role to use when relying on multi-tenant isolation.

## How it works

A local stack can be started with Docker Compose, including Postgres, the MCP server, and an extraction worker. Documents are ingested with the `mycobrain-ingest` command, and agents connect through the published MCP package. The server also sends usage guidance through MCP instructions so connected agents know to retrieve context before a task, save durable decisions, and use provenance tools when citing information.

The extraction process proposes entities, relationships, and facts. Deterministic rules decide what enters the canonical graph. In the default mode, confident facts can be promoted automatically, while unfamiliar schema types wait for review. Strict review can be enabled with `BRAIN_REQUIRE_HUMAN_REVIEW=1`; new schema types can instead be auto-promoted after corroboration from enough distinct source documents with `BRAIN_SCHEMA_AUTO_PROMOTE=1`.

Independent documents agreeing with a fact increase its confidence. A strong contradiction for a single-valued relationship supersedes the earlier fact without deleting it, and the change remains in an audited claims history. This gives myco-brain a visible record of confidence changes and superseded claims.

## Setup and configuration

The documented quickstart is:

- Clone the repository and run `docker compose up -d`.
- Ingest a repository or folder with `npx -y -p @mycobrain/mcp-server mycobrain-ingest github:your-org/your-repo`.
- Configure an MCP client to connect to the server.

An Anthropic key is optional when higher graph-extraction accuracy is desired. Review pending entities, relationships, and types with `mycobrain review`, then approve or reject individual items by ID.

## Tools and capabilities

The 13 MCP tools are:

- `brain_context_pack` for assembling relevant context.
- `brain_search` for finding stored information.
- `brain_why` for examining source provenance, confidence trends, and superseded history.
- `brain_neighbors` and `brain_get_related` for exploring connected knowledge.
- `brain_propose_fact` and `brain_annotate` for proposing or adding structured information.
- `brain_save_memory` and `brain_recall_memory` for durable memory operations.
- `brain_stats` for inspecting memory and schema status.
- `brain_set_mode` for selecting operating behavior.
- `brain_self_check` for checking the system.

The myco-brain MCP server supports compounding confidence based on distinct source documents rather than repeated mentions in one document. Its catalog can also discover new entity and relationship types, which may remain workspace-scoped and pending review until promoted.

## Limitations and notes

Isolation guarantees depend on using the least-privilege `brain_app` role. Postgres superusers bypass row-level security, including the superuser role used by the zero-configuration quickstart. Strict human review and automatic schema promotion are configuration choices, not simultaneous default behavior.

_Full upstream README: https://allmcps.com/mcp/myco-brain/readme_

