Logseq API MCP Server

A MCP server that uses Logseq API to extract and interact with Logseq notes.

Local serverstdioPython

What is the Logseq API MCP Server?

A MCP server that uses Logseq API to extract and interact with Logseq notes.

The short version

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
get_all_pagesEvery page with ID, UUID, journal flag, and namespace
get_page_blocksHierarchical block tree with IDs, UUIDs, and child counts
get_page_linksPages linking to a target page
get_page_backlinksFull backlink analysis including block-level references
get_block_contentBlock detail with properties and immediate children
get_all_page_contentComplete page: properties, blocks, DB refs expanded
get_linked_flashcardsQ&A flashcard pairs from a page and all linked pages
searchFull-text search across blocks, pages, and file names
queryRaw Datalog / DSL queries against the graph
find_pages_by_propertyFilter pages by property key and optional value
get_pages_from_namespaceAll pages under a Logseq namespace
get_pages_tree_from_namespaceNested tree of namespace pages
create_pageCreate a page with optional properties and format
delete_pageRemove a page permanently

Configuration

VariableDescriptionRequired
LOGSEQ_API_ENDPOINTConfiguration value read at startup.Optional
LOGSEQ_API_TOKENCredential the server authenticates with.Yes

Example prompts to try

  • “Use Logseq API to get all pages.”
  • “Use Logseq API to get page blocks.”
  • “Use Logseq API to get page links.”

Frequently asked questions

Python 3.11 or higher and the `uv` package installer. The Logseq desktop app must be running with its HTTP API server enabled.