Interact with your Logseq knowledge base to create pages, manage blocks, and organize information programmatically.
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.
{
"mcpServers": {
"logseq": {
"command": "uvx",
"args": ["mcp-server-logseq"],
"env": {
"LOGSEQ_API_TOKEN": "<YOUR_KEY>",
"LOGSEQ_API_URL": "http://127.0.0.1:12315"
}
}
}
}
{
"mcpServers": {
"logseq": {
"command": "uvx",
"args": ["mcp-server-logseq==0.0.1"],
"env": {
"LOGSEQ_API_TOKEN": "<YOUR_KEY>",
"LOGSEQ_API_URL": "http://127.0.0.1:12315"
}
}
}
}
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 blocklogseq_edit_block - Enter block editing mode Parameters:
src_block
(string, required): Block UUIDpos
(number): Cursor positionlogseq_exit_editing_mode - Exit editing mode Parameters:
select_block
(boolean): Keep block selectedlogseq_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 blockslogseq_get_all_pages - List all pages Parameters:
repo
(string): Repository namelogseq_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 identifierCreate 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 blocksCreate a new Logseq page Arguments:
page_name
: Name of the pageproperties
: Page properties as JSONjournal
: Set true for journal pagespip install mcp-server-logseq
git clone https://github.com/dailydaniel/logseq-mcp.git
cd logseq-mcp
cp .env.example .env
uv sync
Run the server:
python -m mcp_server_logseq
export LOGSEQ_API_TOKEN=your_token_here
Or pass via command line:
python -m mcp_server_logseq --api-key=your_token_here
Default URL: http://localhost:12315 To customize:
python -m mcp_server_logseq --url=http://your-logseq-instance:port
Create new page "Team Meeting 2024-03-15" with properties:
- Tags: #meeting #engineering
- Participants: Alice, Bob, Charlie
- Status: pending
Add task to [[Project Roadmap]]:
- [ ] Finalize API documentation
- Due: 2024-03-20
- Priority: high
Create journal entry for today with initial content:
- Morning standup completed
- Started work on new authentication system
npx @modelcontextprotocol/inspector uv --directory . run mcp-server-logseq
We welcome contributions to enhance Logseq integration:
Interact with and control your web browser via a browser extension.
Full implementation of Todoist Rest API for MCP server
Contract and template management for drafting, reviewing, and sending binding contracts.
A universal remote MCP server that connects to popular productivity tools such as Notion, Monday, AirTable, and many more.
Interact with Microsoft OneNote using AI language models like Claude and other LLMs.
A comprehensive toolkit for text processing, formatting, and analysis.
Integrates Amoga Studio with Claude Desktop for enhanced productivity and communication.
Converts Cursor agent plans into structured markdown task lists and organizes them in your repository.
A server for time and timezone conversion tools.
Python tools for MCP that integrate with native Apple applications like Messages, Notes, Mail, and more on macOS.