logseq.com
logseq.com logo

LogSeq

Integrates with LogSeq API to enable automated note-taking, knowledge graph analysis, and workflow automation for develo...

Created byApr 22, 2025

Logseq MCP Server

A Model Context Protocol server that provides direct integration with Logseq's knowledge base. This server enables LLMs to interact with Logseq graphs, create pages, manage blocks, and organize information programmatically.

Usage with Claude Desktop

Available Tools

Block Operations

  • logseq_insert_block - Create new blocks in Logseq Parameters:
  • logseq_edit_block - Enter block editing mode Parameters:
  • logseq_exit_editing_mode - Exit editing mode Parameters:

Page Operations

  • logseq_create_page - Create new pages Parameters:
  • logseq_get_page - Get page details Parameters:
  • logseq_get_all_pages - List all pages Parameters:

Content Retrieval

  • logseq_get_current_page - Get active page/block Parameters: None
  • logseq_get_current_blocks_tree - Current page's block hierarchy Parameters: None
  • logseq_get_editing_block_content - Get content of active block Parameters: None
  • logseq_get_page_blocks_tree - Get page's block structure Parameters:

Prompts

logseq_insert_block

Create a new block in Logseq Arguments:
  • parent_block: Parent block reference (page name or UUID)
  • content: Block content
  • is_page_block: Set true for page-level blocks

logseq_create_page

Create a new Logseq page Arguments:
  • page_name: Name of the page
  • properties: Page properties as JSON
  • journal: Set true for journal pages

Installation

Using pip

From source

Run the server:

Configuration

API Key

  1. Generate API token in Logseq: API Authorization tokens
  1. Set environment variable:
Or pass via command line:

Graph Configuration

Default URL: http://localhost:12315 To customize:

Examples

Create meeting notes page

Add task block to existing page

Create journal entry with first block

Debugging

Contributing

We welcome contributions to enhance Logseq integration:
  • Add new API endpoints (page linking, query support)
  • Improve block manipulation capabilities
  • Add template support
  • Enhance error handling

Logseq MCP Server

A Model Context Protocol server that provides direct integration with Logseq's knowledge base. This server enables LLMs to interact with Logseq graphs, create pages, manage blocks, and organize information programmatically.

Usage with Claude Desktop

Available Tools

Block Operations

  • logseq_insert_block - Create new blocks in Logseq Parameters:
  • logseq_edit_block - Enter block editing mode Parameters:
  • logseq_exit_editing_mode - Exit editing mode Parameters:

Page Operations

  • logseq_create_page - Create new pages Parameters:
  • logseq_get_page - Get page details Parameters:
  • logseq_get_all_pages - List all pages Parameters:

Content Retrieval

  • logseq_get_current_page - Get active page/block Parameters: None
  • logseq_get_current_blocks_tree - Current page's block hierarchy Parameters: None
  • logseq_get_editing_block_content - Get content of active block Parameters: None
  • logseq_get_page_blocks_tree - Get page's block structure Parameters:

Prompts

logseq_insert_block

Create a new block in Logseq Arguments:
  • parent_block: Parent block reference (page name or UUID)
  • content: Block content
  • is_page_block: Set true for page-level blocks

logseq_create_page

Create a new Logseq page Arguments:
  • page_name: Name of the page
  • properties: Page properties as JSON
  • journal: Set true for journal pages

Installation

Using pip

From source

Run the server:

Configuration

API Key

  1. Generate API token in Logseq: API Authorization tokens
  1. Set environment variable:
Or pass via command line:

Graph Configuration

Default URL: http://localhost:12315 To customize:

Examples

Create meeting notes page

Add task block to existing page

Create journal entry with first block

Debugging

Contributing

We welcome contributions to enhance Logseq integration:
  • Add new API endpoints (page linking, query support)
  • Improve block manipulation capabilities
  • Add template support
  • Enhance error handling