Persistent memory for Claude Code — local or VPS
Project description
SecBrain
Persistent memory for Claude Code — local or VPS.
SecBrain gives Claude Code a long-term memory vault that persists across sessions. Install it once globally, run secbrain init in any project, and Claude will automatically remember bugs, features, decisions, and learned patterns.
Install
pip install secbrain -q
Quick Start
# In any project directory
cd my-project
secbrain init
The wizard will:
- Ask where your vault lives (local
~/.secbrain/vaultor remote VPS) - Deploy the MCP server (locally or via SSH)
- Register the current project
- Inject
CLAUDE.mdinstructions and.mcp.jsonMCP config - Install Claude Code session hooks
Then start a Claude Code session — memory is active automatically.
Commands
| Command | Description |
|---|---|
secbrain init |
Full setup wizard |
secbrain connect [name] |
Connect current directory to a vault project |
secbrain projects |
List all vault projects |
secbrain status |
Show server health and current project |
secbrain start |
Start local vault server |
secbrain stop |
Stop local vault server |
secbrain logs [project] |
Show session log |
secbrain bugs [project] |
Show known bugs |
secbrain deploy |
(Re)deploy server to VPS |
secbrain eject |
Remove SecBrain from current project |
secbrain skills |
List learned skills |
secbrain skills search <query> |
Search skills |
secbrain skills show <name> |
Show a skill |
What Gets Stored
~/.secbrain/vault/
├── _system/
│ ├── log.md ← all session start/end events
│ └── entities.db ← SQLite knowledge graph
├── projects/{name}/
│ ├── overview.md ← project summary
│ ├── bugs.md ← logged bugs
│ ├── features.md ← logged features
│ ├── decisions.md ← architectural decisions
│ ├── sessions.md ← session summaries
│ └── user_model.md ← learned user preferences
├── skills/
│ ├── global/ ← cross-project reusable patterns
│ └── {project}/ ← project-specific patterns
├── raw/ ← knowledge ingestion staging
└── wiki/ ← processed topic wikis
MCP Tools Available to Claude
| Tool | When to call |
|---|---|
vault_start_session(project, cwd) |
Automatically via hook at session start |
vault_end_session(project, summary) |
At end of session |
vault_log_bug(project, title, description, severity) |
When discovering a bug |
vault_log_feature(project, title, description, status) |
When implementing a feature |
vault_log_decision(project, title, rationale) |
When making an arch decision |
vault_recall(project, query) |
Search everything |
vault_update_overview(project, overview) |
Update project description |
vault_save_skill(...) |
After solving something non-obvious |
vault_recall_skill(query, project) |
Before starting complex tasks |
vault_improve_skill(project, skill_name, refinement) |
When a skill gets better |
vault_update_user_model(project, observation) |
When noticing user patterns |
vault_read(path) |
Read any vault file |
vault_write(path, content) |
Write any vault file |
vault_list(path) |
List vault directory |
vault_list_projects() |
List all projects |
VPS Deploy
secbrain init
# Select "VPS" → enter user@host → confirm deploy
SecBrain installs itself on the VPS via pip and runs as a systemd service on port 8765.
Multiple Projects
cd ~/other-project
secbrain connect
# Select existing project or create new
Development
git clone ...
cd secbrain
pip install -e ".[dev]"
Requirements
- Python 3.10+
- Claude Code with MCP support
- For VPS: SSH access + pip on remote
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file secbrain-0.1.6.tar.gz.
File metadata
- Download URL: secbrain-0.1.6.tar.gz
- Upload date:
- Size: 28.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ad8ecea5e1f8d6e86f6a5b8619592f7edf1beddc8db036942bf46b25f4ae8e2
|
|
| MD5 |
8898ca0d1c98450216db66cc46f72240
|
|
| BLAKE2b-256 |
3f6a3658c9ac13cbf41dcca454452af698150ef01eedefc25e3bad0616414d43
|
Provenance
The following attestation bundles were made for secbrain-0.1.6.tar.gz:
Publisher:
publish.yml on KoodosBots/SecBrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
secbrain-0.1.6.tar.gz -
Subject digest:
6ad8ecea5e1f8d6e86f6a5b8619592f7edf1beddc8db036942bf46b25f4ae8e2 - Sigstore transparency entry: 1244710512
- Sigstore integration time:
-
Permalink:
KoodosBots/SecBrain@024d979d10d91e8521ab62b38835001c5d6c722f -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/KoodosBots
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@024d979d10d91e8521ab62b38835001c5d6c722f -
Trigger Event:
push
-
Statement type:
File details
Details for the file secbrain-0.1.6-py3-none-any.whl.
File metadata
- Download URL: secbrain-0.1.6-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08b4e4c19765e2c386e3e57a7ec6790b16755bdf9c2dbe5399fbab5b3349bb10
|
|
| MD5 |
fa9eccf145fbbe8d8fc998bbb6007f35
|
|
| BLAKE2b-256 |
36542421206cdd6e9fb197f2883263d2c12978426668656b3cb0235acf24fd5a
|
Provenance
The following attestation bundles were made for secbrain-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on KoodosBots/SecBrain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
secbrain-0.1.6-py3-none-any.whl -
Subject digest:
08b4e4c19765e2c386e3e57a7ec6790b16755bdf9c2dbe5399fbab5b3349bb10 - Sigstore transparency entry: 1244710549
- Sigstore integration time:
-
Permalink:
KoodosBots/SecBrain@024d979d10d91e8521ab62b38835001c5d6c722f -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/KoodosBots
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@024d979d10d91e8521ab62b38835001c5d6c722f -
Trigger Event:
push
-
Statement type: