Shared brain for your AI agents: self-hosted knowledge + task backbone for Claude, ChatGPT & any MCP client. Git-versioned Markdown, atomic task claims, ACL, audit. Zero dependencies.
Python
0
9 commits
updated Oct 6, 2026
A shared brain for your AI agents — and for the humans who work with them.
Brainy is a self-hosted knowledge and task backbone that Claude, ChatGPT and any other MCP-capable AI connect to through one controlled endpoint. Every agent reads the same knowledge, works on the same task list and leaves an audit trail — so your AIs can hand work to each other instead of living in separate chat silos.
ChatGPT ─┐ ┌─ Git-versioned knowledge (Markdown)
Claude ─┼──► MCP endpoint ──► Brainy ───┼─ Tasks with atomic claim/lease
Your bot ┘ (OAuth / tokens) ACL+Audit └─ Spaces, roles, append-only audit log
▲
Humans: web admin UI (+ optional Telegram approvals)
| Area | What you get |
|---|---|
| Knowledge | list_documents, get_document, search_knowledge, write_document (optimistic concurrency via Git commit), append_document, propose_write |
| Tasks | create_task, claim_task, renew_claim, complete_task, fail_task, release_task, dependencies, priorities, review/approve/reject |
| Access | Spaces (tenants/areas), roles ADMIN / EDITOR / AGENT / READER, per-space ACL, service tokens, OAuth 2.1 (for Claude/ChatGPT remote connectors) |
| Operations | Web admin UI, audit log, agent registry + dispatcher framework, backup & verified restore scripts |
Prebuilt image (published on every release):
docker run -d --name brainy -p 127.0.0.1:8765:8765 -v brainy-data:/data ghcr.io/memokar/brainy:latest
docker logs brainy # prints your one-time ADMIN token on first start
Or build it yourself with Compose:
git clone https://github.com/memokar/brainy.git
cd brainy
docker compose up -d
docker compose logs brainy # prints your one-time ADMIN token on first start
Brainy now listens on http://127.0.0.1:8765 (MCP endpoint: /mcp, admin UI: /admin — log in
with the token). For remote AI connectors put it behind HTTPS (see
deploy/nginx-brainy.conf.example) and set BRAINY_PUBLIC_BASE_URL.
export BRAINY_DB_PATH=$PWD/data/brainy.db
export BRAINY_KNOWLEDGE_ROOT=$PWD/data/knowledge
export BRAINY_WEB_SESSION_KEY=$PWD/data/web_session.key
cp -r examples/knowledge "$BRAINY_KNOWLEDGE_ROOT"
git -C "$BRAINY_KNOWLEDGE_ROOT" init -q && git -C "$BRAINY_KNOWLEDGE_ROOT" add -A \
&& git -C "$BRAINY_KNOWLEDGE_ROOT" commit -qm "initial knowledge"
python3 scripts/bootstrap.py "$BRAINY_DB_PATH" --with-token # prints ADMIN token once
python3 scripts/init_prod_db.py "$BRAINY_DB_PATH" # seeds default spaces
python3 scripts/serve.py
claude mcp add --transport http brainy http://127.0.0.1:8765/mcp --header "Authorization: Bearer <token>"
{"mcpServers": {"brainy": {"command": "python3", "args": ["/opt/brainy/scripts/stdio.py"],
"env": {"BRAINY_DB_PATH": "/var/lib/brainy/brainy.db",
"BRAINY_KNOWLEDGE_ROOT": "/opt/brainy-knowledge", "BRAINY_TOKEN": "<token>"}}}}
Try it without any setup: python3 scripts/stdio.py --demo (temporary data, deleted on exit).https://<your-host>/mcp, header
Authorization: Bearer <service token>./.well-known/oauth-authorization-server). Set BRAINY_PUBLIC_BASE_URL to your HTTPS URL.Brainy is listed in the official MCP Registry as
io.github.memokar/brainy.
Give each AI its own principal (e.g. claude, chatgpt) with role AGENT and only the spaces it
needs. Every action then shows up in the audit log under that name.
All configuration comes from environment variables — see .env.example.
Secrets (tokens, keys) are never stored in the repository or the knowledge base.
The core ships a worker plugin interface and a deterministic MockWorker. Real workers that let
agents execute tasks autonomously (e.g. Claude Code, Codex) are separate extensions loaded via
BRAINY_WORKER_PLUGINS. See docs/extensions.md.
for t in tests/test_*.py; do python3 "$t" || exit 1; done
Brainy runs in production for its author. Current limitations:
Copyright (C) 2026 Mehmet Karakolcu
Brainy is dual-licensed:
Contributions require agreeing to the Contributor License Agreement.
Shared brain for your AI agents: self-hosted knowledge + task backbone for Claude, ChatGPT & any MCP client. Git-versioned Markdown, atomic task claims, ACL, audit. Zero dependencies.
Python
0
9 commits
updated Oct 6, 2026
A shared brain for your AI agents — and for the humans who work with them.
Brainy is a self-hosted knowledge and task backbone that Claude, ChatGPT and any other MCP-capable AI connect to through one controlled endpoint. Every agent reads the same knowledge, works on the same task list and leaves an audit trail — so your AIs can hand work to each other instead of living in separate chat silos.
ChatGPT ─┐ ┌─ Git-versioned knowledge (Markdown)
Claude ─┼──► MCP endpoint ──► Brainy ───┼─ Tasks with atomic claim/lease
Your bot ┘ (OAuth / tokens) ACL+Audit └─ Spaces, roles, append-only audit log
▲
Humans: web admin UI (+ optional Telegram approvals)
| Area | What you get |
|---|---|
| Knowledge | list_documents, get_document, search_knowledge, write_document (optimistic concurrency via Git commit), append_document, propose_write |
| Tasks | create_task, claim_task, renew_claim, complete_task, fail_task, release_task, dependencies, priorities, review/approve/reject |
| Access | Spaces (tenants/areas), roles ADMIN / EDITOR / AGENT / READER, per-space ACL, service tokens, OAuth 2.1 (for Claude/ChatGPT remote connectors) |
| Operations | Web admin UI, audit log, agent registry + dispatcher framework, backup & verified restore scripts |
Prebuilt image (published on every release):
docker run -d --name brainy -p 127.0.0.1:8765:8765 -v brainy-data:/data ghcr.io/memokar/brainy:latest
docker logs brainy # prints your one-time ADMIN token on first start
Or build it yourself with Compose:
git clone https://github.com/memokar/brainy.git
cd brainy
docker compose up -d
docker compose logs brainy # prints your one-time ADMIN token on first start
Brainy now listens on http://127.0.0.1:8765 (MCP endpoint: /mcp, admin UI: /admin — log in
with the token). For remote AI connectors put it behind HTTPS (see
deploy/nginx-brainy.conf.example) and set BRAINY_PUBLIC_BASE_URL.
export BRAINY_DB_PATH=$PWD/data/brainy.db
export BRAINY_KNOWLEDGE_ROOT=$PWD/data/knowledge
export BRAINY_WEB_SESSION_KEY=$PWD/data/web_session.key
cp -r examples/knowledge "$BRAINY_KNOWLEDGE_ROOT"
git -C "$BRAINY_KNOWLEDGE_ROOT" init -q && git -C "$BRAINY_KNOWLEDGE_ROOT" add -A \
&& git -C "$BRAINY_KNOWLEDGE_ROOT" commit -qm "initial knowledge"
python3 scripts/bootstrap.py "$BRAINY_DB_PATH" --with-token # prints ADMIN token once
python3 scripts/init_prod_db.py "$BRAINY_DB_PATH" # seeds default spaces
python3 scripts/serve.py
claude mcp add --transport http brainy http://127.0.0.1:8765/mcp --header "Authorization: Bearer <token>"
{"mcpServers": {"brainy": {"command": "python3", "args": ["/opt/brainy/scripts/stdio.py"],
"env": {"BRAINY_DB_PATH": "/var/lib/brainy/brainy.db",
"BRAINY_KNOWLEDGE_ROOT": "/opt/brainy-knowledge", "BRAINY_TOKEN": "<token>"}}}}
Try it without any setup: python3 scripts/stdio.py --demo (temporary data, deleted on exit).https://<your-host>/mcp, header
Authorization: Bearer <service token>./.well-known/oauth-authorization-server). Set BRAINY_PUBLIC_BASE_URL to your HTTPS URL.Brainy is listed in the official MCP Registry as
io.github.memokar/brainy.
Give each AI its own principal (e.g. claude, chatgpt) with role AGENT and only the spaces it
needs. Every action then shows up in the audit log under that name.
All configuration comes from environment variables — see .env.example.
Secrets (tokens, keys) are never stored in the repository or the knowledge base.
The core ships a worker plugin interface and a deterministic MockWorker. Real workers that let
agents execute tasks autonomously (e.g. Claude Code, Codex) are separate extensions loaded via
BRAINY_WORKER_PLUGINS. See docs/extensions.md.
for t in tests/test_*.py; do python3 "$t" || exit 1; done
Brainy runs in production for its author. Current limitations:
Copyright (C) 2026 Mehmet Karakolcu
Brainy is dual-licensed:
Contributions require agreeing to the Contributor License Agreement.