Skip to main content

Brain

License: FSL-1.1-Apache-2.0 Python 3.10+ Status: Beta MCP server

Engineering memory for AI coding agents. Brain captures the decisions, rules and past failures in your repository on every push, keeps them in git next to your code, and hands them to your agent (Claude Code, Cursor, Copilot, Windsurf, Cline) before it edits a file.

Deterministic by default: no LLM, API key or network needed. Nothing leaves your machine.

Try it in your browser: try.brainledger.solutions

Install

pipx install brain-neural-core      # or: pip install brain-neural-core
brain setup                         # wire your repos, seed memory, check your agent can reach Brain

Then restart your editor and approve the project-brain server when it asks. brain doctor confirms the connection with a real handshake.

What it does

  • Captures on every push and merge, from your commits and code: decisions, constraints, business rules, past failures, trade-offs, intents and technical debt.
  • Serves each file's rules to your agent before it edits that file, over MCP, and writes them to AGENTS.md for agents without MCP.
  • Asks a person. Uncertain items, and anything that contradicts a settled decision, wait in brain review. Accepting a replacement records what changed, when and by whom.
  • Learns from every change. Agents end their commits and pull requests with a short ## Brain notes block (decisions, rules, dos and don'ts); Brain captures it for review.
  • Stays local. Memory is plain JSON in your repository. Secrets are scrubbed before anything is stored. What Brain does is logged on your machine only, and nothing is sent anywhere.

Commands

Command What it does
brain setup Check the machine, wire repositories, verify an agent can reach Brain
brain init Wire the current repository (hooks and editor config); run once per clone
brain doctor Verify the setup, with a real MCP handshake
brain status What Brain knows about this repository
brain review Accept or reject captured memory
brain search <words> Search the memory
brain context --file <path> Show what your agent receives for a file
brain forget <text-or-id> Remove a wrong item so it does not come back
brain value What Brain has actually changed for you
brain upgrade Check what an upgrade needs and print the exact command
brain uninstall Remove Brain's wiring from a repository; memory is kept

brain --help lists the rest.

Optional extras: [anthropic], [openai], [google] or [groq] add an LLM enrichment pass (brain init --llm, with your own key). [docs] reads .docx and .pdf files at push, not by brain bootstrap.

If your agent does not see Brain

  • Restart, then authorise. An agent's tools are fixed when a session starts, so reopen the editor (or start a new agent session) after brain setup. Then authorise the server: in Claude Code, accept the prompt to trust the project; in Cursor, Windsurf or Cline, enable project-brain in the MCP settings.
  • Where the config is. brain init writes .mcp.json (Claude Code), .cursor/mcp.json, .windsurf/mcp.json and .cline/mcp_settings.json, each holding the absolute path of brain-mcp-server on this machine, so git ignores them. If Claude Code never offers the server: claude mcp add project-brain brain-mcp-server -e "BRAIN_REPO_ROOT=/path/to/your-repo", then claude mcp list.
  • After a reboot there is nothing to restart: the server is not a background service, and your editor starts it on demand. What breaks the link is moving the executable (pipx reinstall, a Python upgrade, switching between pip and pipx): run brain init again, then brain doctor.
  • Is capture running? brain doctor reports capture is running, capture is STALE (commits landed without it) or capture never ran here, which is expected in a fresh clone because git hooks are never cloned: run brain init there.

On a team

Memory is committed, so everyone shares it through git pull and git push. Git does not clone hooks, so each teammate runs brain init once in their clone. Keep everyone on one version (pipx install brain-neural-core==<version>) and upgrade together.

Status

Beta. Capture, conflict handling and MCP serving are in daily use and tested on Windows and Linux. Extraction is not perfect: expect to prune the occasional item with brain review or brain forget, and please report anything that looks wrong.

License

Source-available under FSL-1.1-Apache-2.0 (SPDX: FSL-1.1-ALv2): free for internal and most uses. The full text ships as LICENSE.md inside the package.

Metadata

Release files for brain-neural-core 1.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brain-neural-core 1.0.11
File Size Uploaded Provenance Actions
brain_neural_core-1.0.11.tar.gz 462.7 kB With provenance Details for brain_neural_core-1.0.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for brain-neural-core 1.0.11
File Interpreter ABI Platform Actions
brain_neural_core-1.0.11-py3-none-any.whl Python 3 none any Details for brain_neural_core-1.0.11-py3-none-any.whl

Total release size: 970.7 kB

Release files / brain_neural_core-1.0.11.tar.gz

Download URL brain_neural_core-1.0.11.tar.gz
Size 462.7 kB
Tags Source
SHA-256 checksum
How to use checksums
149fcc78d6ba0d5dfae015b313cf341510e9a7042d8b2257b043ae82440928cc
BLAKE2b-256 checksum
How to use checksums
f821e43e44234ea1ea6c38a9d0fc28419bfe88ebe81a2548bfe37162943a9371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / brain_neural_core-1.0.11-py3-none-any.whl

Download URL brain_neural_core-1.0.11-py3-none-any.whl
Size 507.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9976ede04a7efb44925988f3e6843ad42820f976743ced3d2b2acdf6542317f
BLAKE2b-256 checksum
How to use checksums
bd57c62dd7b163f97d028b85e8702b8f0cf17570c26684c3fc0e02b6423d8f34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for brain-neural-core 1.0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for brain_neural_core-1.0.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page