2024-12-11 21:24:41 -06:00
2024-12-11 19:49:34 -06:00
2024-12-05 11:13:21 -06:00
2024-12-11 21:24:41 -06:00
2024-12-11 19:49:34 -06:00
2024-12-08 22:16:32 -06:00
2024-12-02 16:53:38 -06:00
2024-12-10 14:22:11 -06:00
2024-12-02 16:40:44 -06:00
2024-12-08 20:00:55 -06:00
2024-12-11 17:55:54 -06:00
2024-12-08 20:00:55 -06:00

basic-memory

Local-first knowledge management system that combines Zettelkasten methodology with knowledge graphs. Built using SQLite and markdown files, it enables seamless capture and connection of ideas while maintaining user control over data.

Features

  • Local-first design using SQLite and markdown files
  • Combines Zettelkasten principles with knowledge graph capabilities
  • Everything readable/writable as markdown
  • Project isolation for focused context
  • Rich querying and traversal through SQLite index
  • Built with Python 3.12, SQLAlchemy, and modern tooling

Development

Setup your development environment:

# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate  # or `.venv/Scripts/activate` on Windows

# Install dependencies including dev tools
pip install -e ".[dev]"

Run tests:

pytest

License

AGPL-3.0-or-later

project info memory store ~/.npm/_npx/15b07286cbcc3329/node_modules/@modelcontextprotocol/server-memory/dist/memory.json

Running locally

See: https://modelcontextprotocol.io/docs/first-server/python#connect-to-claude-desktop

{
  "mcpServers": {
    "basic-memory": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/phernandez/dev/basicmachines/basic-memory",
        "run",
        "src/basic_memory/mcp/server.py"
      ]
    }
  }
}

logs

/Users/phernandez/Library/Logs/Claude/mcp-server-basic-memory.log

MCP quickstart

https://modelcontextprotocol.io/quickstart

Claude Desktop config json /Users/phernandez/Library/Application Support/Claude/claude_desktop_config.json

stdout logging

logs-dir: /Users/phernandez/Library/Logs/Claude

  • mcp-server-sqlite.log
  • mcp.log

To test changes efficiently:

eg.

npx @modelcontextprotocol/inspector uvx mcp-server-sqlite --db-path /Users/phernandez/dev/basicmachines/mcp-quickstart/test.db

tools

Inspector: https://modelcontextprotocol.io/docs/tools/inspector Debugger: https://modelcontextprotocol.io/docs/tools/debugging

dev tools

jq '.allowDevTools = true' ~/Library/Application\ Support/Claude/developer_settings.json > tmp.json \
  && mv tmp.json ~/Library/Application\ Support/Claude/developer_settings.json

Open DevTools: Command-Option-Shift-i

TODO

logs

/Users/phernandez/Library/Logs/Claude/mcp-server-basic-memory.log

2024-12-08 20:32:38.802 | INFO     | __main__:run_server:264 - Starting MCP server basic-memory
The garbage collector is trying to clean up non-checked-in connection <AdaptedConnection <Connection(Thread-2, started daemon 6227046400)>>, which will be dropped, as it cannot be safely terminated.  Please ensure that SQLAlchemy pooled connections are returned to the pool explicitly, either by calling ``close()`` or by using appropriate context managers to manage their lifecycle.
The garbage collector is trying to clean up non-checked-in connection <AdaptedConnection <Connection(Thread-3, started daemon 6243872768)>>, which will be dropped, as it cannot be safely terminated.  Please ensure that SQLAlchemy pooled connections are returned to the pool explicitly, either by calling ``close()`` or by using appropriate context managers to manage their lifecycle.
~

more info about setting log level: https://modelcontextprotocol.io/docs/first-server/python

  • scroll down to logging
basic-memory migrate json /Users/phernandez/.npm/_npx/15b07286cbcc3329/node_modules/@modelcontextprotocol/server-memory/dist/memory.json /Users/phernandez/.basic-memory/projects/default
S
Description
Automated archival mirror of github.com/basicmachines-co/basic-memory
Readme AGPL-3.0 50 MiB
Languages
Python 82.8%
HTML 12.7%
TypeScript 3.6%
Just 0.4%
Shell 0.3%