Skip to main content
Glama

memex

npm license node

Local-first second brain with semantic search. Stores notes as Markdown files and indexes them with a local ML model — no cloud, no API keys.

Works as an MCP server for Claude Code and Claude Desktop, and as a standalone CLI.


Features

  • Semantic search — multilingual embeddings via paraphrase-multilingual-MiniLM-L12-v2 (Korean + English, runs fully offline)

  • Obsidian-compatible — notes saved as .md files in your vault directory

  • MCP server — Claude can save and search your second brain mid-conversation

  • CLI — add, search, list, show, delete notes from the terminal

  • Local DB — SQLite + sqlite-vec stored inside the vault at .memex/memex.db


Install

npm install -g @evan-moon/memex

On first run the embedding model (~120MB) is downloaded once to ~/.memex/models/.


CLI

memex add                                   # interactive prompt
memex add --title "Note title" --content "..." 
memex add --title "Note title" --file ./note.md
memex add --title "Note title" --content "..." --folder "projects/memex"

memex list                                  # recent 10 notes
memex list --limit 20

memex search "semantic search query"        # multilingual
memex search "지식 관리" --limit 10

memex show <id>
memex delete <id>
memex delete --yes <id>                     # skip confirmation

memex config show
memex config set vault-path ~/Documents/Second\ Brain

memex mcp install                           # register with Claude Code
memex mcp path                              # print MCP binary path

MCP server

Claude Code

memex mcp install

Or manually:

claude mcp add memex -- node "$(memex mcp path)"

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "memex": {
      "command": "node",
      "args": ["<path from `memex mcp path`>"]
    }
  }
}

Available tools

Tool

Description

save_note

Save a note (title + markdown content + optional folder)

search_notes

Semantic search across all notes

list_notes

List recent notes

get_note

Get full content of a note by ID

delete_note

Delete a note by ID


Configuration

Config is stored at ~/.memex/config.json.

Key

Default

Description

vault_path

~/Documents/Second Brain

Directory where .md files are saved

memex config set vault-path ~/my-vault

Architecture

~/.memex/
  config.json       — vault path and settings
  models/           — cached embedding model

<vault>/
  *.md              — notes (Obsidian-compatible)
  .memex/
    memex.db        — SQLite DB (notes table + sqlite-vec embeddings)

Monorepo packages:

Package

Role

@memex/db

SQLite schema, drizzle queries, sqlite-vec integration

@memex/embed

Local embedder via @huggingface/transformers

@memex/utils

Config, path helpers, shared utilities

@memex/mcp

MCP server (bundled into CLI dist)


License

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/evan-moon/memex'

If you have feedback or need assistance with the MCP directory API, please join our Discord server