{"id":"fc162d98-a9d7-4888-9406-95318d8b41e6","slug":"bookmark-memex","kind":"mcp","name":"bookmark-memex","summary":"Personal bookmark archive for the memex ecosystem: SQLite + FTS5 + MCP server, with content caching, soft delete, marginalia, and cross-archive URIs","owner":"queelius","repoUrl":"https://github.com/queelius/bookmark-memex","license":"MIT","licenseTier":"permissive","trust":"community","stars":1,"match":null,"fewStars":true,"format":"mcp","createdAt":"2025-01-19T00:25:09.000Z","addedAt":"2026-10-21T07:49:54.284Z","logoUrl":"https://avatars.githubusercontent.com/u/1896674?u=6587940788bffeb483bbcdf330ab73ac22e8e985&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["databases","search","cloud-infra"],"tags":["bookmark-manager","bookmarks","cli","command-line-tool","database","full-text-search","python","sqlite"],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-21T07:50:02.587Z","sample":false,"url":"https://conduits.dev/tools/bookmark-memex","language":"HTML","transports":["stdio"],"install":{"pypi":"bookmark-memex"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# bookmark-memex\n\nA personal bookmark archive: a database-first bookmark manager with full-text\nsearch, content caching, and an MCP server for LLM agents. Part of the\n`*-memex` personal-data ecosystem (see `../CLAUDE.md`).\n\nThis is a clean break from the older `btk` / `bookmark-tk` project; the package,\nCLI, and repo are all named `bookmark-memex`.\n\n## Features\n\n- SQLite + FTS5 backend with soft delete (`archived_at`)\n- Durable content-derived IDs: `unique_id = sha256(normalize(url))[:16]`,\n  stable across re-imports\n- Cross-archive URIs: `bookmark-memex://bookmark/<unique_id>`,\n  `bookmark-memex://marginalia/<uuid>`\n- Import from HTML (Netscape), JSON, CSV, Markdown, and plain text\n- Export to JSON, CSV, Markdown, text, m3u, and arkiv JSONL\n- Content caching (zlib-compressed HTML/markdown) with FTS5 search\n- Media auto-detection (YouTube, ArXiv, GitHub built-in; user detectors\n  override)\n- Marginalia (free-form notes) with orphan survival via `ON DELETE SET NULL`\n- MCP server exposing `execute_sql`, `get_schema`, `get_record`, `mutate`,\n  `import_bookmarks`, and `export_bookmarks`\n\n## Installation\n\n```sh\npip install bookmark-memex\n# development\nmake install-dev   # creates .venv/ with dev deps\n```\n\nPython >= 3.10.\n\n## CLI\n\n```sh\nbookmark-memex import <file> [--format html|json|csv|markdown|text]\nbookmark-memex export <path> [--format json|csv|markdown|text|m3u|arkiv] [--single]\nbookmark-memex db info | schema | vacuum\nbookmark-memex sql \"SELECT title, url FROM bookmarks LIMIT 10\" [-o table|json|csv]\nbookmark-memex mcp [--transport stdio|sse]\n```\n\nConfiguration is resolved (highest wins): CLI `--db` flag, `BOOKMARK_MEMEX_*`\nenv vars, local `./bookmark-memex.toml`, user\n`~/.config/bookmark-memex/config.toml`, XDG defaults\n(`~/.local/share/bookmark-memex/bookmarks.db`).\n\n## MCP server\n\n`bookmark-memex mcp` starts a stdio MCP server. Query happens through MCP, not\nthe CLI: `execute_sql` (read-only: SELECT/WITH/EXPLAIN), `get_schema`, and\n`get_record(kind, id)` for URI resolution; `mutate` runs a batch of write ops\n(`add`, `update`, `delete`, `tag`, `restore`, plus the marginalia ops). Bookmark\nops accept the durable `unique_id` (preferred) or the integer `id`.\n\n```json\n{\"mcpServers\": {\"bookmark-memex\": {\"command\": \"bookmark-memex\", \"args\": [\"mcp\"]}}}\n```\n\n## Schema\n\nCore tables: `bookmarks` (durable `unique_id`, `url`, title, type, `added`,\n`visit_count`, `starred`, `pinned`, reachability, `media`/`extra_data` JSON,\n`archived_at`), `bookmark_sources` (import provenance), `tags` (hierarchical)\nplus `bookmark_tags`, `content_cache`, `marginalia`, `history_urls` plus\n`history_visits`, `events`, `schema_version`. Plus FTS5 virtual tables\n`bookmarks_fts`, `content_fts`, `marginalia_fts`.\n\n## Testing\n\n```sh\npytest -k \"test_bm_\" -v        # all bookmark-memex tests\nmake check                     # lint + typecheck\n```\n\nSee `CLAUDE.md` for architecture, design patterns, and the full ecosystem\ncontract.\n"}