Logseq MCP Server logo

Logseq MCP Server

by dailydaniel

The Logseq MCP Server provides direct integration between Large Language Models (LLMs) and Logseq's knowledge base through the Model Context Protocol. It enables programmatically creating pages, managing blocks, and organizing information within Logseq graphs.

View on GitHub

Last updated: N/A

What is Logseq MCP Server?

This is a Model Context Protocol (MCP) server that enables Large Language Models to interact directly with a Logseq knowledge graph. It allows LLMs to create, modify, and retrieve information from a Logseq database programmatically.

How to use Logseq MCP Server?

First, install the server using pip or from source. Configure the server with a Logseq API token and URL. Then, use the available tools via the server's API to interact with your Logseq graph. Example usages in conjunction with Claude Desktop are provided to insert blocks and create new pages.

Key features of Logseq MCP Server

  • Block Operations (insert, edit, exit editing mode)

  • Page Operations (create, get, get all pages)

  • Content Retrieval (current page/block, block hierarchy, editing block content, block structure)

  • API Key Authentication

  • Customizable URL

Use cases of Logseq MCP Server

  • Automated note taking

  • Intelligent task management

  • Building knowledge graphs

  • Creating meeting summaries

  • Populating Logseq with data from external sources

FAQ from Logseq MCP Server

How do I generate an API token in Logseq?

Go to API → Authorization tokens in Logseq to generate a token.

What is the default URL for the server?

The default URL is http://localhost:12315

How do I customize the server URL?

Use the command line argument --url=http://your-logseq-instance:port when running the server.

How do I add a task block to an existing page?

Use the logseq_insert_block tool with the parent_block parameter set to the page name or UUID and the content parameter containing the task definition.

How do I create a journal entry with an initial block?

Use the logseq_create_page with journal set to true, and then use logseq_insert_block to add the first content block to the new journal page.