Personal Brain
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Personal Brain Find my latest blood test results and cite the source."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Personal Brain
A personal memory MCP server where every answer cites its source.
My AI assistants (Claude, ChatGPT and others) don't share a trusted memory, and when they answer from my notes they rarely say where the answer came from. Personal Brain is a small, self-hosted service that gives any MCP client read access to my personal records. Every result carries the record id, its source file, a content hash and a review status, so the assistant can cite it and I can verify it.
The first domain is health records: consultations, exams, prescriptions, medication use and follow-ups. It's a domain where a wrong or invented answer is worse than no answer.
Status: early development (phase 1 of 4). This repository contains code and fictional data only. Real records live in a private Git repository on my own server and never touch GitHub (ADR 009).
What makes it different
Sourced answers. Every search result returns
sourceandsha256. The tool description instructs the client to cite them.Pending is not a fact. Anything an AI extracts (say, from a photo of a prescription) is stored as
pendinguntil I confirm it. Pending records are flagged on every result (ADR 005).Prescribed is not taken. A prescription and the actual medication use are separate records (ADR 004).
No invented dates. A record dated
2026-03keeps month precision; nothing fills in a day.Read-only first, private by default. Two read tools only, a read-only database connection, and no record content or query terms in logs (ADR 006, ADR 007).
Related MCP server: google-health-chatgpt-selfhost
Architecture
flowchart LR
subgraph clients[MCP clients]
CD[Claude Desktop / Code]
CM[Claude mobile]
GPT[ChatGPT]
end
subgraph server[My server]
MCP[personal-brain<br/>MCP server]
IDX[(SQLite FTS5<br/>index)]
REPO[(Git repository<br/>records as Markdown + YAML)]
BK[Encrypted off-site<br/>backup]
end
CD -- "tunnel (phase 2)" --> MCP
CM -- "OAuth (phase 3)" --> MCP
GPT -- "OAuth (phase 3)" --> MCP
MCP -- "read-only queries" --> IDX
REPO -- "build (atomic swap)" --> IDX
REPO -- "restic" --> BKThe Git repository is the source of truth. The index is derived: it can be deleted and rebuilt from the records at any time. Details in ARCHITECTURE.md.
Quick start
Requires Python 3.12+ and uv.
uv sync
uv run personal-brain build --records examples/records --db data/index.db
uv run personal-brain search --db data/index.db "moisturizer"
uv run pytestConnect it to Claude Desktop (stdio) by adding to claude_desktop_config.json:
{
"mcpServers": {
"personal-brain": {
"command": "uv",
"args": ["--directory", "/path/to/personal-brain", "run", "personal-brain", "serve", "--db", "data/index.db"]
}
}
}Run as a container (server deployment)
docker build -t personal-brain .
docker run -d --name personal-brain -p 127.0.0.1:8000:8000 \
-v "$PWD/examples/records:/data/records:ro" personal-brain
# MCP endpoint: http://127.0.0.1:8000/mcp · health: http://127.0.0.1:8000/healthRecords are mounted read-only and the index is rebuilt at start (ADR 010).
Check that queries never reach the logs
uv run personal-brain check-logs --url http://127.0.0.1:8000/mcp --logs-command "docker logs personal-brain"It sends random canary terms through search and read_entry, then fails if any of them appears in the logs. CI runs it against the built image on every push (ADR 007).
Tools
Tool | Purpose | Returns |
| Full-text search over all records |
|
| Read one full record | All fields plus |
Roadmap
Phase | Scope | Exit criterion |
1 | Record format, index, read tools, tests, CI; data repository and off-site backup on the server, restore proven | Restore from off-site backup in an isolated environment passes before any real data is migrated |
2 | Read access from Claude Desktop through a tunnel; evaluation with a fixed question set | A real question is answered citing the right record; evaluation results published (fictional set) |
3 | OAuth (GitHub login, single user) and mobile clients | A question asked on the phone, with no computer on, returns a sourced answer; no token, no access |
4 | Capture: add records from chat as | A photographed prescription becomes a pending record with its evidence; it is never shown as fact before confirmation |
Decisions
All architectural decisions are recorded as ADRs in docs/adr.
Credits
Inspired by YudiG12/second-brain-mcp (MIT). This project takes a different direction: sourced answers over sensitive records, self-hosted, with human confirmation before anything becomes a fact.
License
Available Tools
2 toolsread_entryARead-onlyIdempotent
Read one full record by its id. Records with review_status 'pending' were not confirmed by the owner yet: never present them as facts. Always cite the 'source' of each record you use.
Inputs: id (required).
searchARead-onlyIdempotent
Search personal records by keywords. Records with review_status 'pending' were not confirmed by the owner yet: never present them as facts. Always cite the 'source' of each record you use.
Inputs: query (required), limit. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools target clearly different access patterns: keyword-based browsing via 'search' versus id-based retrieval of a single full record via 'read_entry'. There is no plausible overlap or risk of misselection.
Both names are lowercase and verb-initial, but 'search' is a bare verb while 'read_entry' follows a verb_noun pattern. The deviation is minor and the intent of each name is still immediately readable.
Two tools is on the thin side for a knowledge-base server, though it is defensible for a strictly read-only retrieval surface. It sits right at the borderline where a single additional operation (e.g. listing or filtering by source) would round out the surface.
Retrieval is covered (discover via search, then fetch full content by id), which is a coherent read path. However, there is no way to create, update, or flag records, so any workflow requiring the agent to contribute to the brain is a dead end.
Maintenance
Related MCP Connectors
Read patient-authorized EHR records: medications, labs, conditions, allergies. Consent-bounded.
Read a patient's claims and clinical records from the payers and providers they connect.
Household health records with source attribution. Read and add records with OAuth approval.
Query Particle Health patient records across connected clinical networks.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with clinical patient records using tools for document ingestion, structured conversion, patient profiling, record listing, search, and secure Q&A over patient documentation.-
- AlicenseNot gradedqualityCmaintenanceLets a single user read a bounded set of their own Google Health data from ChatGPT conversations through a private MCP connection, exposing four read-only tools for rollups, reconciled records, and irregular-rhythm notification history.1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables MCP-compatible clients to securely read personal blood glucose, blood ketones, device heart rate, weight, image-based body-fat percentage, and BMI data through catalog, device, query, record, and statistics tools.Apache 2.0
- AlicenseAqualityCmaintenanceEnables MCP clients to search and retrieve approved, role-filtered internal knowledge with PII redaction, citations, content-integrity checks, and tamper-evident audit logging.31MIT