BrainMemory-MCP — a Model Context Protocol server exposing Cognitive memory tools over HTTP + SSE.
Project description
BrainMemory-MCP
A Model Context Protocol (MCP) server that gives AI/LLM agents a durable brain memory — the ability to store, recall, search, summarize, and forget information across sessions through standardized MCP tool calls.
The server speaks MCP over HTTP + Server-Sent Events (SSE), so remote
MCP-capable clients (Claude, IDE agents, etc.) can connect over the network.
Memory is persisted locally under ~/.brainmemory-mcp (a SQLite database).
Cognitive Tools
| Tool | Description |
|---|---|
store_memory |
Persist a new memory (content, category, tags, importance). |
recall_memory |
Fetch a single memory by its id. |
search_memory |
Find memories by free text, category, tags and/or importance. |
list_memories |
List stored memories (most important & recent first). |
update_memory |
Modify an existing memory (only supplied fields change). |
forget_memory |
Delete a memory by id. |
summarize_memories |
Summary statistics: totals, categories, top tags. |
A read-only resource brainmemory://stats exposes the same summary as JSON.
Install
From PyPI (once published):
python3 -m pip install brainmemory-mcp
From a local checkout:
python3 -m pip install .
Both install the package and a console script named brainmemory-mcp.
For development (editable install):
python3 -m pip install -e ".[dev]"
To build/publish a release, see docs/RELEASING.md.
Run
# Defaults: 127.0.0.1:8765, memory in ~/.brainmemory-mcp
brainmemory-mcp
# Custom host/port and memory location
brainmemory-mcp --host 0.0.0.0 --port 9000 --data-dir /path/to/memory
# Or without the console script
python3 -m brainmemory_mcp
Endpoints once running:
- SSE stream:
http://<host>:<port>/sse - Message POST:
http://<host>:<port>/messages/
Configuration
| Option | Env var | Default |
|---|---|---|
--host |
BRAINMEMORY_HOST |
127.0.0.1 |
--port |
BRAINMEMORY_PORT |
8765 |
--data-dir |
BRAINMEMORY_HOME |
~/.brainmemory-mcp |
Connect a client
Point any MCP client that supports SSE at the /sse endpoint. Example client
configuration (URL-based transport):
{
"mcpServers": {
"brainmemory": {
"url": "http://127.0.0.1:8765/sse"
}
}
}
How memory is stored
Memories live in ~/.brainmemory-mcp/memory.db (SQLite, WAL mode). Each memory
has: id, content, category, tags, importance (1–5), created_at,
updated_at. Nothing is ever silently deleted — removal only happens through
forget_memory.
License
MIT
Project details
Release history Release notifications | RSS feed
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 brainmemory_mcp-0.1.0.tar.gz.
File metadata
- Download URL: brainmemory_mcp-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
85a0c6767491fb3efd86c62b83399a74f745e188746394a8849be049667f8b38
|
|
| MD5 |
e57f4c5c244fd9e8be8adebac7616adb
|
|
| BLAKE2b-256 |
d686d1376b3a3f834e586c9679b21f26956f8d5b17f13cbfd533882a156a05c0
|
File details
Details for the file brainmemory_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: brainmemory_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c38ac9e8ea18f36989b5bd7164e5bb8fc3306da2f5c56432cf6ae92b82f29fbc
|
|
| MD5 |
a6280133875856a937d7c1869b893d1f
|
|
| BLAKE2b-256 |
0b9f0f40e54e03e6571410d40ce036d23ec36b3e1ae6a7e72b9c70cedbcf20e9
|