Logseq MCP Server
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Provides direct integration with Logseq's knowledge base, enabling interaction with Logseq graphs, creating pages, managing blocks, and organizing information programmatically.
Supports Markdown as a page format option when creating new pages in Logseq.
Supports Org format as a page format option when creating new pages in Logseq.
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.
Available Tools
Block Operations
- logseq_insert_block - Create new blocks in Logseq
Parameters:
parent_block
(string): Parent block UUID or page namecontent
(string, required): Block contentis_page_block
(boolean): Create as page-level blockbefore
(boolean): Insert before parent blockcustom_uuid
(string): Custom UUIDv4 for block
- logseq_edit_block - Enter block editing mode
Parameters:
src_block
(string, required): Block UUIDpos
(number): Cursor position
- logseq_exit_editing_mode - Exit editing mode
Parameters:
select_block
(boolean): Keep block selected
Page Operations
- logseq_create_page - Create new pages
Parameters:
page_name
(string, required): Page nameproperties
(object): Page propertiesjournal
(boolean): Create as journal pageformat
(string): Page format (markdown/org)
- logseq_get_page - Get page details
Parameters:
src_page
(string, required): Page identifierinclude_children
(boolean): Include child blocks
- logseq_get_all_pages - List all pages
Parameters:
repo
(string): Repository name
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:
src_page
(string, required): Page identifier
Prompts
logseq_insert_block
Create a new block in Logseq Arguments:
parent_block
: Parent block reference (page name or UUID)content
: Block contentis_page_block
: Set true for page-level blocks
logseq_create_page
Create a new Logseq page Arguments:
page_name
: Name of the pageproperties
: Page properties as JSONjournal
: Set true for journal pages
Installation
Using pip
From source
Run the server:
Configuration
API Key
- Generate API token in Logseq: API → Authorization tokens
- 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
This server cannot be installed
A server that enables LLMs to programmatically interact with Logseq knowledge graphs, allowing creation and management of pages and blocks.
- Available Tools
- Prompts
- Installation
- Configuration
- Examples
- Create meeting notes page
- Debugging
- Contributing