mcp-logseq is a Model Context Protocol (MCP) server that bridges AI agents (like Claude) to Logseq knowledge bases. It exposes Logseq's local HTTP API through 15+ tools for reading, creating, updating, and deleting pages and blocks, along with search, DSL queries, and optional semantic vector search via LanceDB. The server supports both stdio and HTTP/SSE transports with security features including namespace/tag-based access control, read-only mode, TLS, and bearer token authentication. The vector database is managed by a separate sync process (logseq-sync) to enforce a single-writer pattern. The codebase is well-architected with clean separation of concerns: a declarative access control system, a pure namespace matching utility, a stateful markdown parser, and an embedder abstraction with Ollama/OpenAI adapters. Configuration is lazy-cached from environment variables and a JSON config file, with no import-time side effects. The test suite is comprehensive with over 50 unit tests and integration tests for HTTP serving. While the project is still in beta, it demonstrates strong engineering practices and provides several reusable components for other MCP server implementations or Logseq integration tools.
lsq is a CLI tool written in Go that serves as a lightning-fast companion for Logseq, the open-source knowledge base. Its core functionality is creating, appending to, and viewing daily journal entries directly from the terminal, following Logseq's file naming and formatting conventions (Markdown or Org-mode). The tool provides a rich set of flags for targeting specific dates, searching pages via a trie-based index (including alias support), regex searching across journals and pages, and piping content from STDIN. It also supports indentation for nested list items and a configuration file in EDN format for persistent settings. The architecture is a single-binary monolith with clear separation into config, system (file I/O, editor launch), trie, todo state cycling, and an EDN validator module. While the tool is tightly coupled to Logseq's directory structure (journals/ and pages/ folders), the underlying components like the trie search, file appending logic, and configuration loading are well-isolated and could be reused in other Go projects with minimal adaptation.