$ account ergut
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.