ergut/mcp-logseq

MCP server to interact with LogSeq via its Local HTTP API - enabling AI assistants like Claude to seamlessly read, write, and manage your LogSeq graph.

What it solves

This project provides a Model Context Protocol (MCP) server that connects AI assistants like Claude to a LogSeq knowledge base. It eliminates the need to manually export or copy notes, allowing an AI to read, create, and manage pages and blocks directly within the user's local graph.

How it works

The server acts as a bridge between an MCP-compatible client (such as Claude Desktop or Claude Code) and the LogSeq HTTP API. It exposes 16 core tools for page and block manipulation, including the ability to execute Logseq DSL queries and manage namespaces.

Optional advanced features include:

  • Semantic Vector Search: Uses local (Ollama) or hosted (OpenAI) embeddings with LanceDB to find notes by meaning rather than just keywords.
  • Access Control: Filters content based on excluded tags or specific namespace allow/deny lists to keep private notes hidden from the AI.
  • DB-mode Support: Allows reading and writing class properties for users of Logseq's DB-mode graphs.

Who it’s for

Users of LogSeq who want to automate their knowledge management, perform complex analysis across their notes, or use AI to organize and generate content directly within their existing knowledge graph.

Highlights

  • Direct Graph Interaction: Create, update, delete, and rename pages and blocks without leaving the AI interface.
  • Smart Markdown Parsing: Automatically converts standard markdown into Logseq's native nested block structure.
  • Semantic Search: Optional integration with vector databases for meaning-based retrieval.
  • Privacy Controls: Granular control over what the AI can see using tags and namespaces.
  • Flexible Deployment: Supports both standard stdio communication and long-lived HTTP services with TLS and bearer authentication.

Related

  • Project
  • Project
  • Project
  • Project
  • Project