Provides tools to connect AI assistants to your Logseq knowledge graph, allowing for the reading, writing, searching, and management of pages, blocks, journals, and tags.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Logseq MCP ServerSearch for blocks mentioning 'Project Apollo' and list the action items"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
logseq-mcp-server
A TypeScript Model Context Protocol (MCP) server that connects AI assistants to your Logseq knowledge graph. Read, write, search, and manage pages, blocks, journals, and tags through the MCP protocol.
Features
17 tools covering Pages, Blocks, Search, Journals, and Graph operations
Full CRUD for pages and blocks
Full-text search across the graph
Batch block insertion with nested children
Block property management
Backlink (linked references) retrieval
Journal page creation and tag listing
Dual transport: stdio (local) and HTTP (Hono-based, portable across runtimes)
Prerequisites
Logseq installed and running
HTTP APIs server enabled in Logseq:
Settings > Features > Enable "HTTP APIs server"
Click the API button > "Start server"
Generate a token: API panel > Authorization tokens
Node.js >= 18
Quick Start
Claude Desktop
Add to Settings > Developer > Edit Config:
Claude Code
From Source
Environment Variables
Variable | Required | Default | Description |
| Yes | - | Bearer token from Logseq HTTP API |
| No |
| Logseq HTTP API URL |
| No |
| Transport mode: |
| No |
| HTTP port (when |
HTTP Transport
When running with TRANSPORT=http, the server uses Hono with WebStandardStreamableHTTPServerTransport from the MCP SDK.
Endpoints:
POST|GET|DELETE /mcp- MCP Streamable HTTP protocolGET /health- Health check
Available Tools
Pages
Tool | Description |
| List pages with filtering (journal, namespace) and pagination |
| Get page metadata by name or UUID |
| Get full block tree rendered as indented Markdown |
| Create a new page with optional initial content and properties |
| Permanently delete a page |
| Rename a page (updates all references) |
| Get backlinks - pages and blocks that reference a page |
Blocks
Tool | Description |
| Get a block by UUID with optional children |
| Insert a block relative to a page or block |
| Append a block at the end of a page |
| Update block content and properties |
| Permanently remove a block |
| Move a block to a new position |
| Insert multiple blocks at once (supports nesting) |
| Read or write a single block property |
Search & Graph
Tool | Description |
| Full-text search across pages and blocks |
| Create a journal page for a specific date |
| Get current graph name and path |
| List all tags in the graph |
Architecture
Development
License
Apache-2.0