Brainstem
Local-first knowledge backend for AI agents.
Connect any MCP host — Claude Code, Cursor, or your own agent harness — to a personal knowledge engine: an Obsidian-compatible wiki with indexed retrieval, token-budgeted memory recall, and secure ingestion. Your agents get quality context; you keep your knowledge on your machine.
┌────────────┐ MCP (stdio/sse) ┌───────────────────────────────┐
│ Your agent │ ◄─────────────────► │ Brainstem │
│ (Claude │ 27 tools │ · search + read + write wiki │
│ Code, │ (12 read-only) │ · memory tree recall (BM25 + │
│ Cursor…) │ │ vectors, token-budgeted) │
└────────────┘ │ · code graph over your repos │
│ · vault = plain Markdown │
└───────────────────────────────┘
Install
# Run without installing (recommended)
uvx brainstem-mcp init
# Or install
pip install brainstem-mcp
brainstem init
brainstem init creates a vault at ~/.brainstem/vault (override with
--root) and prints the exact one-liner to connect your agent:
claude mcp add brainstem -- uvx brainstem-mcp mcp --root ~/.brainstem/vault
That's it. No API key is required to serve, search, and read — your agent brings its own model.
Docker
docker build -t brainstem .
docker run -i -v ~/.brainstem/vault:/vault brainstem # stdio
docker run -p 8765:8765 -v ~/.brainstem/vault:/vault brainstem \
mcp --root /vault --transport sse # sse
What your agent can do
- Search & read —
search_wiki_index,read_wiki_file, cross-references, orphan detection over a plain-Markdown Obsidian-compatible vault. - Remember & recall — a hierarchical memory tree with BM25 + vector search
and token-budgeted
memory_tree_recall, built for agent context windows. - Write knowledge — structured pages with YAML frontmatter, index upkeep, supersession instead of duplication.
- Understand code — ingest a repository and query its architecture
(
ask_repo, code-graph overview/impact) as part of your agent's context.
Read-only profile
Expose only the 12 safe read tools (no writes, no publishing):
brainstem mcp --readonly
Security posture
Brainstem treats everything it ingests as untrusted input: ingested content cannot trigger writes or publishing on its own, and outbound actions are draft-only by design. The vault is plain Markdown on your disk — no cloud, no telemetry, single-tenant by architecture.
Brainstem vs. OpenWiki
OpenWiki generates documentation that agents read as files. Brainstem is a live backend: your agent queries an indexed knowledge base through MCP tools at run time — retrieval, memory, and ingestion as part of the harness, not a batch-generated artifact.
License
MIT
Metadata
Release files for brainstem-mcp 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brainstem_mcp-0.3.1.tar.gz | 407.2 kB | Without provenance | Details for brainstem_mcp-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brainstem_mcp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for brainstem_mcp-0.3.1-py3-none-any.whl |
Total release size: 892.6 kB
Release files / brainstem_mcp-0.3.1.tar.gz
| Download URL | brainstem_mcp-0.3.1.tar.gz |
|---|---|
| Size | 407.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
204d019b3535875b9dd479f6d144aa7b96659b04a63370a60e6a98dec97dbea9
|
|
BLAKE2b-256 checksum How to use checksums |
8b858391540fb8eeedbcd63a7a44dd27c3d48db53c9b14479d8f2981a68e5c65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / brainstem_mcp-0.3.1-py3-none-any.whl
| Download URL | brainstem_mcp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 485.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d04aa2343d7c7c7559b73b86f22132be562dcd87582924c817f696aa7a25ff0c
|
|
BLAKE2b-256 checksum How to use checksums |
27db88d41265ad5616c9995ba91180775843de9f039daefe071203ceda8db9d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for brainstem-mcp 0.3.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.