Skip to content

Repository files navigation

mnemolith logo

CI codecov Security Review

Your knowledge base. Shared with your AI. Owned by you.

Why mnemolith?

Every insight you build with an AI assistant — research, decisions, context about your life and work — lives in a chat history. It stays frozen there: you can scroll back and search, but you can't edit it, restructure it, or correct it. And if you switch providers, you start from zero.

Mnemolith turns conversations into knowledge you actually own.

Ask Claude to save a discussion and it becomes a structured markdown note in your Obsidian vault — something you can read, edit, reorganize, and link to other notes. A new bit of knowledge for your future self.

You and Claude share the same knowledge base. You write notes, Claude reads them. Claude writes notes, you read them. When you ask Claude a question, you know exactly where the answer came from.

  • Semantic search — index your markdown notes into a vector database and find them by meaning, not just keywords. Choose between pgvector (simpler, one database for everything) and Qdrant (dedicated vector DB).
  • Structured data — store todo lists, habit trackers, portfolios, and anything tabular in PostgreSQL. Just tell Claude what you want and it will create the necessary tables.
  • Save conversations as notes — ask Claude to save any discussion to your vault. Context that matters survives the session.
  • MCP integration — Claude (Desktop or Code) searches both backends in a single conversation, bridging prose and data automatically. Claude can also re-index the vault on request, so a note you just wrote is searchable immediately.
  • You own everything — notes stay as plain markdown files, data lives in a local Postgres you can inspect with CloudBeaver, and backups are a single CLI command.
Obsidian vault (.md) → Indexing script → Embedding API → Vector store
                                                              ↑
Claude ← MCP server (mnemolith-mcp) ─────────────────────────┤
                                                              ↓
                                                   PostgreSQL (Docker)
                                                   (structured data)
                                                         ↑
                                                   CloudBeaver (Docker)
                                                   (web UI, port 8978)

Vector store is one of:
  • pgvector  — vectors in PostgreSQL (VECTOR_BACKEND=pgvector)
  • Qdrant   — dedicated vector DB  (VECTOR_BACKEND=qdrant, default)

Documentation

When to use PostgreSQL vs Obsidian

Mnemolith has two backends — use the right one for the job:

Data type Where Example
Structured: fields, states, numbers PostgreSQL table Portfolio holdings, habit tracker, todo list
Unstructured: prose, research, thinking Obsidian note Company research, meeting notes, journal

You don't need foreign keys between them. Claude bridges both backends at query time. For example, if you track ASML in a PG companies table and write investment research in Companies/ASML.md, asking Claude "what's my thesis on ASML?" will pull from both sources automatically.

Resist the urge to add a notes table in PG — that's what your vault is for.

Prerequisites

  • Python 3.13+
  • uv
  • Docker (for PostgreSQL and optionally Qdrant)
  • An OpenAI API key

Development

uv sync                                                                        # install deps
docker compose up -d                                                           # start services
uv run pytest -m "not integration and not pg_integration and not pgvector_integration" # unit tests only
uv run pytest                                                                  # all tests (requires Docker services)

Project structure

src/mnemolith/
    config.py         # Environment variable handling
    main.py           # CLI entry point (index, search, backup, restore)
    backup.py         # Backup and restore (pg_dump + vector store snapshots)
    parser.py         # Obsidian-aware markdown parser (frontmatter, wiki-links, tags)
    embeddings.py     # Embedding provider abstraction (OpenAI)
    indexer.py        # Vault indexing pipeline
    vector_store.py   # VectorStore protocol and factory
    qdrant_store.py   # Qdrant backend
    pgvector_store.py # pgvector backend (vectors in PostgreSQL)
    pg_store.py       # PostgreSQL structured data store
    mcp_server.py     # MCP server exposing search, indexing + SQL tools to Claude
tests/
    fixtures/vault/  # Sample markdown notes for testing
.claude-plugin/
    plugin.json      # Claude Code plugin manifest
skills/
    obsidian-notes/
        SKILL.md     # Note creation skill for Claude Code
docs/                # User documentation

Roadmap

License

MIT

About

Your thoughts, carved in stone. Use obsidian as a second brain for your AI assistants

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages