Skip to content

Releases: ergut/mcp-logseq

v1.8.0

Choose a tag to compare

@ergut ergut released this 19 Jun 11:13
35cf104

Highlights

Networked, secure serving. mcp-logseq can now run as an HTTP service (--transport http) with bearer-token auth, so a sandboxed or remote client can reach Logseq over the network with no filesystem mount or direct Logseq-API access — making the namespace/tag access control a real server-side security boundary. (#69)

Added

  • HTTP/SSE transport with bearer auth (MCP_HTTP_AUTH_TOKEN) (#69)
  • Per-profile multi-instance serving — one process per profile (shared data config + per-process env block + port), --read-only, and tag-on-write guards (#69)
  • Native TLS via --tls-cert/--tls-key, plus a guardrail refusing non-loopback plain-HTTP binds without --insecure (#71)
  • New deployment guide: docs/SERVING.md

Changed

  • sync_vector_db is now inert; the vector DB is owned by a single external logseq-sync writer (#69)

Fixed

  • Block-level results from search (DB mode) and query (tag-only profiles) are resolved to their owning page and filtered by the ACL (#69)
  • The page-exclusion set fails closed when ACL rules are active — search errors rather than returning unfiltered results (#69)

Backward compatible: existing stdio users are unaffected; --transport defaults to stdio.

Full changelog: https://github.com/ergut/mcp-logseq/blob/main/CHANGELOG.md

v1.7.0

Choose a tag to compare

@ergut ergut released this 14 Jun 12:21
e2cdb44

What's New

Added

  • Namespace-based access control — restrict MCP tool access to specific Logseq namespaces via LOGSEQ_INCLUDE_NAMESPACES and LOGSEQ_EXCLUDE_NAMESPACES environment variables (#65)
  • JSON output format for query and search tools — pass format=json to get raw result objects including block UUIDs and page identifiers for deep linking (#56)
  • Configurable API timeout — set LOGSEQ_API_TIMEOUT to override the default 30-second timeout for Logseq API calls (#47)

Fixed

  • create_page now fails on existing pages instead of silently creating numbered duplicates; retries are safe (#59)
  • update_page property handling is now graph-type aware, correctly serializing properties for both file-mode and DB-mode graphs (#62)
  • Inline key:: value properties are now correctly attached to their parent list item instead of being treated as top-level blocks (#61)

Contributors

Thank you to everyone who contributed to this release!

v1.6.3

Choose a tag to compare

@ergut ergut released this 06 Jun 23:16
ea9b186

Bug Fixes

  • Vector tools no longer hang when called via MCP. Tool handlers now run off the event loop, fixing the asyncio/LanceDB deadlock (#44, #54)
  • get_page_backlinks no longer crashes on references whose source page can't be resolved in DB mode (#45, #52)
  • Block properties with list values no longer serialize as Python repr like tags:: ['x'] (#48, #53)
  • Multiline markdown blocks are preserved when creating or updating pages (#50)

Improvements

  • Stage by stage debug timing logs for vector queries, so any platform specific hang can be pinpointed from mcp_logseq.log (#44)
  • vector_db_status counts unique pages with an Arrow aggregation instead of scanning the whole table

Known Issues

  • On file-based graphs, update_page page properties can be appended as a body block due to an upstream Logseq bug. Tracked in #51, upstream report: logseq/logseq#12776

Contributors

Thank you to everyone who contributed to this release!

v1.6.2

Choose a tag to compare

@ergut ergut released this 29 Mar 20:01
7894e4f

What's Changed

  • feat: resolve UUID page references in DB mode (#32)
  • fix: Windows compatibility — replace fcntl with portalocker (#38)
  • feat: add get_block tool (#31)
  • fix: search broken in DB mode (#33)
  • chore: add MIT license and fix newlines in markdown tables (#36)

Contributors

Thank you to everyone who contributed to this release!

  • @arndjan — get_block tool (#31), search fix in DB mode (#33), UUID page reference resolution (#32)

v1.6.1 — Vector Search with LanceDB + Ollama

Choose a tag to compare

@ergut ergut released this 22 Mar 23:55
2f522db

Vector Search — Semantic search for your Logseq notes

This is the biggest feature release since v1.0. Your Logseq notes are now searchable by meaning, not just keywords — powered entirely by local models. No data ever leaves your machine.

Ask things like "What did I write about shadow work?" and find your Jung-related notes, even if they never mention those exact words.

Note: This release supersedes v1.6.0, which was missing the read-only MCP server refactor and several bug fixes. Install 1.6.1 from PyPI.

How it works

  1. Ollama generates embeddings locally (e.g. qwen3-embedding:4b)
  2. LanceDB stores vectors in an embedded database (~3,000 chunks for a 654-page graph)
  3. Hybrid search combines vector similarity + full-text matching with Reciprocal Rank Fusion
  4. Results include relevance labels (high / medium / weak match) so the AI client can judge what's worth presenting

New MCP Tools

Tool Description
vector_search Semantic search with hybrid, vector-only, or keyword-only modes
sync_vector_db Trigger incremental sync or full rebuild
vector_db_status DB stats, staleness, and watcher daemon status

New CLI: logseq-sync

logseq-sync --once      # One-shot incremental sync
logseq-sync --watch     # Continuous sync on file changes
logseq-sync --rebuild   # Drop and re-index from scratch
logseq-sync --status    # Show current DB state

Architecture: Single-Writer, Multi-Reader

The MCP server is a read-only consumer of the vector DB. All writes go through logseq-sync. This makes it safe to run multiple MCP server instances against the same DB (e.g. in containerized setups).

logseq-sync --watch          (single writer)
  └── writes → ~/.logseq-vector/db/

MCP servers (any number)     (read-only)
  └── reads  → ~/.logseq-vector/db/

An inter-process file lock (fcntl.flock) prevents concurrent syncs. State keys use relative paths for cross-mount portability.

Bug fixes over v1.6.0

  • Read-only MCP server — all DB writes delegated to logseq-sync (single-writer principle)
  • Graph-path guard prevents data wipe when vault is inaccessible (container safety)
  • State migration from absolute to relative path keys
  • Inter-process file lock for concurrent sync protection
  • LanceDB version mismatch detection in open_readonly()

Getting Started

Vector search is fully opt-in — existing users are unaffected.

pip install "mcp-logseq[vector]"

See VECTOR_SEARCH.md for prerequisites, configuration, and first sync walkthrough.

Technical Details

  • Embedding model: any Ollama-compatible model (tested with qwen3-embedding:4b, 2560 dims)
  • Chunking: page-level with configurable minimum length
  • Incremental sync: only changed files are re-embedded (content hash comparison)
  • FTS indexes: separate full-text indexes on text and page fields
  • 69 new unit tests across 7 test files

v1.6.0 — Vector Search with LanceDB + Ollama

Choose a tag to compare

@ergut ergut released this 22 Mar 23:45
5f563f3

Vector Search — Semantic search for your Logseq notes

This is the biggest feature release since v1.0. Your Logseq notes are now searchable by meaning, not just keywords — powered entirely by local models. No data ever leaves your machine.

Ask things like "What did I write about shadow work?" and find your Jung-related notes, even if they never mention those exact words.

How it works

  1. Ollama generates embeddings locally (e.g. qwen3-embedding:4b)
  2. LanceDB stores vectors in an embedded database (~3,000 chunks for a 654-page graph)
  3. Hybrid search combines vector similarity + full-text matching with Reciprocal Rank Fusion
  4. Results include relevance labels (high / medium / weak match) so the AI client can judge what's worth presenting

New MCP Tools

Tool Description
vector_search Semantic search with hybrid, vector-only, or keyword-only modes
sync_vector_db Trigger incremental sync or full rebuild
vector_db_status DB stats, staleness, and watcher daemon status

New CLI: logseq-sync

logseq-sync --once      # One-shot incremental sync
logseq-sync --watch     # Continuous sync on file changes
logseq-sync --rebuild   # Drop and re-index from scratch
logseq-sync --status    # Show current DB state

Architecture: Single-Writer, Multi-Reader

The MCP server is a read-only consumer of the vector DB. All writes go through logseq-sync. This makes it safe to run multiple MCP server instances against the same DB (e.g. in containerized setups).

logseq-sync --watch          (single writer)
  └── writes → ~/.logseq-vector/db/

MCP servers (any number)     (read-only)
  └── reads  → ~/.logseq-vector/db/

An inter-process file lock (fcntl.flock) prevents concurrent syncs. State keys use relative paths for cross-mount portability.

Getting Started

Vector search is fully opt-in — existing users are unaffected.

pip install "mcp-logseq[vector]"

See VECTOR_SEARCH.md for prerequisites, configuration, and first sync walkthrough.

Technical Details

  • Embedding model: any Ollama-compatible model (tested with qwen3-embedding:4b, 2560 dims)
  • Chunking: page-level with configurable minimum length
  • Incremental sync: only changed files are re-embedded (content hash comparison)
  • FTS indexes: separate full-text indexes on text and page fields
  • 69 new unit tests across 7 test files

v1.5.0 - DB-mode property support

Choose a tag to compare

@ergut ergut released this 22 Mar 16:36

New Features

DB-mode property support (opt-in)

Logseq's DB-mode stores class/tag properties as Datascript entities rather than inline key:: value pairs — meaning get_page_content previously returned no properties for DB-mode graphs. This release adds full read and write support.

Set LOGSEQ_DB_MODE=true to enable:

  • get_page_content now queries Datascript for :user.property/* attributes on each block and renders them as key:: value lines alongside regular content
  • New set_block_properties tool: set properties by display name (e.g. Content status), automatically resolves to internal :user.property/* idents and calls upsertBlockProperty
  • Batched Datascript queries minimize API round-trips (from ~200 to ~N+2 per page)

Markdown/file-based graph users: no changes. All DB-mode code is strictly gated behind the LOGSEQ_DB_MODE=true env var.

Configuration

# Claude Code
claude mcp add mcp-logseq \
  --env LOGSEQ_API_TOKEN=your_token \
  --env LOGSEQ_DB_MODE=true \
  -- uv run --with mcp-logseq mcp-logseq

Notes

  • Logseq DB-mode is still in beta — this feature is provided for early adopters

Contributors

Thank you to everyone who contributed to this release!

v1.4.3

Choose a tag to compare

@ergut ergut released this 13 Mar 03:42

Bug Fixes

  • Inline properties rendered as separate blocks: Consecutive key:: value lines (e.g. type:: video, source:: ..., channel:: ...) were each becoming their own block (separate bullet). They are now grouped into a single block with lines joined by \n , matching Logseq's native inline property format where all properties appear as indented lines under one bullet.

v1.4.2

Choose a tag to compare

@ergut ergut released this 09 Mar 08:44

Bug Fixes

  • Inline properties collapsed onto one line: create_page now correctly renders each key:: value property as its own block. Previously, consecutive property lines (e.g. type:: video, source:: ..., channel:: ...) were joined into a single space-separated block. Each property is now an independent block, matching native Logseq behavior.

v1.4.1

Choose a tag to compare

@ergut ergut released this 26 Feb 20:51

Bug Fixes

  • Page-level properties: create_page and update_page now store properties at the page entity level (createPage 2nd arg / setPageProperties) instead of on the first content block. Properties now appear in the Logseq page info panel and match (page-property ...) queries.
  • Double-wrap fix: get_page_content no longer double-wraps block content that already starts with a list marker (-, *, +).